MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ normalized_size_to_pixels() [2/4]

MAYAFLUX_API glm::uvec2 MayaFlux::normalized_size_to_pixels ( const glm::vec2 &  ndc_size,
uint32_t  window_width,
uint32_t  window_height 
)

Convert an NDC-space size (extent) to integer pixel dimensions.

NDC spans 2.0 across each axis, so an NDC size of (1.8, 0.1) on a 1280x720 window resolves to (1152, 36) pixels. Both components are clamped to at least 1 pixel.

Use this for sizing text images, capture targets, and offscreen images to match an on-screen NDC region.

Parameters
ndc_sizeNDC extent (each component in [0, 2]).
window_widthWindow width in pixels.
window_heightWindow height in pixels.
Returns
Integer pixel dimensions, each at least 1.

Definition at line 97 of file Windowing.cpp.

99{
100 return Kinesis::ndc_size_to_pixels(ndc_size, window_width, window_height);
101}

References MayaFlux::Kinesis::ndc_size_to_pixels().

+ Here is the call graph for this function: