GOffice.GraphAxisColorMap¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/co |
The resource type for the color map |
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class GOffice.GraphAxisColorMap(**kwargs)¶
- Bases:
- Abstract:
No
- classmethod foreach(handler, *user_data)¶
- Parameters:
Executes handler to each color map installed on the system or loaded from a document.
- classmethod from_colors(name, nb, colors, type)¶
- Parameters:
name (
str
) – color map namenb (
int
) – colors numbercolors (
int
) – the colorstype (
GOffice.ResourceType
) – the resource type
- Returns:
the newly created color map.
- Return type:
Creates a color map using colors.
- classmethod get_from_id(id)¶
- Parameters:
id (
str
) – the color map identifier to search for- Returns:
the found color map.
- Return type:
Retrieves the color map whose identifier is id.
- delete()¶
-
Destroys the color map and remove it from the user directory and from the database.
- dup()¶
- Returns:
the new color map.
- Return type:
Duplicates the color map.
- edit(cc)¶
- Parameters:
cc (
GOffice.CmdContext
) – aGOffice.CmdContext
orNone
- Returns:
the edited color map.
- Return type:
Opens a dialog to edit the color map. If self is
None
, creates a new one unless the user cancels the edition.
- get_color(x)¶
-
Maps x to a color.
- get_max()¶
- Returns:
the maximum
GOffice.value
.- Return type:
Retrieves the
GOffice.value
corresponding to the last color in the map. The first always corresponds to 0.
- get_resource_type()¶
- Returns:
the resource type.
- Return type:
Retrieves the resource type for self.
- get_snapshot(discrete, horizontal, width, height)¶
- Parameters:
- Returns:
the new
GdkPixbuf.Pixbuf
.- Return type:
Builds a snapshot of the color map.
- to_cairo(cr, discrete, horizontal, width, height)¶
- Parameters:
cr (
cairo.Context
) – a cairo context.discrete (
int
) – whether to use constant colors between each stop or a gradient.horizontal (
bool
) – whether to get an horizontal or a vertical snapshot.width (
float
) – the rectangle width.height (
float
) – the rectangle height.
When discrete is larger than 1, it will be interpreted as the number of major ticks used. The number of colors will then be discrete − 1. Draws a snapshot of the color map inside the rectangle.
Property Details¶
- GOffice.GraphAxisColorMap.props.resource_type¶
- Name:
resource-type
- Type:
- Default Value:
- Flags:
The resource type for the color map