Gimp.Rasterizable

g GObject.GInterface GObject.GInterface Gimp.Rasterizable Gimp.Rasterizable GObject.GInterface->Gimp.Rasterizable

Implementations:

Gimp.LinkLayer, Gimp.TextLayer, Gimp.VectorLayer

Methods

is_rasterized ()

rasterize ()

restore ()

Virtual Methods

None

Properties

None

Signals

None

Fields

None

Class Details

class Gimp.Rasterizable
Bases:

GObject.GInterface

Structure:

Gimp.RasterizableInterface

Functions for querying and manipulating rasterizable items.

is_rasterized()
Returns:

True if self is rasterized.

Return type:

bool

Return whether self has been rasterized.

This procedure returns True if the specified self has been previously rasterized. In this case, you should treat this self as the generic raster variant.

For instance, a [class`Gimp`.TextLayer] object implements the Gimp.Rasterizable interface. If a text layer instance were to return True, you should only consider its rendering as returned by [method`Gimp`.Drawable.get_buffer].

On the other hand, if this returned False, depending on your intents, you may prefer to use the text contents and its properties with the various procedures provided by the [class`Gimp`.TextLayer] class interface.

New in version 3.2.

rasterize()
Returns:

True on success.

Return type:

bool

Rasterize the object.

This procedure makes the item behave like a typical raster layer.

Note that the source information (text contents and properties for a text layer, source file for a link layer, path and render properties for a vector layer, etc.) are not actually discarded, and it is possible to retrieve the original behavior with [method`Gimp`.Rasterizable.restore].

New in version 3.2.

restore()
Returns:

True on success.

Return type:

bool

Revert the rasterization of self.

Restore the information making the item non-destructive, such as text contents and properties of a text layer, source file of a link layer, path and render properties of a vector layer, etc. This item won’t behave anymore like a raster item. In particular, it will prevent direct modification of its pixels and will be rendered when its properties are updated.

New in version 3.2.