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

Live viewport: where it is looking, how magnified, and what it owes the panel. More...

#include <zoom.h>

Collaboration diagram for zoom_view_t:

Data Fields

zoom_source_t src
 Bound source.
zoom_scratch_t scratch
 Caller-owned composite buffers.
ra8_ui_rect_t dst
 Viewport in framebuffer pixels.
int32_t anchor_x
 Plane column shown at dst.x.
int32_t anchor_y
 Plane row shown at dst.y.
uint32_t last_input_ms
 Timestamp of the last viewport change.
uint16_t settle_ms
 Input silence before the quality repaint.
uint16_t strip_rows
 Destination rows per composite strip.
uint8_t scale
 Current integer magnification.
uint8_t scale_max
 Ladder ceiling for this view.
zoom_policy_t policy
 Waveform scheduling policy.
zoom_refresh_t pending_kind
 Waveform the owed flush should use.
bool pending
 A flush is owed.
bool settle_armed
 A quality repaint is still due after settling.
bool active
 The view is open.

Detailed Description

Live viewport: where it is looking, how magnified, and what it owes the panel.

Opaque by convention – read it through the accessors, never write it. The two anchor fields are the state that matters and they are in magnified-plane coordinates (see the file docblock), so anchor_x + c is the plane column shown at destination column c and (anchor_x + c) / scale is the source column.

Invariant
scale lies in [k_zoom_scale_min, scale_max] whenever active.
anchor_x is clamped to [0, width*scale - dst.w] when the image is wider than the viewport, and is the negative centring offset otherwise.
strip_rows >= 1 and strip_rows <= k_zoom_strip_rows_max.
settle_armed is false under k_zoom_policy_quality.
State transitions
State transition table
State Event Next state Action
closed view_open quality pending anchor from focus, clamp
any pending view_present shown hand the rect + waveform to the caller
shown view_pan / view_set_scale fast (responsive) or quality pending re-clamp anchor, arm settle
shown view_tick past settle_ms quality pending disarm settle
any view_close closed nothing owed
Example:
static zoom_view_t s_view;
(void)zoom_view_open(&s_view, &cfg);
Live viewport: where it is looking, how magnified, and what it owes the panel.
Definition zoom.h:472
ra8_err_t zoom_view_open(zoom_view_t *v, const zoom_view_cfg_t *cfg)
Open a viewport onto a source, centred on a source-pixel focus.
Definition zoom.c:482
See also
zoom_view_open
Since
0.1.0

Definition at line 472 of file zoom.h.

Field Documentation

◆ active

◆ anchor_x

int32_t zoom_view_t::anchor_x

◆ anchor_y

int32_t zoom_view_t::anchor_y

◆ dst

◆ last_input_ms

uint32_t zoom_view_t::last_input_ms

Timestamp of the last viewport change.

Definition at line 478 of file zoom.h.

Referenced by internal_touch(), internal_view_adopt(), and zoom_view_tick().

◆ pending

bool zoom_view_t::pending

A flush is owed.

Definition at line 485 of file zoom.h.

Referenced by internal_touch(), internal_view_adopt(), zoom_view_close(), zoom_view_present(), and zoom_view_tick().

◆ pending_kind

zoom_refresh_t zoom_view_t::pending_kind

Waveform the owed flush should use.

Definition at line 484 of file zoom.h.

Referenced by internal_touch(), internal_view_adopt(), zoom_view_present(), and zoom_view_tick().

◆ policy

zoom_policy_t zoom_view_t::policy

Waveform scheduling policy.

Definition at line 483 of file zoom.h.

Referenced by internal_touch(), and internal_view_adopt().

◆ scale

uint8_t zoom_view_t::scale

◆ scale_max

uint8_t zoom_view_t::scale_max

Ladder ceiling for this view.

Definition at line 482 of file zoom.h.

Referenced by internal_view_adopt(), and zoom_view_set_scale().

◆ scratch

zoom_scratch_t zoom_view_t::scratch

Caller-owned composite buffers.

Definition at line 474 of file zoom.h.

Referenced by internal_emit_strip(), internal_expand_row(), internal_fill_row(), internal_fill_strip(), and internal_view_adopt().

◆ settle_armed

bool zoom_view_t::settle_armed

A quality repaint is still due after settling.

Definition at line 486 of file zoom.h.

Referenced by internal_touch(), internal_view_adopt(), zoom_view_close(), and zoom_view_tick().

◆ settle_ms

uint16_t zoom_view_t::settle_ms

Input silence before the quality repaint.

Definition at line 479 of file zoom.h.

Referenced by internal_view_adopt(), and zoom_view_tick().

◆ src

◆ strip_rows

uint16_t zoom_view_t::strip_rows

Destination rows per composite strip.

Definition at line 480 of file zoom.h.

Referenced by internal_render_ready(), internal_view_adopt(), and zoom_view_render().


The documentation for this struct was generated from the following file:
  • apps/shared_libs/zoom/inc/zoom.h