162 uint8_t
m_red, m_green, m_blue, m_alpha;
237 Lightgoldenrodyellow,
317 Color() : m_red(0), m_green(0), m_blue(0), m_alpha(255) { }
320 Color(uint8_t r, uint8_t g, uint8_t b, uint8_t a = 255) : m_red(r), m_green(g), m_blue(b), m_alpha(a) { }
323 Color(
int r,
int g,
int b,
int a = 255) : m_red((uint8_t)r), m_green((uint8_t)g), m_blue((uint8_t)b), m_alpha((uint8_t)a) { }
329 Color(
const string &str) { fromString(str); }
332 Color(
const char *str) { fromString(
string(str)); }
335 uint8_t
red()
const {
return m_red; }
338 uint8_t
green()
const {
return m_green; }
341 uint8_t
blue()
const {
return m_blue; }
344 uint8_t
alpha()
const {
return m_alpha; }
347 void red(uint8_t r) { m_red = r; }
350 void green(uint8_t g) { m_green = g; }
353 void blue(uint8_t b) { m_blue = b; }
356 void alpha(uint8_t a) { m_alpha = a; }
367 bool fromString(
const string &str);
inverted parallelogram (slanted to the left)
uint8_t red() const
Returns the red component.
Color(int r, int g, int b, int a=255)
Creates a color from given RGBA-values.
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
parallelogram (slanted to the right)
trapeze (upper side shorter)
Color(uint8_t r, uint8_t g, uint8_t b, uint8_t a=255)
Creates a color from given RGBA-values.
StrokeLineCap
Line cap types of strokes.
line style "dash dot dot dash dot dot ..."
StrokeLineJoin
Line join types of strokes.
FillPattern
Fill patterns.
EdgeArrow
Types for edge arrows.
isosceles triangle (base side down)
uint8_t green() const
Returns the green component.
edge arrow at target and source node of the edge
rectangle with rounded corners
ostream & operator<<(ostream &os, const ogdf::Array< E, INDEX > &a)
Prints array a to output stream os.
float m_width
stroke width
string toString() const
Converts the color to a string and returns it.
FillPattern m_pattern
fill pattern
Shape
Types for node shapes.
Fill(Color c, FillPattern pattern)
StrokeLineJoin m_join
line-join of the stroke
uint8_t alpha() const
Returns the alpha channel.
std::string toString(const Attribute &attr)
isosceles triangle (base side up)
bool operator!=(const Color &c) const
Returns true iff c and this color differ in any component.
Colors represented as RGBA values.
bool operator==(const Color &c) const
Returns true iff c and this color are equal in every component.
FillPattern intToFillPattern(int i)
Converts integer i to fill pattern.
edge arrow at target node of the edge
Color(const string &str)
Crates a color from string str.
line style "dash dot dash dot ..."
uint8_t blue() const
Returns the blue component.
Color(const char *str)
Crates a color from string str.
void blue(uint8_t b)
Sets the blue component to b.
StrokeType intToStrokeType(int i)
Converts integer i to stroke type.
Basic declarations, included by all source files.
Name
Named colors (same as SVG color keywords).
StrokeType m_type
stroke type (e.g.
Fill(Color c, Color bgColor, FillPattern pattern)
void green(uint8_t g)
Sets the green component to g.
StrokeType
Line types of strokes.
edge arrow at source node of the edge
The namespace for all OGDF objects.
Color m_color
stroke color
void alpha(uint8_t a)
Sets the alpha channel to a.
Color()
Creates an opaque black color.
Color m_bgColor
background color of fill pattern
StrokeLineCap m_cap
line-cap of the stroke
friend ostream & operator<<(ostream &os, const Color &c)
Writes the string representation of color c to output stream os.
bool operator==(const Tuple2< E1, E2 > &t1, const Tuple2< E1, E2 > &t2)
Equality operator for 2-tuples.
void red(uint8_t r)
Sets the red component to r.
inverted trapeze (upper side longer)