Gegl.Processor

g GObject.Object GObject.Object Gegl.Processor Gegl.Processor GObject.Object->Gegl.Processor

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

get_buffer ()

set_level (level)

set_rectangle (rectangle)

set_scale (scale)

work ()

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

chunksize

int

r/w/co

Size of chunks being rendered (larger chunks need more memory to do the processing).

node

Gegl.Node

w/c

The Gegl.Node to process (will saturate the provider’s cache if the provided node is a sink node)

progress

float

r/w

query progress; 0.0 is not started, 1.0 is done.

rectangle

int

r/w

The rectangle of the region to process.

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class Gegl.Processor(**kwargs)
Bases:

GObject.Object

Abstract:

No

get_buffer()
Returns:

the Gegl.Buffer rendered into.

Return type:

Gegl.Buffer

Returns the (cache) buffer the processor is rendering into, another way of getting to the same pixel data is calling gegl_node_blit with flags indicating that we want caching and accept dirty data.

set_level(level)
Parameters:

level (int) –

set_rectangle(rectangle)
Parameters:

rectangle (Gegl.Rectangle) – the new Gegl.Rectangle the processor shold work on or None to make it work on all data in the buffer.

Change the rectangle a Gegl.Processor is working on.

set_scale(scale)
Parameters:

scale (float) –

work()
Returns:

progress:

a location to store the (estimated) percentage complete.

Return type:

(bool, progress: float)

Do an iteration of work for the processor.

Returns True if there is more work to be done.

Gegl.Processor *processor = Gegl.Node.new_processor (node, &roi); double progress;

while (Gegl.Processor.work (processor, &progress)) g_warning (“%f%% complete”, progress); GObject.Object.unref (processor);

Property Details

Gegl.Processor.props.chunksize
Name:

chunksize

Type:

int

Default Value:

1048576

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Size of chunks being rendered (larger chunks need more memory to do the processing).

Gegl.Processor.props.node
Name:

node

Type:

Gegl.Node

Default Value:

None

Flags:

WRITABLE, CONSTRUCT

The Gegl.Node to process (will saturate the provider’s cache if the provided node is a sink node)

Gegl.Processor.props.progress
Name:

progress

Type:

float

Default Value:

0.0

Flags:

READABLE, WRITABLE

query progress; 0.0 is not started, 1.0 is done.

Gegl.Processor.props.rectangle
Name:

rectangle

Type:

int

Default Value:

None

Flags:

READABLE, WRITABLE

The rectangle of the region to process.