Top | ![]() |
![]() |
![]() |
![]() |
gchar * | gimp_palette_new () |
gchar * | gimp_palette_duplicate () |
gchar * | gimp_palette_rename () |
gboolean | gimp_palette_delete () |
gboolean | gimp_palette_get_info () |
GimpRGB * | gimp_palette_get_colors () |
gint | gimp_palette_get_columns () |
gboolean | gimp_palette_set_columns () |
gboolean | gimp_palette_add_entry () |
gboolean | gimp_palette_delete_entry () |
gboolean | gimp_palette_entry_get_color () |
gboolean | gimp_palette_entry_set_color () |
gboolean | gimp_palette_entry_get_name () |
gboolean | gimp_palette_entry_set_name () |
gboolean | gimp_palette_is_editable () |
gchar *
gimp_palette_new (const gchar *name
);
Creates a new palette
This procedure creates a new, uninitialized palette
The actual new palette name.
The returned value must be freed with g_free()
.
[transfer full]
Since: 2.2
gchar *
gimp_palette_duplicate (const gchar *name
);
Duplicates a palette
This procedure creates an identical palette by a different name
The name of the palette's copy.
The returned value must be freed with g_free()
.
[transfer full]
Since: 2.2
gchar * gimp_palette_rename (const gchar *name
,const gchar *new_name
);
Rename a palette
This procedure renames a palette
The actual new name of the palette.
The returned value must be freed with g_free()
.
[transfer full]
Since: 2.2
gboolean
gimp_palette_delete (const gchar *name
);
Deletes a palette
This procedure deletes a palette
Since: 2.2
gboolean gimp_palette_get_info (const gchar *name
,gint *num_colors
);
Retrieve information about the specified palette.
This procedure retrieves information about the specified palette. This includes the name, and the number of colors.
Since: 2.2
GimpRGB * gimp_palette_get_colors (const gchar *name
,gint *num_colors
);
Gets all colors from the specified palette.
This procedure retrieves all color entries of the specified palette.
The colors in the palette.
The returned value must be freed with g_free()
.
[array length=num_colors][element-type GimpRGB][transfer full]
Since: 2.6
gint
gimp_palette_get_columns (const gchar *name
);
Retrieves the number of columns to use to display this palette
This procedures retrieves the preferred number of columns to use when the palette is being displayed.
Since: 2.4
gboolean gimp_palette_set_columns (const gchar *name
,gint columns
);
Sets the number of columns to use when displaying the palette
This procedures controls how many colors are shown per row when the palette is being displayed. This value can only be changed if the palette is writable. The maximum allowed value is 64.
Since: 2.4
gboolean gimp_palette_add_entry (const gchar *name
,const gchar *entry_name
,const GimpRGB *color
,gint *entry_num
);
Adds a palette entry to the specified palette.
This procedure adds an entry to the specified palette. It returns an error if the entry palette does not exist.
name |
The palette name. |
|
entry_name |
The name of the entry. |
|
color |
The new entry's color color. |
|
entry_num |
The index of the added entry. |
[out] |
Since: 2.2
gboolean gimp_palette_delete_entry (const gchar *name
,gint entry_num
);
Deletes a palette entry from the specified palette.
This procedure deletes an entry from the specified palette. It returns an error if the entry palette does not exist.
Since: 2.2
gboolean gimp_palette_entry_get_color (const gchar *name
,gint entry_num
,GimpRGB *color
);
Gets the specified palette entry from the specified palette.
This procedure retrieves the color of the zero-based entry specified for the specified palette. It returns an error if the entry does not exist.
name |
The palette name. |
|
entry_num |
The entry to retrieve. |
|
color |
The color requested. |
[out caller-allocates] |
Since: 2.2
gboolean gimp_palette_entry_set_color (const gchar *name
,gint entry_num
,const GimpRGB *color
);
Sets the specified palette entry in the specified palette.
This procedure sets the color of the zero-based entry specified for the specified palette. It returns an error if the entry does not exist.
Since: 2.2
gboolean gimp_palette_entry_get_name (const gchar *name
,gint entry_num
,gchar **entry_name
);
Gets the specified palette entry from the specified palette.
This procedure retrieves the name of the zero-based entry specified for the specified palette. It returns an error if the entry does not exist.
name |
The palette name. |
|
entry_num |
The entry to retrieve. |
|
entry_name |
The name requested. |
[out][transfer full] |
Since: 2.2
gboolean gimp_palette_entry_set_name (const gchar *name
,gint entry_num
,const gchar *entry_name
);
Sets the specified palette entry in the specified palette.
This procedure sets the name of the zero-based entry specified for the specified palette. It returns an error if the entry does not exist.
Since: 2.2
gboolean
gimp_palette_is_editable (const gchar *name
);
Tests if palette can be edited
Returns TRUE if you have permission to change the palette
Since: 2.4