|
MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
|
| 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.
| ndc_size | NDC extent (each component in [0, 2]). |
| window_width | Window width in pixels. |
| window_height | Window height in pixels. |
Definition at line 97 of file Windowing.cpp.
References MayaFlux::Kinesis::ndc_size_to_pixels().
Here is the call graph for this function: