|
AeonGUI
A portable video game graphic user interface library.
|
SVG preserveAspectRatio attribute. More...
#include <aeongui/Attribute.hpp>
Public Types | |
| enum | MinMidMax : uint8_t { Min = 0x1 , Mid = 0x2 , Max = 0x3 } |
| Axis alignment selector values. More... | |
| enum | Align : uint8_t { none = 0 , XMinYMin = Min << 4 | Min , XMinYMid = Min << 4 | Mid , XMinYMax = Min << 4 | Max , XMidYMin = Mid << 4 | Min , XMidYMid = Mid << 4 | Mid , XMidYMax = Mid << 4 | Max , XMaxYMin = Max << 4 | Min , XMaxYMid = Max << 4 | Mid , XMaxYMax = Max << 4 | Max } |
| Combined X and Y alignment values for preserveAspectRatio. More... | |
| enum class | MeetOrSlice { Meet , Slice } |
| Meet-or-slice scaling strategy. More... | |
Public Member Functions | |
| PreserveAspectRatio ()=default | |
| Default constructor. Initializes to xMidYMid meet. | |
| PreserveAspectRatio (std::string_view aString) | |
| Construct from a string representation. | |
| Align | GetAlign () const |
| Get the alignment value. | |
| MinMidMax | GetAlignX () const |
| Get the X-axis alignment component. | |
| MinMidMax | GetAlignY () const |
| Get the Y-axis alignment component. | |
| MeetOrSlice | GetMeetOrSlice () const |
| Get the meet-or-slice strategy. | |
SVG preserveAspectRatio attribute.
Controls how an SVG element with a viewBox is scaled and aligned within its viewport. See the SVG specification for details.
| enum AeonGUI::PreserveAspectRatio::Align : uint8_t |
Combined X and Y alignment values for preserveAspectRatio.
| Enumerator | |
|---|---|
| none | Do not force uniform scaling. |
| XMinYMin | Align X-min, Y-min. |
| XMinYMid | Align X-min, Y-mid. |
| XMinYMax | Align X-min, Y-max. |
| XMidYMin | Align X-mid, Y-min. |
| XMidYMid | Align X-mid, Y-mid (default). |
| XMidYMax | Align X-mid, Y-max. |
| XMaxYMin | Align X-max, Y-min. |
| XMaxYMid | Align X-max, Y-mid. |
| XMaxYMax | Align X-max, Y-max. |
|
strong |
| enum AeonGUI::PreserveAspectRatio::MinMidMax : uint8_t |
| AeonGUI::PreserveAspectRatio::PreserveAspectRatio | ( | std::string_view | aString | ) |
Construct from a string representation.
| aString | A string such as "xMidYMid meet". |
| PreserveAspectRatio::Align AeonGUI::PreserveAspectRatio::GetAlign | ( | ) | const |
Get the alignment value.
| PreserveAspectRatio::MinMidMax AeonGUI::PreserveAspectRatio::GetAlignX | ( | ) | const |
Get the X-axis alignment component.
| PreserveAspectRatio::MinMidMax AeonGUI::PreserveAspectRatio::GetAlignY | ( | ) | const |
Get the Y-axis alignment component.
| PreserveAspectRatio::MeetOrSlice AeonGUI::PreserveAspectRatio::GetMeetOrSlice | ( | ) | const |
Get the meet-or-slice strategy.