thorvg_python.accessor¶
Classes¶
Accessor API |
Module Contents¶
- class thorvg_python.accessor.Accessor(engine: thorvg_python.engine.Engine, accessor: AccessorPointer | None)¶
Accessor API
A module for manipulation of the scene tree
This module helps to control the scene tree.
- engine¶
- thorvg_lib¶
- _new() thorvg_python.base.AccessorPointer¶
Creates a new AccessorPointer object.
Note
You need not call this method as it is auto called when initializing
Accessor()...versionadded: 1.0
- _del() thorvg_python.base.Result¶
Deletes the given accessor object.
Added in version 1.0.
- set(paint: thorvg_python.paint.Paint, func: collections.abc.Callable[[thorvg_python.base.PaintPointer, bytes], bool], data: bytes) thorvg_python.base.Result¶
Sets the paint of the accessor then iterates through its descendents.
Iterates through all descendents of the scene passed through the paint argument while calling func on each and passing the data pointer to this function. When func returns false iteration stops and the function returns.
- Parameters:¶
- paint : thorvg_python.paint.Paint¶
A PaintPointer to the scene object.
- func : Callable[[thorvg_python.base.PaintPointer, bytes], bool]¶
A function pointer to the function that will be execute for each child.
- data : bytes¶
A void pointer to data that will be passed to the func.
- Result:¶
INVALID_ARGUMENT An invalid AccessorPointer, PaintPointer, or function pointer.
- Return type:¶
Added in version 1.0.