Color

A #GdkColor is used to describe a color, similar to the XColor struct used in the X11 drawing API.

More...

Constructors

this
this(GdkColor* gdkColor, bool ownedRef)

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

this
this()
this(ubyte red, ubyte green, ubyte blue)
this(ushort red, ushort green, ushort blue)

Creates a new Color

Destructor

~this
~this()
Undocumented in source.

Members

Functions

blue
ushort blue()
void blue(ushort value)

The color values.

copy
Color copy()

Makes a copy of a #GdkColor.

equal
bool equal(Color colorb)

Compares two colors.

free
void free()

Frees a #GdkColor created with gdk_color_copy().

getColorStruct
GdkColor* getColorStruct()

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

green
ushort green()
void green(ushort value)

The color values.

hash
uint hash()

A hash function suitable for using for a hash table that stores #GdkColors.

pixel
uint pixel()

The color values.

red
ushort red()
void red(ushort value)

The color values.

toString
string toString()

Returns a textual specification of @color in the hexadecimal form “\#rrrrggggbbbb” where “r”, “g” and “b” are hex digits representing the red, green and blue components respectively.

Static functions

getType
GType getType()
parse
bool parse(string spec, Color color)

Parses a textual specification of a color and fill in the @red, @green, and @blue fields of a #GdkColor.

Variables

gdkColor
GdkColor* gdkColor;

the main Gtk struct

ownedRef
bool ownedRef;
Undocumented in source.

Detailed Description

Deprecated: Use #GdkRGBA

Meta