Gimp.VectorLayer

g GObject.GInterface GObject.GInterface Gimp.Rasterizable Gimp.Rasterizable GObject.GInterface->Gimp.Rasterizable GObject.Object GObject.Object Gimp.Item Gimp.Item GObject.Object->Gimp.Item Gimp.Drawable Gimp.Drawable Gimp.Layer Gimp.Layer Gimp.Drawable->Gimp.Layer Gimp.Item->Gimp.Drawable Gimp.VectorLayer Gimp.VectorLayer Gimp.Layer->Gimp.VectorLayer Gimp.Rasterizable->Gimp.VectorLayer

Subclasses:

None

Methods

Inherited:

Gimp.Layer (37), Gimp.Drawable (55), Gimp.Item (59), GObject.Object (37), Gimp.Rasterizable (3)

Structs:

GObject.ObjectClass (5)

class

get_by_id (layer_id)

class

new (image, path)

get_enable_fill ()

get_enable_stroke ()

get_fill_color ()

get_fill_pattern ()

get_path ()

get_stroke_cap_style ()

get_stroke_color ()

get_stroke_dash_offset ()

get_stroke_dash_pattern ()

get_stroke_join_style ()

get_stroke_miter_limit ()

get_stroke_pattern ()

get_stroke_width ()

get_stroke_width_unit ()

refresh ()

set_enable_fill (enable_fill)

set_enable_stroke (enable_stroke)

set_fill_color (color)

set_stroke_cap_style (cap_style)

set_stroke_color (color)

set_stroke_dash_offset (dash_offset)

set_stroke_dash_pattern (dashes)

set_stroke_join_style (join_style)

set_stroke_miter_limit (miter)

set_stroke_width (width)

set_stroke_width_unit (unit)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Inherited:

Gimp.Item (1)

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class Gimp.VectorLayer(**kwargs)
Bases:

Gimp.Layer, Gimp.Rasterizable

Abstract:

No

Structure:

Gimp.VectorLayerClass

Functions for querying and manipulating vector layers.

classmethod get_by_id(layer_id)
Parameters:

layer_id (int) – The layer id.

Returns:

a Gimp.VectorLayer for layer_id or None if layer_id does not represent a valid layer. The object belongs to libgimp and you must not modify or unref it.

Return type:

Gimp.VectorLayer or None

Returns a Gimp.VectorLayer representing layer_id. This function calls Gimp.Item.get_by_id() and returns the item if it is layer or None otherwise.

New in version 3.0.

classmethod new(image, path)
Parameters:
Returns:

The new vector layer. The object belongs to libgimp and you should not free it.

Return type:

Gimp.VectorLayer

Create a new vector layer.

This procedure creates a new vector layer displaying the specified path. By default, the fill and stroke properties will be defined by the context.

The new layer still needs to be added to the image as this is not automatic. Add the new layer with the [method`Image`.insert_layer] method.

The arguments are kept as simple as necessary for the basic case. All vector attributes, however, can be modified with the appropriate gimp_vector_layer_set_*() procedures.

New in version 3.2.

get_enable_fill()
Returns:

If the fill is enabled on the vector layer.

Return type:

bool

Check if fill is enabled in the vector layer.

This procedure checks if fill is enabled in the specified vector layer.

New in version 3.2.

get_enable_stroke()
Returns:

If the stroke is enabled on the vector layer.

Return type:

bool

Check if stroke is enabled in the vector layer.

This procedure checks if stroke is enabled in the specified vector layer.

New in version 3.2.

get_fill_color()
Returns:

The color of the fill.

Return type:

Gegl.Color

Get the color of the fill in a vector layer.

This procedure returns the color of the fill in a vector layer.

Note that there won’t be both a fill color and pattern, so either this procedure or [method`Gimp`.VectorLayer.get_fill_pattern] will return None at any given time.

New in version 3.2.

get_fill_pattern()
Returns:

The pattern of the fill.

Return type:

Gimp.Pattern

Get the pattern of the fill in a vector layer.

This procedure returns the pattern of the fill in a vector layer.

Note that there won’t be both a fill color and pattern, so either this procedure or [method`Gimp`.VectorLayer.get_fill_color] will return None at any given time.

New in version 3.2.

get_path()
Returns:

The path associated with the vector layer.

Return type:

Gimp.Path

Gets the path from the vector layer if one is associated with it.

This procedure returns the path from the vector layer if one is associated with it.

New in version 3.2.

get_stroke_cap_style()
Returns:

The stroke cap style.

Return type:

Gimp.CapStyle

Get the stroke cap style of a vector layer.

This procedure returns the stroke cap style in a vector layer.

New in version 3.2.

get_stroke_color()
Returns:

The color of the stroke.

Return type:

Gegl.Color

Get the color of the stroke in a vector layer.

This procedure returns the color of the stroke in a vector layer.

Note that there won’t be both a stroke color and pattern, so either this procedure or [method`Gimp`.VectorLayer.get_stroke_pattern] will return None at any given time.

New in version 3.2.

get_stroke_dash_offset()
Returns:

The stroke dash offset.

Return type:

float

Get the stroke dash offset of a vector layer.

This procedure returns the stroke dash offset in a vector layer.

New in version 3.2.

get_stroke_dash_pattern()
Returns:

True on success.

dashes:

The stroke dash pattern array.

Return type:

(bool, dashes: [float])

Get the stroke dash pattern of a vector layer.

This procedure returns the stroke dash pattern in a vector layer.

New in version 3.2.

get_stroke_join_style()
Returns:

The stroke join style.

Return type:

Gimp.JoinStyle

Get the stroke join style of a vector layer.

This procedure returns the stroke join style in a vector layer.

New in version 3.2.

get_stroke_miter_limit()
Returns:

The stroke miter limit.

Return type:

float

Get the stroke miter limit of a vector layer.

This procedure returns the stroke miter limit in a vector layer.

New in version 3.2.

get_stroke_pattern()
Returns:

The pattern of the fill.

Return type:

Gimp.Pattern

Get the pattern of the stroke in a vector layer.

This procedure returns the pattern of the fill in a vector layer.

Note that there won’t be both a stroke color and pattern, so either this procedure or [method`Gimp`.VectorLayer.get_stroke_color] will return None at any given time.

New in version 3.2.

get_stroke_width()
Returns:

The stroke width.

Return type:

float

Get the stroke width of a vector layer.

This procedure returns the stroke width in a vector layer.

New in version 3.2.

get_stroke_width_unit()
Returns:

The stroke width unit.

Return type:

Gimp.Unit

Get the stroke width unit of a vector layer.

This procedure returns the stroke width unit in a vector layer.

New in version 3.2.

refresh()
Returns:

True on success.

Return type:

bool

Rerender the vector layer

This procedure causes the vector layer to refresh itself after changes.

New in version 3.2.

set_enable_fill(enable_fill)
Parameters:

enable_fill (bool) – Whether to enable the fill on the vector layer.

Returns:

True on success.

Return type:

bool

Set whether the fill is enabled on the vector layer.

This procedure sets the fill’s visibility in the vector layer ‘layer’.

New in version 3.2.

set_enable_stroke(enable_stroke)
Parameters:

enable_stroke (bool) – Whether to enable the stroke on the vector layer.

Returns:

True on success.

Return type:

bool

Set whether the stroke is enabled on the vector layer.

This procedure sets the stroke’s visibility in the vector layer ‘layer’.

New in version 3.2.

set_fill_color(color)
Parameters:

color (Gegl.Color) – The color to use for the fill.

Returns:

True on success.

Return type:

bool

Set the color of the fill in the vector layer.

This procedure sets the fill color in the vector layer ‘layer’.

New in version 3.2.

set_stroke_cap_style(cap_style)
Parameters:

cap_style (Gimp.CapStyle) – The stroke cap style.

Returns:

True on success.

Return type:

bool

Set the stroke cap style of a vector layer.

This procedure sets the stroke cap style in a vector layer.

New in version 3.2.

set_stroke_color(color)
Parameters:

color (Gegl.Color) – The color to use for the stroke.

Returns:

True on success.

Return type:

bool

Set the color of the stroke in the vector layer.

This procedure sets the stroke color in the vector layer ‘layer’.

New in version 3.2.

set_stroke_dash_offset(dash_offset)
Parameters:

dash_offset (float) – The stroke dash offset.

Returns:

True on success.

Return type:

bool

Set the stroke dash offset of a vector layer.

This procedure sets the stroke dash offset in a vector layer.

New in version 3.2.

set_stroke_dash_pattern(dashes)
Parameters:

dashes ([float]) – The line dash pattern setting.

Returns:

True on success.

Return type:

bool

Set the stroke dash pattern of a vector layer.

This procedure sets the stroke dash pattern in a vector layer.

New in version 3.2.

set_stroke_join_style(join_style)
Parameters:

join_style (Gimp.JoinStyle) – The stroke join style.

Returns:

True on success.

Return type:

bool

Set the stroke join style of a vector layer.

This procedure sets the stroke join style in a vector layer.

New in version 3.2.

set_stroke_miter_limit(miter)
Parameters:

miter (float) – The stroke miter limit.

Returns:

True on success.

Return type:

bool

Set the stroke miter limit of a vector layer.

This procedure sets the stroke miter limit in a vector layer.

New in version 3.2.

set_stroke_width(width)
Parameters:

width (float) – The stroke width.

Returns:

True on success.

Return type:

bool

Set the stroke width of a vector layer.

This procedure sets the stroke width in a vector layer.

New in version 3.2.

set_stroke_width_unit(unit)
Parameters:

unit (Gimp.Unit) – The stroke width unit.

Returns:

True on success.

Return type:

bool

Set the stroke width unit of a vector layer.

This procedure sets the stroke width unit in a vector layer.

New in version 3.2.