27 #include <libvisual/lvconfig.h>
28 #include <libvisual/lv_defines.h>
29 #include <libvisual/lv_color.h>
48 std::vector<Color> colors;
55 explicit Palette (
unsigned int ncolors);
60 : colors (std::move (palette.colors))
69 colors.swap (rhs.colors);
75 return colors.empty ();
78 unsigned int size ()
const
80 return colors.size ();
98 void allocate_colors (
unsigned int size);
112 Color color_cycle (
float rate);
114 int find_color (
Color const& color)
const;
119 #endif // __cplusplus
130 LV_API
VisPalette *visual_palette_new (
unsigned int ncolors);
132 LV_API
void visual_palette_free (
VisPalette *palette);
142 LV_API
unsigned int visual_palette_get_size (
VisPalette *pal);