OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
ot::BorderF Class Reference

The BorderF class is used to describe a border with four sides. The BorderF uses floating point values. More...

#include "Border.h"

Inheritance diagram for ot::BorderF:
ot::Serializable

Public Member Functions

 BorderF ()
 
 BorderF (const ot::Color &_color, double _width)
 
 BorderF (const ot::Color &_color, double _leftWidth, double _topWidth, double _rightWidth, double _bottomWidth)
 
 BorderF (const OutlineF &_left, const OutlineF &_top, const OutlineF &_right, const OutlineF &_bottom)
 
 BorderF (const BorderF &_other)
 
virtual ~BorderF ()
 
BorderFoperator= (const BorderF &_other)
 
virtual void addToJsonObject (JsonValue &_object, JsonAllocator &_allocator) const override
 Add the object contents to the provided JSON object.
 
virtual void setFromJsonObject (const ConstJsonObject &_object) override
 Will set the object contents from the provided JSON object.
 
void setColor (const ot::Color &_color)
 Will set the color for all four borders.
 
void setWidth (double _width)
 Will set the width for all four borders.
 
void setTop (const OutlineF &_s)
 Set the top border.
 
const OutlineFtop (void) const
 
void setLeft (const OutlineF &_s)
 
const OutlineFleft (void) const
 
void setRight (const OutlineF &_s)
 
const OutlineFright (void) const
 
void setBottom (const OutlineF &_s)
 
const OutlineFbottom (void) const
 
- Public Member Functions inherited from ot::Serializable
 Serializable ()
 
virtual ~Serializable ()
 
virtual void addToJsonObject (ot::JsonValue &_object, ot::JsonAllocator &_allocator) const =0
 Add the object contents to the provided JSON object.
 

Detailed Description

The BorderF class is used to describe a border with four sides. The BorderF uses floating point values.

Constructor & Destructor Documentation

◆ BorderF() [1/5]

ot::BorderF::BorderF ( )
inline

◆ BorderF() [2/5]

ot::BorderF::BorderF ( const ot::Color & _color,
double _width )

◆ BorderF() [3/5]

ot::BorderF::BorderF ( const ot::Color & _color,
double _leftWidth,
double _topWidth,
double _rightWidth,
double _bottomWidth )

◆ BorderF() [4/5]

ot::BorderF::BorderF ( const OutlineF & _left,
const OutlineF & _top,
const OutlineF & _right,
const OutlineF & _bottom )

◆ BorderF() [5/5]

ot::BorderF::BorderF ( const BorderF & _other)

◆ ~BorderF()

ot::BorderF::~BorderF ( )
virtual

Member Function Documentation

◆ addToJsonObject()

void ot::BorderF::addToJsonObject ( JsonValue & _object,
JsonAllocator & _allocator ) const
overridevirtual

Add the object contents to the provided JSON object.

Parameters
_documentThe JSON document (used to get the allocator)
_objectThe JSON object to add the contents to

◆ bottom()

const OutlineF & ot::BorderF::bottom ( void ) const
inline

◆ left()

const OutlineF & ot::BorderF::left ( void ) const
inline

◆ operator=()

ot::BorderF & ot::BorderF::operator= ( const BorderF & _other)

◆ right()

const OutlineF & ot::BorderF::right ( void ) const
inline

◆ setBottom()

void ot::BorderF::setBottom ( const OutlineF & _s)
inline

◆ setColor()

void ot::BorderF::setColor ( const ot::Color & _color)

Will set the color for all four borders.

Parameters
_colorColor to set.

◆ setFromJsonObject()

void ot::BorderF::setFromJsonObject ( const ConstJsonObject & _object)
overridevirtual

Will set the object contents from the provided JSON object.

Parameters
_objectThe JSON object containing the information
Exceptions
Willthrow an exception if the provided object is not valid (members missing or invalid types)

Implements ot::Serializable.

◆ setLeft()

void ot::BorderF::setLeft ( const OutlineF & _s)
inline

◆ setRight()

void ot::BorderF::setRight ( const OutlineF & _s)
inline

◆ setTop()

void ot::BorderF::setTop ( const OutlineF & _s)
inline

Set the top border.

◆ setWidth()

void ot::BorderF::setWidth ( double _width)

Will set the width for all four borders.

Parameters
_widthWidth to set.

◆ top()

const OutlineF & ot::BorderF::top ( void ) const
inline

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