15 d2Color(
float rIn,
float gIn,
float bIn,
float aIn = 1.0f)
23 void Set(
float rIn,
float gIn,
float bIn,
float aIn = 1.0f)
34 return d2Color(r * f, g * f, b * f, a * f);
50 return {r / f, g / f, b / f, a / f};
63 float r{}, g{}, b{}, a{1.0f};
78 e_aabbTreeBit = 0x0008,
79 e_transformBit = 0x0010,
83 void SetFlags(
uint32 flags);
87 void AppendFlags(
uint32 flags);
89 void ClearFlags(
uint32 flags);
void SetFlags(uint32 flags)
Definition d2Draw.h:108
virtual void DrawSolidPolygon(const d2Vec2 *vertices, int32 vertexCount, const float &angle, const bool &mesh, const d2Color &color) const =0
virtual void DrawPolygon(const d2Vec2 *vertices, int32 vertexCount, const float &angle, const d2Color &color) const =0
uint32 m_flags
Definition d2Draw.h:104
virtual void DrawSolidCircle(const d2Vec2 ¢er, float radius, const float &angle, const d2Color &color) const =0
void ClearFlags(uint32 flags)
Definition d2Draw.h:126
virtual void DrawCircle(const d2Vec2 ¢er, float radius, const float &angle, const d2Color &color) const =0
virtual void DrawSegment(const d2Vec2 &p1, const d2Vec2 &p2, const d2Color &color) const =0
virtual void DrawTransform(const d2Transform &transform) const =0
uint32 GetFlags() const
Definition d2Draw.h:114
virtual ~d2Draw()
Definition d2Draw.h:71
void AppendFlags(uint32 flags)
Definition d2Draw.h:120
unsigned int uint32
Definition d2Types.h:9
signed int int32
Definition d2Types.h:6
#define D2_API
Definition d2api.h:27
d2Color & operator*=(const float &f)
Definition d2Draw.h:38
d2Color operator*(const float &f) const
Definition d2Draw.h:32
d2Color operator/(const float &f) const
Definition d2Draw.h:48
d2Color & operator/=(const float &f)
Definition d2Draw.h:54
void Set(float rIn, float gIn, float bIn, float aIn=1.0f)
Definition d2Draw.h:23
d2Color(float rIn, float gIn, float bIn, float aIn=1.0f)
Definition d2Draw.h:15
Represents a 2D vector.
Definition d2Math.h:22