Om
1.0.0
A universal framework for multimedia simulation
|
A class that represents a 4-sided margin for a rectangular GUI object. More...
#include <omGraphicsGUIMargin.h>
Public Member Functions | |
Margin () | |
Create a new default margin object that has a width on all sides of 0. More... | |
Margin (Float newMargin) | |
Create a new margin object using the specified margin size for all sides. More... | |
Margin (Float newLeft, Float newRight, Float newBottom, Float newTop) | |
Create a new margin object using the specified sizes for each rectangular side. More... | |
void | setSize (Float newSize) |
Set all of the sides for this margin to have the specified size. More... | |
AABB2f | getInnerBounds (const AABB2f &bounds) const |
Return the bounding box for the specified area if this margin is applied inwardly. More... | |
Vector2f | getInnerSize (const Vector2f &outerSize) const |
Return the size of the inner bounding box for the specified outer box size if this margin is applied inwardly. More... | |
AABB2f | getOuterBounds (const AABB2f &bounds) const |
Return the bounding box for the specified area if this margin is applied externally. More... | |
Vector2f | getOuterSize (const Vector2f &innerSize) const |
Return the size of the outside bounding box for the specified inner box size if this margin is applied externally. More... | |
Margin | operator* (Float scale) const |
Scale this margin on all sides by the specified value and return the result. More... | |
Margin | operator* (const Vector2f &scale) const |
Scale this margin on all sides by the specified vector scaling and return the result. More... | |
Margin & | operator*= (Float scale) |
Scale this margin on all sides by the specified value and store the result. More... | |
Margin & | operator*= (const Vector2f &scale) |
Scale this margin on all sides by the specified vector scaling and store the result. More... | |
Public Attributes | |
Float | left |
The size of the left-side margin. More... | |
Float | right |
The size of the right-side margin. More... | |
Float | bottom |
The size of the bottom-side margin. More... | |
Float | top |
The size of the top-side margin. More... | |
A class that represents a 4-sided margin for a rectangular GUI object.
Each side of the rectangle can have a different margin width.
|
inline |
Create a new default margin object that has a width on all sides of 0.
|
inline |
Create a new margin object using the specified margin size for all sides.
|
inline |
Create a new margin object using the specified sizes for each rectangular side.
|
inline |
Set all of the sides for this margin to have the specified size.
Return the bounding box for the specified area if this margin is applied inwardly.
This method shrinks the specified bounding box by the margin and returns the resulting bounding box.
Return the size of the inner bounding box for the specified outer box size if this margin is applied inwardly.
This method shrinks the specified box size by the margin and returns the resulting box size .
Return the bounding box for the specified area if this margin is applied externally.
This method grows the specified bounding box by the margin and returns the resulting bounding box.
Return the size of the outside bounding box for the specified inner box size if this margin is applied externally.
This method grows the specified box size by the margin and returns the resulting box size .
Scale this margin on all sides by the specified value and return the result.
Scale this margin on all sides by the specified vector scaling and return the result.
Scale this margin on all sides by the specified value and store the result.
Scale this margin on all sides by the specified vector scaling and store the result.
Float om::graphics::gui::base::Margin::left |
The size of the left-side margin.
Float om::graphics::gui::base::Margin::right |
The size of the right-side margin.
Float om::graphics::gui::base::Margin::bottom |
The size of the bottom-side margin.
Float om::graphics::gui::base::Margin::top |
The size of the top-side margin.