#include "GradientPainter2D.h"
Public Member Functions | |
GradientPainter2D () | |
GradientPainter2D (const std::vector< GradientPainterStop2D > &_stops) | |
virtual | ~GradientPainter2D () |
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 ot::Color | getDefaultColor (void) const override |
virtual bool | isEqualTo (const Painter2D *_other) const override |
Returns true if this painter is equal to the other painter. | |
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 () |
virtual std::string | getFactoryKey (void) const =0 |
Returns the unique Painter2D type name that is used in the Painter2DFactory. | |
virtual std::string | generateQss (void) const =0 |
Painter2D * | createCopy (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. | |
Protected Member Functions | |
void | addStopsAndSpreadToQss (std::string &_targetString) const |
ot::GradientPainter2D::GradientPainter2D | ( | ) |
ot::GradientPainter2D::GradientPainter2D | ( | const std::vector< GradientPainterStop2D > & | _stops | ) |
|
virtual |
void ot::GradientPainter2D::addStop | ( | const GradientPainterStop2D & | _stop | ) |
|
inline |
void ot::GradientPainter2D::addStops | ( | const std::vector< GradientPainterStop2D > & | _stops | ) |
|
protected |
|
overridevirtual |
Add the object contents to the provided JSON object.
_document | The JSON document (used to get the allocator) |
_object | The JSON object to add the contents to |
Reimplemented from ot::Painter2D.
Reimplemented in ot::LinearGradientPainter2D, and ot::RadialGradientPainter2D.
|
overridevirtual |
Implements ot::Painter2D.
|
inline |
|
inline |
|
overridevirtual |
Returns true if this painter is equal to the other painter.
Implements ot::Painter2D.
Reimplemented in ot::LinearGradientPainter2D, and ot::RadialGradientPainter2D.
|
overridevirtual |
Will set the object contents from the provided JSON object.
_object | The JSON object containing the information |
Will | throw an exception if the provided object is not valid (members missing or invalid types) |
Reimplemented from ot::Painter2D.
Reimplemented in ot::LinearGradientPainter2D, and ot::RadialGradientPainter2D.
|
inline |
|
inline |