GDS-Render v1.2.1
|
Class representing a color palette. More...
#include <glib.h>
#include <gtk/gtk.h>
Go to the source code of this file.
Macros | |
#define | TYPE_GDS_RENDER_COLOR_PALETTE (color_palette_get_type()) |
Functions | |
G_BEGIN_DECLS | G_DECLARE_FINAL_TYPE (ColorPalette, color_palette, GDS_RENDER, COLOR_PALETTE, GObject) |
ColorPalette * | color_palette_new_from_resource (char *resource_name) |
Create a new object with from a resource containing the html hex color scheme. More... | |
GdkRGBA * | color_palette_get_color (ColorPalette *palette, GdkRGBA *color, unsigned int index) |
Get the n-th color in the palette identified by the index. More... | |
unsigned int | color_palette_get_color_count (ColorPalette *palette) |
Return amount of stored colors in palette . More... | |
Class representing a color palette.
Definition in file color-palette.h.
#define TYPE_GDS_RENDER_COLOR_PALETTE (color_palette_get_type()) |
Definition at line 36 of file color-palette.h.
GdkRGBA * color_palette_get_color | ( | ColorPalette * | palette, |
GdkRGBA * | color, | ||
unsigned int | index | ||
) |
Get the n-th color in the palette identified by the index.
This function fills the nth color into the supplied color
. color
is returned.
If color
is NULL, a new GdkRGBA is created and returned. This element must be freed afterwards.
palette | Color palette |
color | GdkRGBA struct to fill data in. May be NULL. |
index | Index of color. Starts at 0 |
color
is NULL, the returned color must be freed afterwards Definition at line 199 of file color-palette.c.
unsigned int color_palette_get_color_count | ( | ColorPalette * | palette | ) |
Return amount of stored colors in palette
.
palette | Color palette |
Definition at line 223 of file color-palette.c.
ColorPalette * color_palette_new_from_resource | ( | char * | resource_name | ) |
Create a new object with from a resource containing the html hex color scheme.
resource_name | Name of the resource |
Definition at line 188 of file color-palette.c.
G_BEGIN_DECLS G_DECLARE_FINAL_TYPE | ( | ColorPalette | , |
color_palette | , | ||
GDS_RENDER | , | ||
COLOR_PALETTE | , | ||
GObject | |||
) |