Skip to main content

ViewportState

ViewportState

Viewport/camera state for the media display. More…

#include <MediaWidgetStateData.hpp>

Public Attributes

Name
double zoom
Zoom factor (1.0 = no zoom).
double pan_x
Horizontal pan offset in pixels.
double pan_y
Vertical pan offset in pixels.
int canvas_width
Canvas width in pixels.
int canvas_height
Canvas height in pixels.

Detailed Description

struct ViewportState;

Viewport/camera state for the media display.

Captures zoom level, pan position, and canvas dimensions for restoring the exact view the user had.

Public Attributes Documentation

variable zoom

double zoom = 1.0;

Zoom factor (1.0 = no zoom).

variable pan_x

double pan_x = 0.0;

Horizontal pan offset in pixels.

variable pan_y

double pan_y = 0.0;

Vertical pan offset in pixels.

variable canvas_width

int canvas_width = 640;

Canvas width in pixels.

variable canvas_height

int canvas_height = 480;

Canvas height in pixels.


Updated on 2026-11-13 at 20:25:39 +0000