24 #ifndef GF_WINDOW_GEOMETRY_TRACKER_H
25 #define GF_WINDOW_GEOMETRY_TRACKER_H
31 #ifndef DOXYGEN_SHOULD_SKIP_THIS
88 float getXRatio(
float ratio,
float width)
const;
126 float getYRatio(
float ratio,
float height)
const;
163 Vector2u m_screenSize;
166 #ifndef DOXYGEN_SHOULD_SKIP_THIS
float getXFromRight(float width) const
Compute x for a right aligned element.
float getYFromBottom(float height) const
Compute y for a bottom aligned element.
void onScreenResize(Vector2u screenSize)
Update the geometry with the new screen size.
void update(const Event &event)
Update the geometry thanks to the event.
WindowGeometryTracker()
Default constructor.
Vector2f getCornerPosition(const Vector2f &pos) const
Get a position relative to a corner.
float getXRatio(float ratio, float width) const
Compute x for an element at some percent from the left.
float getYRatio(float ratio, float height) const
Compute y for an element at some percent from the top.
float getYCentered(float height) const
Compute y for a centered element.
Defines a system event and its parameters.
Definition: Event.h:115
#define GF_API
Definition: Portability.h:35
float getXCentered(float width) const
Compute x for a centered element.
A window geometry tracker.
Definition: WindowGeometryTracker.h:46