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

#include "GradientPainterStop2D.h"

Inheritance diagram for ot::GradientPainterStop2D:
ot::Serializable

Public Member Functions

 GradientPainterStop2D ()
 
 GradientPainterStop2D (double _pos, const ot::Color &_color)
 
 GradientPainterStop2D (const GradientPainterStop2D &_other)
 
virtual ~GradientPainterStop2D ()
 
GradientPainterStop2Doperator= (const GradientPainterStop2D &_other)
 
bool operator== (const GradientPainterStop2D &_other) const
 
bool operator!= (const GradientPainterStop2D &_other) const
 
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 setPos (double _pos)
 Set postion of the gradient stop (0.0 - 1.0)
 
double getPos (void) const
 
void setColor (const ot::Color &_color)
 
const ot::ColorgetColor (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.
 

Constructor & Destructor Documentation

◆ GradientPainterStop2D() [1/3]

ot::GradientPainterStop2D::GradientPainterStop2D ( )

◆ GradientPainterStop2D() [2/3]

ot::GradientPainterStop2D::GradientPainterStop2D ( double _pos,
const ot::Color & _color )

◆ GradientPainterStop2D() [3/3]

ot::GradientPainterStop2D::GradientPainterStop2D ( const GradientPainterStop2D & _other)

◆ ~GradientPainterStop2D()

ot::GradientPainterStop2D::~GradientPainterStop2D ( )
virtual

Member Function Documentation

◆ addToJsonObject()

void ot::GradientPainterStop2D::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

◆ getColor()

const ot::Color & ot::GradientPainterStop2D::getColor ( void ) const
inline

◆ getPos()

double ot::GradientPainterStop2D::getPos ( void ) const
inline

◆ operator!=()

bool ot::GradientPainterStop2D::operator!= ( const GradientPainterStop2D & _other) const

◆ operator=()

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

◆ operator==()

bool ot::GradientPainterStop2D::operator== ( const GradientPainterStop2D & _other) const

◆ setColor()

void ot::GradientPainterStop2D::setColor ( const ot::Color & _color)
inline

◆ setFromJsonObject()

void ot::GradientPainterStop2D::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.

◆ setPos()

void ot::GradientPainterStop2D::setPos ( double _pos)
inline

Set postion of the gradient stop (0.0 - 1.0)


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