ThorVG_CAPI (BETA version)

ThorVG C language binding APIs. More...

Collaboration diagram for ThorVG_CAPI (BETA version):

## Modules

| Initializer
| A module enabling initialization and termination of the TVG engines.
| Canvas
| A module for managing and drawing graphical elements.
| Paint
| A module for managing graphical elements. It enables duplication, transformation and composition.
| Shape
| A module for managing two-dimensional figures and their properties.
| Gradient
| A module managing the gradient fill of objects.
| Picture
| A module enabling to create and to load an image in one of the supported formats: svg, png and raw.
| Scene
| A module managing the multiple paints as one group paint.

## Classes

struct | Tvg_Point
| A data structure representing a point in two-dimensional space. More...
struct | Tvg_Matrix
| A data structure representing a three-dimensional matrix. More...

## Typedefs

typedef struct _Tvg_Canvas | Tvg_Canvas
| A structure responsible for managing and drawing graphical elements. More...
typedef struct _Tvg_Paint | Tvg_Paint
| A structure representing a graphical element. More...
typedef struct _Tvg_Gradient | Tvg_Gradient
| A structure representing a gradient fill of a Tvg_Paint object.

## Enumerations

enum | Tvg_Result { TVG_RESULT_SUCCESS = 0, TVG_RESULT_INVALID_ARGUMENT, TVG_RESULT_INSUFFICIENT_CONDITION, TVG_RESULT_FAILED_ALLOCATION, TVG_RESULT_MEMORY_CORRUPTION, TVG_RESULT_NOT_SUPPORTED, TVG_RESULT_UNKNOWN }
| Enumeration specifying the result from the APIs. More...

## Detailed Description

ThorVG C language binding APIs.

## Typedef Documentation

## Tvg_Canvas

typedef struct _Tvg_Canvas Tvg_Canvas

A structure responsible for managing and drawing graphical elements.

It sets up the target buffer, which can be drawn on the screen. It stores the Tvg_Paint objects (Shape, Scene, Picture).

## Tvg_Paint

typedef struct _Tvg_Paint Tvg_Paint

A structure representing a graphical element.

Warning
  The TvgPaint objects can not be shared between Canvases.

## Enumeration Type Documentation

## Tvg_Result

enum Tvg_Result

Enumeration specifying the result from the APIs.

Enumerator
TVG_RESULT_SUCCESS | The value returned in case of a correct request execution.
TVG_RESULT_INVALID_ARGUMENT | The value returned in the event of a problem with the arguments given to the API - e.g. empty paths or null pointers.
TVG_RESULT_INSUFFICIENT_CONDITION | The value returned in case the request cannot be processed - e.g. asking for properties of an object, which does not exist.
TVG_RESULT_FAILED_ALLOCATION | The value returned in case of unsuccessful memory allocation.
TVG_RESULT_MEMORY_CORRUPTION | The value returned in the event of bad memory handling - e.g. failing in pointer releasing or casting.
TVG_RESULT_NOT_SUPPORTED | The value returned in case of choosing unsupported options.
TVG_RESULT_UNKNOWN | The value returned in all other cases.