ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
mg_reader_t Struct Reference

Viewer state: the page geometry plus the current viewport + zoom. More...

#include <mg_reader.h>

Collaboration diagram for mg_reader_t:

Data Fields

uint16_t * fb
 RGB565 panel framebuffer.
int32_t fb_w
 Framebuffer width, pixels.
int32_t fb_h
 Framebuffer height, pixels.
ra8_tile_cache_tcache
 Tile cache paging the atlas.
uint32_t image_id
 Tile-cache key image id.
uint16_t page_w
 Full page width, pixels.
uint16_t page_h
 Full page height, pixels.
uint16_t tile_w
 Atlas tile width, pixels.
uint16_t tile_h
 Atlas tile height, pixels.
uint16_t tile_cols
 Atlas tile columns.
uint16_t tile_rows
 Atlas tile rows.
int32_t view_x
 Viewport left in page px (1:1 anchor).
int32_t view_y
 Viewport top in page px (1:1 anchor).
uint8_t zoom
 Current mg_zoom_t.
uint8_t fit_factor
 Decimation factor for fit-page (>= 1).
ra8_tile_pan_dir_t last_pan
 Last pan direction (mg_reader_prefetch seed).

Detailed Description

Viewer state: the page geometry plus the current viewport + zoom.

Invariant
view_x in [0, page_w - visible_w] and likewise for view_y, with the viewport clamped inside the page on every mutation.
Since
0.1.0

Definition at line 133 of file mg_reader.h.

Field Documentation

◆ cache

ra8_tile_cache_t* mg_reader_t::cache

Tile cache paging the atlas.

Definition at line 137 of file mg_reader.h.

Referenced by mg_reader_prefetch(), and mg_render_page().

◆ fb

uint16_t* mg_reader_t::fb

RGB565 panel framebuffer.

Definition at line 134 of file mg_reader.h.

Referenced by mg_blit_tile(), and mg_reader_render().

◆ fb_h

int32_t mg_reader_t::fb_h

Framebuffer height, pixels.

Definition at line 136 of file mg_reader.h.

Referenced by mg_content_h(), mg_render_minimap(), and mg_zone_hit().

◆ fb_w

int32_t mg_reader_t::fb_w

Framebuffer width, pixels.

Definition at line 135 of file mg_reader.h.

Referenced by mg_blit_tile(), mg_clamp(), mg_fit_factor(), mg_offsets(), mg_region(), mg_render_minimap(), mg_render_status(), and mg_zone_hit().

◆ fit_factor

uint8_t mg_reader_t::fit_factor

Decimation factor for fit-page (>= 1).

Definition at line 148 of file mg_reader.h.

Referenced by mg_reader_bind(), and mg_scale().

◆ image_id

uint32_t mg_reader_t::image_id

Tile-cache key image id.

Definition at line 138 of file mg_reader.h.

Referenced by mg_reader_prefetch(), and mg_render_page().

◆ last_pan

ra8_tile_pan_dir_t mg_reader_t::last_pan

Last pan direction (mg_reader_prefetch seed).

Definition at line 149 of file mg_reader.h.

Referenced by mg_pan(), mg_reader_prefetch(), and mg_reader_toggle_zoom().

◆ page_h

uint16_t mg_reader_t::page_h

Full page height, pixels.

Definition at line 140 of file mg_reader.h.

Referenced by mg_clamp(), mg_fit_factor(), mg_region(), and mg_render_minimap().

◆ page_w

uint16_t mg_reader_t::page_w

Full page width, pixels.

Definition at line 139 of file mg_reader.h.

Referenced by mg_clamp(), mg_fit_factor(), mg_region(), and mg_render_minimap().

◆ tile_cols

uint16_t mg_reader_t::tile_cols

Atlas tile columns.

Definition at line 143 of file mg_reader.h.

Referenced by mg_reader_prefetch().

◆ tile_h

uint16_t mg_reader_t::tile_h

Atlas tile height, pixels.

Definition at line 142 of file mg_reader.h.

Referenced by mg_blit_tile(), and mg_tiles_of_region().

◆ tile_rows

uint16_t mg_reader_t::tile_rows

Atlas tile rows.

Definition at line 144 of file mg_reader.h.

Referenced by mg_reader_prefetch().

◆ tile_w

uint16_t mg_reader_t::tile_w

Atlas tile width, pixels.

Definition at line 141 of file mg_reader.h.

Referenced by mg_blit_tile(), and mg_tiles_of_region().

◆ view_x

int32_t mg_reader_t::view_x

Viewport left in page px (1:1 anchor).

Definition at line 145 of file mg_reader.h.

Referenced by mg_clamp(), mg_map(), mg_pan(), mg_reader_status(), and mg_region().

◆ view_y

int32_t mg_reader_t::view_y

Viewport top in page px (1:1 anchor).

Definition at line 146 of file mg_reader.h.

Referenced by mg_clamp(), mg_map(), mg_pan(), mg_reader_status(), and mg_region().

◆ zoom

uint8_t mg_reader_t::zoom

Current mg_zoom_t.

Definition at line 147 of file mg_reader.h.

Referenced by mg_clamp(), mg_pan(), mg_reader_status(), mg_reader_toggle_zoom(), and mg_scale().


The documentation for this struct was generated from the following file:
  • examples/ek_ra8d2/hw_pending/ereader_manga/inc/mg_reader.h