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

◆ to_ndc_rect()

Kinesis::AABB2D MayaFlux::Portal::Forma::Context::to_ndc_rect ( double  x,
double  y,
double  w,
double  h 
) const
noexcept

Rect of pixel size (w, h) at pixel position (x, y), top-left origin, converted to NDC from the window's current dimensions.

Reads window state live at call time via to_ndc() - call again after a resize for that size's new NDC bounds.

Definition at line 347 of file Context.cpp.

348{
349 return { .min = to_ndc(x, y + h), .max = to_ndc(x + w, y) };
350}
uint32_t h
Definition InkPress.cpp:29
glm::vec2 to_ndc(double px, double py) const noexcept
Definition Context.cpp:338

References h, and MayaFlux::Kinesis::AABB2D::min.