![]() |
![]() |
![]() |
GOffice Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Properties |
GogAxisColorMap; GogAxisColorMap * gog_axis_color_map_edit (GogAxisColorMap *map
,GOCmdContext *cc
); void (*GogAxisColorMapHandler) (GogAxisColorMap const *map
,gpointer user_data
); gboolean gog_axis_color_map_delete (GogAxisColorMap *map
); GogAxisColorMap * gog_axis_color_map_dup (GogAxisColorMap const *map
); void gog_axis_color_map_foreach (GogAxisColorMapHandler handler
,gpointer user_data
); GogAxisColorMap * gog_axis_color_map_from_colors (char const *name
,unsigned nb
,GOColor const *colors
,GoResourceType type
); GOColor gog_axis_color_map_get_color (GogAxisColorMap const *map
,double x
); GogAxisColorMap const * gog_axis_color_map_get_from_id (char const *id
); unsigned gog_axis_color_map_get_max (GogAxisColorMap const *map
); char const * gog_axis_color_map_get_id (GogAxisColorMap const *map
); char const * gog_axis_color_map_get_name (GogAxisColorMap const *map
); GoResourceType gog_axis_color_map_get_resource_type (GogAxisColorMap const *map
); GdkPixbuf * gog_axis_color_map_get_snapshot (GogAxisColorMap const *map
,gboolean discrete
,gboolean horizontal
,unsigned width
,unsigned height
);
Used to map color and pseudo-3d axes values to the actual color. The first
color maps 0 and the last a positive integer returned by
gog_axis_color_map_get_max()
. For color axes, these integer values must
themselves be mapped to the minimum and maximum of the axis (unless the
axis is inverted). For pseudo-3d axes, successive colors are obtained for
integer values, cycling to the first color when the colors number is not
large enough.
GogAxisColorMap * gog_axis_color_map_edit (GogAxisColorMap *map
,GOCmdContext *cc
);
Opens a dialog to edit the color map. If map
is NULL
, creates a new one
unless the user cancels the edition.
|
a GogAxisColorMap or NULL
|
|
a GOCmdContext or NULL
|
Returns : |
the edited color map. [transfer none] |
void (*GogAxisColorMapHandler) (GogAxisColorMap const *map
,gpointer user_data
);
Type of the callback to pass to gog_axis_color_map_foreach()
to iterate through color maps.
|
a GogAxisColorMap |
|
user data |
gboolean gog_axis_color_map_delete (GogAxisColorMap *map
);
Destroys the color map and remove it from the user directory and from the database.
|
a GogAxisColorMap |
Returns : |
TRUE on success.
|
GogAxisColorMap * gog_axis_color_map_dup (GogAxisColorMap const *map
);
Duplicates the color map.
|
a GogAxisColorMap |
Returns : |
the new color map. [transfer full] |
void gog_axis_color_map_foreach (GogAxisColorMapHandler handler
,gpointer user_data
);
Executes handler
to each color map installed on the system or loaded from
a document.
|
a GogAxisColorMapHandler. [scope call] |
|
data to pass to handler
|
GogAxisColorMap * gog_axis_color_map_from_colors (char const *name
,unsigned nb
,GOColor const *colors
,GoResourceType type
);
Creates a color map using colors
.
|
color map name |
|
colors number |
|
the colors |
|
the resource type |
Returns : |
the newly created color map. [transfer full] |
GOColor gog_axis_color_map_get_color (GogAxisColorMap const *map
,double x
);
Maps x
to a color.
|
a GogAxisMap |
|
the value to map |
Returns : |
the found color. |
GogAxisColorMap const * gog_axis_color_map_get_from_id (char const *id
);
Retrieves the color map whose identifier is id
.
|
the color map identifier to search for |
Returns : |
the found color map. [transfer none] |
unsigned gog_axis_color_map_get_max (GogAxisColorMap const *map
);
Retrieves the value corresponding to the last color in the map. The first always corresponds to 0.
|
a GogAxisMap |
Returns : |
the maximum value. |
char const * gog_axis_color_map_get_id (GogAxisColorMap const *map
);
Retrieves the color map name.
|
a GogAxisMap |
Returns : |
the map name. [transfer none] |
char const * gog_axis_color_map_get_name (GogAxisColorMap const *map
);
Retrieves the color map localized name.
|
a GogAxisMap |
Returns : |
the map name. [transfer none] |
GoResourceType gog_axis_color_map_get_resource_type
(GogAxisColorMap const *map
);
Retrieves the resource type for map
.
|
a GogAxisMap |
Returns : |
the resource type. |
GdkPixbuf * gog_axis_color_map_get_snapshot (GogAxisColorMap const *map
,gboolean discrete
,gboolean horizontal
,unsigned width
,unsigned height
);
Builds a snapshot of the color map.
|
a GogAxisMap |
|
whether to use constant colors between each stop or a gradient. |
|
whether to get an horizontal or a vertical snapshot. |
|
the pixbuf width. |
|
the pixbuf height. |
Returns : |
the new GdkPixbuf. [transfer full] |
"resource-type"
property"resource-type" GoResourceType : Read / Write / Construct Only
The resource type for the color map.
Default value: GO_RESOURCE_INVALID