Om  1.0.0
A universal framework for multimedia simulation
Public Member Functions | List of all members
om::graphics::gui::base::Border Class Reference

A class that describes information about the border for a rectangular region. More...

#include <omGraphicsGUIBorder.h>

Public Member Functions

 Border ()
 Create a new border with no width or radius. More...
 
 Border (const BorderType &newType, Float newWidth)
 Create a new border with the specified type and width. More...
 
 Border (const BorderType &newType, Float newWidth, Float newRadius)
 Create a new border with the specified type, width, and radius. More...
 
 Border (const BorderType &newType, Float newWidth, Float newRadius, const Margin &newFrame)
 Create a new border with the specified type, width, radius, and frame. More...
 
const BorderTypegetType () const
 Return an object representing the type of this border. More...
 
void setType (const BorderType &newType)
 Set the type of this border. More...
 
const MargingetMargin () const
 Return an object representing the frame of the border on all four sides. More...
 
void setMargin (const Margin &newFrame)
 Set an object representing the frame of the border on all four sides. More...
 
Float getWidth () const
 Return the thickness of this border. More...
 
void setWidth (Float newWidth)
 Set the thickness of this border. More...
 
Float getRadius () const
 Return the radius of this border's rounded corners. More...
 
void setRadius (Float newRadius)
 Return the radius of this border's rounded corners. More...
 
AABB2f getContentBounds (const AABB2f &borderBounds) const
 Return the bounding box for the inner content area of the border's given rectangular region. More...
 
Margin getContentFrame () const
 Return the frame for the inner content area of the border's given rectangular region. More...
 
Border scale (const Vector2f &scale) const
 Scale this border by the specified 2D scaling amount and return the resulting scaled border. More...
 

Detailed Description

A class that describes information about the border for a rectangular region.

Constructor & Destructor Documentation

om::graphics::gui::base::Border::Border ( )
inline

Create a new border with no width or radius.

om::graphics::gui::base::Border::Border ( const BorderType newType,
Float  newWidth 
)
inline

Create a new border with the specified type and width.

The border's frame is set to be the border's width on all sides and the border's radius is set to be 0.

om::graphics::gui::base::Border::Border ( const BorderType newType,
Float  newWidth,
Float  newRadius 
)
inline

Create a new border with the specified type, width, and radius.

The border's frame is set to be the border's width on all sides.

om::graphics::gui::base::Border::Border ( const BorderType newType,
Float  newWidth,
Float  newRadius,
const Margin newFrame 
)
inline

Create a new border with the specified type, width, radius, and frame.

Member Function Documentation

const BorderType& om::graphics::gui::base::Border::getType ( ) const
inline

Return an object representing the type of this border.

void om::graphics::gui::base::Border::setType ( const BorderType newType)
inline

Set the type of this border.

const Margin& om::graphics::gui::base::Border::getMargin ( ) const
inline

Return an object representing the frame of the border on all four sides.

This object describes the frame inset at each side of the border.

void om::graphics::gui::base::Border::setMargin ( const Margin newFrame)
inline

Set an object representing the frame of the border on all four sides.

This object describes the frame inset at each side of the border.

Float om::graphics::gui::base::Border::getWidth ( ) const
inline

Return the thickness of this border.

void om::graphics::gui::base::Border::setWidth ( Float  newWidth)
inline

Set the thickness of this border.

Float om::graphics::gui::base::Border::getRadius ( ) const
inline

Return the radius of this border's rounded corners.

A radius of 0 will result in right-angled corners.

void om::graphics::gui::base::Border::setRadius ( Float  newRadius)
inline

Return the radius of this border's rounded corners.

A radius of 0 will result in right-angled corners.

AABB2f om::graphics::gui::base::Border::getContentBounds ( const AABB2f borderBounds) const
inline

Return the bounding box for the inner content area of the border's given rectangular region.

This rectangle is calculated based on the width of this border's frame and its border type. It is guaranteed to be the largest rectangle that can be placed within this border if it has the specified outside dimensions.

Margin om::graphics::gui::base::Border::getContentFrame ( ) const
inline

Return the frame for the inner content area of the border's given rectangular region.

This is the margin around the edge of the bordered area which indicates the inset for a content area. This basically returns the maximum width of the border for all 4 sides.

Border om::graphics::gui::base::Border::scale ( const Vector2f scale) const
inline

Scale this border by the specified 2D scaling amount and return the resulting scaled border.


The documentation for this class was generated from the following file: