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

#include "RadialGradientPainter2D.h"

Inheritance diagram for ot::RadialGradientPainter2D:
ot::GradientPainter2D ot::Painter2D ot::Serializable

Public Member Functions

 RadialGradientPainter2D ()
 
virtual ~RadialGradientPainter2D ()
 
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.
 
virtual std::string getFactoryKey (void) const override
 Returns the key that is used to create an instance of this class in the simple factory.
 
virtual std::string generateQss (void) const override
 
virtual bool isEqualTo (const Painter2D *_other) const override
 Returns true if this painter is equal to the other painter.
 
void setCenterPoint (const ot::Point2DD &_center)
 Set the center point for the gradient.
 
const ot::Point2DDgetCenterPoint (void) const
 
void setCenterRadius (double _r)
 
double getCenterRadius (void) const
 
void setFocalPoint (const ot::Point2DD &_focal)
 Set the focal point for the gradient.
 
const ot::Point2DDgetFocalPoint (void) const
 
void setFocalRadius (double _r)
 Set the focal radius Note that the focal point needs to be set.
 
double getFocalRadius (void) const
 
bool isFocalPointSet (void) const
 
- Public Member Functions inherited from ot::GradientPainter2D
 GradientPainter2D ()
 
 GradientPainter2D (const std::vector< GradientPainterStop2D > &_stops)
 
virtual ~GradientPainter2D ()
 
virtual ot::Color getDefaultColor (void) const override
 
void addStop (double _pos, const ot::Color &_color)
 
void addStop (const GradientPainterStop2D &_stop)
 
void addStops (const std::vector< GradientPainterStop2D > &_stops)
 
void setStops (const std::vector< GradientPainterStop2D > &_stops)
 
const std::vector< GradientPainterStop2D > & getStops (void) const
 
void setSpread (GradientSpread _spread)
 
GradientSpread getSpread (void) const
 
- Public Member Functions inherited from ot::Painter2D
 Painter2D ()
 
virtual ~Painter2D ()
 
Painter2DcreateCopy (void) const
 Creates a copy of this painter.
 
- 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.
 

Additional Inherited Members

- Protected Member Functions inherited from ot::GradientPainter2D
void addStopsAndSpreadToQss (std::string &_targetString) const
 

Constructor & Destructor Documentation

◆ RadialGradientPainter2D()

ot::RadialGradientPainter2D::RadialGradientPainter2D ( )

◆ ~RadialGradientPainter2D()

ot::RadialGradientPainter2D::~RadialGradientPainter2D ( )
virtual

Member Function Documentation

◆ addToJsonObject()

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

Reimplemented from ot::GradientPainter2D.

◆ generateQss()

std::string ot::RadialGradientPainter2D::generateQss ( void ) const
overridevirtual

Implements ot::Painter2D.

◆ getCenterPoint()

const ot::Point2DD & ot::RadialGradientPainter2D::getCenterPoint ( void ) const
inline

◆ getCenterRadius()

double ot::RadialGradientPainter2D::getCenterRadius ( void ) const
inline

◆ getFactoryKey()

virtual std::string ot::RadialGradientPainter2D::getFactoryKey ( void ) const
inlineoverridevirtual

Returns the key that is used to create an instance of this class in the simple factory.

Implements ot::Painter2D.

◆ getFocalPoint()

const ot::Point2DD & ot::RadialGradientPainter2D::getFocalPoint ( void ) const
inline

◆ getFocalRadius()

double ot::RadialGradientPainter2D::getFocalRadius ( void ) const
inline

◆ isEqualTo()

bool ot::RadialGradientPainter2D::isEqualTo ( const Painter2D * _other) const
overridevirtual

Returns true if this painter is equal to the other painter.

Reimplemented from ot::GradientPainter2D.

◆ isFocalPointSet()

bool ot::RadialGradientPainter2D::isFocalPointSet ( void ) const
inline

◆ setCenterPoint()

void ot::RadialGradientPainter2D::setCenterPoint ( const ot::Point2DD & _center)
inline

Set the center point for the gradient.

◆ setCenterRadius()

void ot::RadialGradientPainter2D::setCenterRadius ( double _r)
inline

◆ setFocalPoint()

void ot::RadialGradientPainter2D::setFocalPoint ( const ot::Point2DD & _focal)

Set the focal point for the gradient.

◆ setFocalRadius()

void ot::RadialGradientPainter2D::setFocalRadius ( double _r)
inline

Set the focal radius Note that the focal point needs to be set.

◆ setFromJsonObject()

void ot::RadialGradientPainter2D::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)

Reimplemented from ot::GradientPainter2D.


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