GimpUi.ColorArea¶
- Subclasses:
None
Methods¶
- Inherited:
Gtk.DrawingArea (1), Gtk.Widget (278), GObject.Object (37), Gtk.Buildable (10)
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
|---|---|---|---|
r/w/c |
The displayed color |
||
w |
The modifier mask that triggers dragging the color |
||
r/w |
Whether to draw a thin border in the foreground color around the area |
||
r/w/c |
The type of the color area |
Style Properties¶
- Inherited:
Signals¶
- Inherited:
Name |
Short Description |
|---|---|
Fields¶
- Inherited:
Class Details¶
- class GimpUi.ColorArea(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Displays a [class`Gegl`.Color], optionally with alpha-channel.
- classmethod new(color, type, drag_mask)¶
- Parameters:
color (
Gegl.Color) – A pointer to a [class`Gegl`.Color].type (
GimpUi.ColorAreaType) – The type of color area to create.drag_mask (
Gdk.ModifierType) – The event_mask that should trigger drags.
- Returns:
Pointer to the new
GimpUi.ColorAreawidget.- Return type:
Creates a new
GimpUi.ColorAreawidget.This returns a preview area showing the color. It handles color DND. If the color changes, the “color_changed” signal is emitted.
- enable_drag(drag_mask)¶
- Parameters:
drag_mask (
Gdk.ModifierType) – The bitmask of buttons that can start the drag.
Allows dragging the color displayed with buttons identified by drag_mask. The drag supports targets of type “application/x-geglcolor”.
Note that setting a drag_mask of 0 disables the drag ability.
- get_color()¶
- Returns:
a copy of the [class`Gegl`.Color] displayed in self.
- Return type:
Retrieves the current color of the self.
- has_alpha()¶
-
Checks whether the self shows transparency information. This is determined via the self's
GimpUi.ColorAreaType.
- set_color(color)¶
- Parameters:
color (
Gegl.Color) – Pointer to a [class`Gegl`.Color] that defines the new color.
Sets self to a different color.
- set_color_config(config)¶
- Parameters:
config (
Gimp.ColorConfig) – aGimp.ColorConfigobject.
Sets the color management configuration to use with this color area.
New in version 2.10.
- set_draw_border(draw_border)¶
- Parameters:
draw_border (
bool) – whether to draw a border or not
The self can draw a thin border in the foreground color around itself. This function toggles this behavior on and off. The default is not draw a border.
- set_out_of_gamut(out_of_gamut)¶
- Parameters:
out_of_gamut (
bool) – whether to show an out-of-gamut indicator
Sets the color area to render as an out-of-gamut color, i.e. with a small triangle on a corner using the color management out of gamut color (as per
GimpUi.ColorArea.set_color_config()).By default, self will render as out-of-gamut for any RGB color with a channel out of the [0; 1] range. This function allows to consider more colors out of gamut (for instance non-gray colors on a grayscale image, or colors absent of palettes in indexed images, etc.)
New in version 2.10.10.
- set_type(type)¶
- Parameters:
type (
GimpUi.ColorAreaType) – AGimpUi.ColorAreaType.
Changes the type of self. The
GimpUi.ColorAreaTypedetermines whether the widget shows transparency information and chooses the size of the checkerboard used to do that.
Signal Details¶
- GimpUi.ColorArea.signals.color_changed(color_area)¶
- Signal Name:
color-changed- Flags:
- Parameters:
color_area (
GimpUi.ColorArea) – The object which received the signal
Property Details¶
- GimpUi.ColorArea.props.color¶
- Name:
color- Type:
- Default Value:
<Color object at 0x000000000000 (GeglColor at 0x00000000)>- Flags:
The color displayed in the color area.
New in version 2.4.
- GimpUi.ColorArea.props.drag_mask¶
- Name:
drag-mask- Type:
- Default Value:
0- Flags:
The modifier mask that triggers dragging the color
- GimpUi.ColorArea.props.draw_border¶
-
Whether to draw a thin border in the foreground color around the area.
New in version 2.4.
- GimpUi.ColorArea.props.type¶
- Name:
type- Type:
- Default Value:
- Flags:
The type of the color area.
New in version 2.4.