OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
GradientPainterStop2D.h
Go to the documentation of this file.
1
4// ###########################################################################################################################################################################################################################################################################################################################
5
6#pragma once
7
8// OpenTwin header
9#include "OTCore/Color.h"
10#include "OTCore/Serializable.h"
12
13namespace ot {
14
16 public:
18 GradientPainterStop2D(double _pos, const ot::Color& _color);
20 virtual ~GradientPainterStop2D();
21
22 GradientPainterStop2D& operator = (const GradientPainterStop2D& _other);
23 bool operator == (const GradientPainterStop2D& _other) const;
24 bool operator != (const GradientPainterStop2D& _other) const;
25
29 virtual void addToJsonObject(JsonValue& _object, JsonAllocator& _allocator) const override;
30
34 virtual void setFromJsonObject(const ConstJsonObject& _object) override;
35
37 void setPos(double _pos) { m_pos = _pos; };
38 double getPos(void) const { return m_pos; };
39
40 void setColor(const ot::Color& _color) { m_color = _color; };
41 const ot::Color& getColor(void) const { return m_color; };
42
43 private:
44 double m_pos;
45 ot::Color m_color;
46 };
47}
48
bool operator==(const FaceSelection &left, const FaceSelection &right)
Definition Model.cpp:55
#define OT_GUI_API_EXPORT
Definition OTGuiAPIExport.h:9
The Color class is used to represent RGBA colors with integer values.
Definition Color.h:72
Definition GradientPainterStop2D.h:15
void setPos(double _pos)
Set postion of the gradient stop (0.0 - 1.0)
Definition GradientPainterStop2D.h:37
void setColor(const ot::Color &_color)
Definition GradientPainterStop2D.h:40
const ot::Color & getColor(void) const
Definition GradientPainterStop2D.h:41
double getPos(void) const
Definition GradientPainterStop2D.h:38
The Serializable class is the default interface of serializable objects.
Definition Serializable.h:17
Definition Connector.h:8
rapidjson::Value JsonValue
Writable JSON value.
Definition JSON.h:27
rapidjson::GenericObject< true, rapidjson::GenericValue< rapidjson::UTF8<>, rapidjson::MemoryPoolAllocator< rapidjson::CrtAllocator > > > ConstJsonObject
Read only JSON Object.
Definition JSON.h:35
rapidjson::MemoryPoolAllocator< rapidjson::CrtAllocator > JsonAllocator
Allocator used for writing to JSON values.
Definition JSON.h:30