PgColor

The gdk.Color structure is used to represent a color in an uncalibrated RGB color-space.

Constructors

this
this(PangoColor* pangoColor, bool ownedRef)

Sets our main struct and passes it to the parent class.

Destructor

A destructor is present on this object, but not explicitly documented in the source.

Members

Functions

copy
PgColor copy()

Creates a copy of src, which should be freed with Color.free. Primarily used by language bindings, not that useful otherwise (since colors can just be copied by assignment in C).

free
void free()

Frees a color allocated by Color.copy.

getPgColorStruct
PangoColor* getPgColorStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

parse
bool parse(string spec)

Fill in the fields of a color from a string specification. The string can either one of a large set of standard names. (Taken from the CSS <ulink url="http://dev.w3.org/csswg/css-color/[named-color|named-colors]">specification</ulink>), or it can be a hexadecimal value in the form '&num;rgb' '&num;rrggbb' '&num;rrrgggbbb' or '&num;rrrrggggbbbb' where 'r', 'g' and 'b' are hex digits of the red, green, and blue components of the color, respectively. (White in the four forms is '&num;fff' '&num;ffffff' '&num;fffffffff' and '&num;ffffffffffff')

toString
string toString()

Returns a textual specification of color in the hexadecimal form <literal>&num;rrrrggggbbbb</literal>, where <literal>r</literal>, <literal>g</literal> and <literal>b</literal> are hex digits representing the red, green, and blue components respectively.

Properties

blue
ushort blue [@property getter]
ushort blue [@property setter]

value of blue component

green
ushort green [@property getter]
ushort green [@property setter]

value of green component

red
ushort red [@property getter]
ushort red [@property setter]

value of red component

Static functions

getType
GType getType()

Variables

pangoColor
PangoColor* pangoColor;

the main Gtk struct