9#include <SFML/Graphics/CircleShape.hpp>
28 unsigned char m_r,m_g,
m_b;
54 void setColor(
unsigned char r,
unsigned char g,
unsigned char b);
70 int serialize(std::stringstream *p_ss)
const;
74 int deserialize(std::stringstream *p_ss);
78 bool operator!=(
const Shape &s);
81 std::string toString()
const;
float getSize() const
Get size (in pixels).
unsigned char m_opacity
Opacity (transparent) 0 to 255 (opaque).
Definition: Shape.h:31
void setType(ShapeType new_type)
Set type.
float m_size
Radius size (in pixels).
Definition: Shape.h:30
Shape()
Default is Circle, df::WHITE, size 1 character.
unsigned char m_b
RGB colors used if color is CUSTOM.
Definition: Shape.h:28
void draw(Vector world_pos)
Draw self at given world position.
unsigned char getOpacity() const
Get opacity (0 is transparent, 255 is opaque).
bool operator==(const Shape &s)
Compare two Shapes.
Color getColor() const
Get color. Returns Dragonfly Color.
void setColor(unsigned char r, unsigned char g, unsigned char b)
Set color, where input is RGB.
void setColor(Color new_color)
Set color, where input is Dragonfly Color.
void setOpacity(unsigned char new_opacity)
Set opacity (0 is transparent, 255 is opaque).
Color m_color
Shape color.
Definition: Shape.h:27
void setSize(float new_size)
Set size (in pixels).
ShapeType getType() const
Get type.
ShapeType m_type
Type of shape.
Definition: Shape.h:29
An animation for a sprite.
Definition: Animation.h:15
Color
Colors Dragonfly recognizes.
Definition: Color.h:11