CanvasCoordinateSystem
CanvasCoordinateSystem
The logical resolution that overlay data coordinates are interpreted against. More…
#include <CanvasCoordinateSystem.hpp>
Public Functions
| Name | |
|---|---|
| bool | operator==(CanvasCoordinateSystem const & other) const |
| bool | operator!=(CanvasCoordinateSystem const & other) const |
| ImageSize | toImageSize() const Convert to ImageSize for compatibility. |
| CanvasCoordinateSystem | fromImageSize(ImageSize const & size, CanvasCoordinateSource src =CanvasCoordinateSource::Default, std::string key ={}) Create from ImageSize. |
Public Attributes
| Name | |
|---|---|
| int | width Logical width of the coordinate space. |
| int | height Logical height of the coordinate space. |
| CanvasCoordinateSource | source |
| std::string | source_key Data key that provided this resolution (empty for Default/UserOverride). |
Detailed Description
struct CanvasCoordinateSystem;The logical resolution that overlay data coordinates are interpreted against.
This replaces the implicit “ask the active media for its resolution” pattern. The canvas coordinate system defines the coordinate space; the canvas pixel dimensions (_canvasWidth/_canvasHeight) define the display resolution.
Public Functions Documentation
function operator==
inline bool operator==(
CanvasCoordinateSystem const & other
) constfunction operator!=
inline bool operator!=(
CanvasCoordinateSystem const & other
) constfunction toImageSize
inline ImageSize toImageSize() constConvert to ImageSize for compatibility.
function fromImageSize
static inline CanvasCoordinateSystem fromImageSize(
ImageSize const & size,
CanvasCoordinateSource src =CanvasCoordinateSource::Default,
std::string key ={}
)Create from ImageSize.
Public Attributes Documentation
variable width
int width = 640;Logical width of the coordinate space.
variable height
int height = 480;Logical height of the coordinate space.
variable source
CanvasCoordinateSource source = CanvasCoordinateSource::Default;variable source_key
std::string source_key;Data key that provided this resolution (empty for Default/UserOverride).
Updated on 2026-11-13 at 20:25:39 +0000