Skip to content

Transform

Transform

Transform(
    base: Transform = None,
    next: Transform = None,
    buffer: Buffer = None,
)

A Transform allows to apply an arbitratry transformation to a buffer. Any transform can be bound to a specific buffer and used in place of a Buffer where needed. Several transforms can be chained or composed together.

Parameters:

Name Type Description Default
base Transform

The base transform this transform is based on. When non null, all transform parameters are read from the base.

None
next Transform

A transformation can be chained with another transform (next). In such case, the next transform is applied first and result is passed to the current transform.

None
buffer Buffer

Buffer on which to apply the transform. When non null, the transformation is bound and cannot be modified anymore.

None

set_base

set_base(base: Transform = None)

Set a new base for the transform

Parameters:

Name Type Description Default
base Transform

The base transform this transform is based on

None

set_next

set_next(next: Transform = None)

Compose transform with next that will be applied before this one.

Parameters:

Name Type Description Default
next Transform

Next transform

None

set_buffer

set_buffer(buffer: Transform = None)

Bind the transform to the given buffer.

Parameters:

Name Type Description Default
buffer Buffer

Buffer to bind

None