| ThorVG v0.8

Public Member Functions | Static Public Member Functions | List of all members
Accessorfinal
ThorVG

The Accessor is a utility class to debug the Scene structure by traversing the scene-tree. More...

## Public Member Functions
std::unique_ptr< Picture > | access (std::unique_ptr< Picture > picture, bool(*func)(const Paint *paint)) noexcept
| Access the Picture scene stree nodes. More...

## Static Public Member Functions
static std::unique_ptr< Accessor > | gen () noexcept
| Creates a new Accessor object. More...

## Detailed Description

The Accessor is a utility class to debug the Scene structure by traversing the scene-tree.

The Accessor helps you search specific nodes to read the property information, figure out the structure of the scene tree and its size.

Warning
  We strongly warn you not to change the paints of a scene unless you really know the design-structure.

@BETA_API

## Member Function Documentation

## ◆ access()

std::unique_ptr<Picture> access | ( | std::unique_ptr< Picture > | picture,
|  | bool(*)(const Paint *paint) | func
| ) |  |
| noexcept

Access the Picture scene stree nodes.

Parameters

  [in] | picture | The picture node to traverse the internal scene-tree.
  [in] | func | The callback function calling for every paint nodes of the Picture.

Returns
  Return the given `picture` instance.

Note
  The bitmap based picture might not have the scene-tree.

@BETA_API

## ◆ gen()

static std::unique_ptr<Accessor> gen | ( |  | ) |
| static noexcept

Creates a new Accessor object.

Returns
  A new Accessor object.

@BETA_API