GDS-Render v1.2.1
color-palette.h
Go to the documentation of this file.
1/*
2 * GDSII-Converter
3 * Copyright (C) 2019 Mario Hüttel <mario.huettel@gmx.net>
4 *
5 * This file is part of GDSII-Converter.
6 *
7 * GDSII-Converter is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 *
11 * GDSII-Converter is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with GDSII-Converter. If not, see <http://www.gnu.org/licenses/>.
18 */
19
26#ifndef _COLOR_PALETTE_H_
27#define _COLOR_PALETTE_H_
28
29#include <glib.h>
30#include <gtk/gtk.h>
31
32G_BEGIN_DECLS
33
34G_DECLARE_FINAL_TYPE(ColorPalette, color_palette, GDS_RENDER, COLOR_PALETTE, GObject);
35
36#define TYPE_GDS_RENDER_COLOR_PALETTE (color_palette_get_type())
37
43ColorPalette *color_palette_new_from_resource(char *resource_name);
44
59GdkRGBA *color_palette_get_color(ColorPalette *palette, GdkRGBA *color, unsigned int index);
60
66unsigned int color_palette_get_color_count(ColorPalette *palette);
67
68G_END_DECLS
69
70#endif /* _COLOR_PALETTE_H_ */
unsigned int color_palette_get_color_count(ColorPalette *palette)
Return amount of stored colors in palette.
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.
GdkRGBA * color_palette_get_color(ColorPalette *palette, GdkRGBA *color, unsigned int index)
Get the n-th color in the palette identified by the index.