![]() |
ThorVG
v0.15
|
ThorVG classes and enumerations providing C++ APIs. More...
Classes | |
struct | Point |
A data structure representing a point in two-dimensional space. More... | |
struct | Matrix |
A data structure representing a three-dimensional matrix. More... | |
class | Paint |
An abstract class for managing graphical elements. More... | |
class | Fill |
An abstract class representing the gradient fill of the Shape object. More... | |
class | Canvas |
An abstract class for drawing graphical elements. More... | |
class | LinearGradient |
A class representing the linear gradient fill of the Shape object. More... | |
class | RadialGradient |
A class representing the radial gradient fill of the Shape object. More... | |
class | Shape |
A class representing two-dimensional figures and their properties. More... | |
class | Picture |
A class representing an image read in one of the supported formats: raw, svg, png, jpg, lottie(json) and etc. Besides the methods inherited from the Paint, it provides methods to load & draw images on the canvas. More... | |
class | Scene |
A class to composite children paints. More... | |
class | Text |
A class to represent text objects in a graphical context, allowing for rendering and manipulation of unicode text. More... | |
class | SwCanvas |
A class for the rendering graphical elements with a software raster engine. More... | |
class | GlCanvas |
A class for the rendering graphic elements with a GL raster engine. More... | |
class | WgCanvas |
A class for the rendering graphic elements with a WebGPU raster engine. More... | |
class | Initializer |
A class that enables initialization and termination of the TVG engines. More... | |
class | Animation |
The Animation class enables manipulation of animatable images. More... | |
class | Saver |
A class for exporting a paint object into a specified file, from which to recover the paint data later. More... | |
class | Accessor |
The Accessor is a utility class to debug the Scene structure by traversing the scene-tree. More... | |
Enumerations | |
enum class | Result { Success = 0 , InvalidArguments , InsufficientCondition , FailedAllocation , MemoryCorruption , NonSupport , Unknown } |
Enumeration specifying the result from the APIs. More... | |
enum class | PathCommand { Close = 0 , MoveTo , LineTo , CubicTo } |
Enumeration specifying the values of the path commands accepted by TVG. More... | |
enum class | StrokeCap { Square = 0 , Round , Butt } |
Enumeration determining the ending type of a stroke in the open sub-paths. More... | |
enum class | StrokeJoin { Bevel = 0 , Round , Miter } |
Enumeration determining the style used at the corners of joined stroked path segments. More... | |
enum class | FillSpread { Pad = 0 , Reflect , Repeat } |
Enumeration specifying how to fill the area outside the gradient bounds. More... | |
enum class | FillRule { Winding = 0 , EvenOdd } |
Enumeration specifying the algorithm used to establish which parts of the shape are treated as the inside of the shape. More... | |
enum class | CompositeMethod { None = 0 , ClipPath , AlphaMask , InvAlphaMask , LumaMask , InvLumaMask , AddMask , SubtractMask , IntersectMask , DifferenceMask , LightenMask , DarkenMask } |
Enumeration indicating the method used in the composition of two objects - the target and the source. More... | |
enum class | BlendMethod : uint8_t { Normal = 0 , Multiply , Screen , Overlay , Darken , Lighten , ColorDodge , ColorBurn , HardLight , SoftLight , Difference , Exclusion , Hue , Saturation , Color , Luminosity , Add , HardMix } |
Enumeration indicates the method used for blending paint. Please refer to the respective formulas for each method. More... | |
enum class | SceneEffect : uint8_t { ClearAll = 0 , GaussianBlur } |
Enumeration that defines methods used for Scene Effects. More... | |
enum class | CanvasEngine { Sw = (1 << 1) , Gl = (1 << 2) , Wg = (1 << 3) } |
Enumeration specifying the engine type used for the graphics backend. For multiple backends bitwise operation is allowed. More... | |
enum class | Type : uint8_t { Undefined = 0 , Shape , Scene , Picture , Text , LinearGradient = 10 , RadialGradient } |
Enumeration specifying the ThorVG class type value. More... | |
Functions | |
template<typename T = tvg::Paint> | |
std::unique_ptr< T > | cast (Paint *paint) |
The cast() function is a utility function used to cast a 'Paint' to type 'T'. More... | |
template<typename T = tvg::Fill> | |
std::unique_ptr< T > | cast (Fill *fill) |
The cast() function is a utility function used to cast a 'Fill' to type 'T'. More... | |
ThorVG classes and enumerations providing C++ APIs.
|
strong |
Enumeration indicates the method used for blending paint. Please refer to the respective formulas for each method.
Notation: S(source paint as the top layer), D(destination as the bottom layer), Sa(source paint alpha), Da(destination alpha)
|
strong |
|
strong |
Enumeration indicating the method used in the composition of two objects - the target and the source.
Notation: S(Source), T(Target), SA(Source Alpha), TA(Target Alpha)
Enumerator | |
---|---|
None | No composition is applied. |
ClipPath | The intersection of the source and the target is determined and only the resulting pixels from the source are rendered. Note that ClipPath only supports the Shape type. |
AlphaMask | Alpha Masking using the compositing target's pixels as an alpha value. |
InvAlphaMask | Alpha Masking using the complement to the compositing target's pixels as an alpha value. |
LumaMask | Alpha Masking using the grayscale (0.2125R + 0.7154G + 0.0721*B) of the compositing target's pixels.
|
InvLumaMask | Alpha Masking using the grayscale (0.2125R + 0.7154G + 0.0721*B) of the complement to the compositing target's pixels.
|
AddMask | Combines the target and source objects pixels using target alpha. (T * TA) + (S * (255 - TA)) (Experimental API) |
SubtractMask | Subtracts the source color from the target color while considering their respective target alpha. (T * TA) - (S * (255 - TA)) (Experimental API) |
IntersectMask | Computes the result by taking the minimum value between the target alpha and the source alpha and multiplies it with the target color. (T * min(TA, SA)) (Experimental API) |
DifferenceMask | Calculates the absolute difference between the target color and the source color multiplied by the complement of the target alpha. abs(T - S * (255 - TA)) (Experimental API) |
LightenMask | Where multiple masks intersect, the highest transparency value is used. (Experimental API) |
DarkenMask | Where multiple masks intersect, the lowest transparency value is used. (Experimental API) |
|
strong |
Enumeration specifying the algorithm used to establish which parts of the shape are treated as the inside of the shape.
|
strong |
Enumeration specifying how to fill the area outside the gradient bounds.
|
strong |
Enumeration specifying the values of the path commands accepted by TVG.
Not to be confused with the path commands from the svg path element (like M, L, Q, H and many others). TVG interprets all of them and translates to the ones from the PathCommand values.
|
strong |
Enumeration specifying the result from the APIs.
All ThorVG APIs could potentially return one of the values in the list. Please note that some APIs may additionally specify the reasons that trigger their return values.
|
strong |
Enumeration that defines methods used for Scene Effects.
This enum provides options to apply various post-processing effects to a scene. Scene effects are typically applied to modify the final appearance of a rendered scene, such as blurring.
|
strong |
Enumeration determining the ending type of a stroke in the open sub-paths.
|
strong |
Enumeration determining the style used at the corners of joined stroked path segments.
|
strong |
Enumeration specifying the ThorVG class type value.
ThorVG's drawing objects can return class type values, allowing you to identify the specific class of each object.
Enumerator | |
---|---|
Undefined | Unkown class. |
Shape | Shape class. |
Scene | Scene class. |
Picture | Picture class. |
Text | Text class. |
LinearGradient | LinearGradient class. |
RadialGradient | RadialGradient class. |
std::unique_ptr<T> tvg::cast | ( | Fill * | fill | ) |