+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
16 #define TVG_API __declspec(dllexport)
+
+
18 #define TVG_API __declspec(dllimport)
+
+
20 #elif (defined(__SUNPRO_C) || defined(__SUNPRO_CC))
+
21 #define TVG_API __global
+
+
23 #if (defined(__GNUC__) && __GNUC__ >= 4) || defined(__INTEL_COMPILER)
+
24 #define TVG_API __attribute__ ((visibility("default")))
+
+
+
+
+
+
+
+
+
+
+
+
+
+
38 #define TVG_DEPRECATED __declspec(deprecated)
+
39 #elif __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)
+
40 #define TVG_DEPRECATED __attribute__ ((__deprecated__))
+
+
42 #define TVG_DEPRECATED
+
+
+
45 #define _TVG_DECLARE_PRIVATE(A) \
+
+
+
+
49 A(const A&) = delete; \
+
50 const A& operator=(const A&) = delete; \
+
+
+
53 #define _TVG_DISABLE_CTOR(A) \
+
+
+
+
57 #define _TVG_DECLARE_ACCESSOR(A) \
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
394 TVG_DEPRECATED
Result bounds(
float* x,
float* y,
float* w,
float* h) const noexcept;
-
-
411 Result bounds(
float* x,
float* y,
float* w,
float* h,
bool transformed) const noexcept;
-
-
-
-
427 uint8_t opacity() const noexcept;
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
381 TVG_DEPRECATED
Result bounds(
float* x,
float* y,
float* w,
float* h) const noexcept;
+
+
398 Result bounds(
float* x,
float* y,
float* w,
float* h,
bool transformed) const noexcept;
+
+
+
+
414 uint8_t opacity() const noexcept;
+
+
+
+
+
+
443 uint32_t identifier() const noexcept;
+
+
445 _TVG_DECLARE_PRIVATE(
Paint);
+
+
-
456 uint32_t identifier() const noexcept;
-
-
458 _TVG_DECLARE_PRIVATE(
Paint);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
552 Fill* duplicate() const noexcept;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
539 Fill* duplicate() const noexcept;
+
+
548 uint32_t identifier() const noexcept;
+
+
550 _TVG_DECLARE_PRIVATE(
Fill);
+
+
-
561 uint32_t identifier() const noexcept;
-
-
563 _TVG_DECLARE_PRIVATE(
Fill);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
639 virtual
Result clear(
bool free = true) noexcept;
-
-
-
-
-
-
-
-
676 _TVG_DECLARE_PRIVATE(
Canvas);
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
626 virtual
Result clear(
bool free = true) noexcept;
+
+
+
+
+
+
+
+
663 _TVG_DECLARE_PRIVATE(
Canvas);
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
725 Result linear(
float* x1,
float* y1,
float* x2,
float* y2)
const noexcept;
-
-
732 static std::unique_ptr<LinearGradient>
gen() noexcept;
+
+
+
712 Result linear(
float* x1,
float* y1,
float* x2,
float* y2)
const noexcept;
+
+
719 static std::unique_ptr<LinearGradient>
gen() noexcept;
+
+
728 static uint32_t identifier() noexcept;
+
+
+
+
-
741 static uint32_t identifier() noexcept;
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
+
-
-
-
789 static std::unique_ptr<RadialGradient>
gen() noexcept;
+
776 static std::unique_ptr<RadialGradient>
gen() noexcept;
+
+
785 static uint32_t identifier() noexcept;
+
+
+
+
-
798 static uint32_t identifier() noexcept;
-
-
-
-
-
-
-
-
-
-
-
-
-
842 Result moveTo(
float x,
float y) noexcept;
-
-
856 Result lineTo(
float x,
float y) noexcept;
-
-
875 Result cubicTo(
float cx1,
float cy1,
float cx2,
float cy2,
float x,
float y) noexcept;
-
-
-
-
912 Result appendRect(
float x,
float y,
float w,
float h,
float rx = 0,
float ry = 0) noexcept;
-
-
930 Result appendCircle(
float cx,
float cy,
float rx,
float ry) noexcept;
-
-
949 Result appendArc(
float cx,
float cy,
float radius,
float startAngle,
float sweep,
bool pie) noexcept;
-
-
-
-
-
-
988 Result stroke(uint8_t r, uint8_t g, uint8_t b, uint8_t a = 255) noexcept;
-
-
-
-
1014 Result stroke(const
float* dashPattern, uint32_t cnt) noexcept;
-
-
-
-
-
-
-
1046 Result strokeMiterlimit(
float miterlimit) noexcept;
-
-
1063 Result fill(uint8_t r, uint8_t g, uint8_t b, uint8_t a = 255) noexcept;
+
+
+
+
+
+
+
+
829 Result moveTo(
float x,
float y) noexcept;
+
+
843 Result lineTo(
float x,
float y) noexcept;
+
+
862 Result cubicTo(
float cx1,
float cy1,
float cx2,
float cy2,
float x,
float y) noexcept;
+
+
+
+
899 Result appendRect(
float x,
float y,
float w,
float h,
float rx = 0,
float ry = 0) noexcept;
+
+
917 Result appendCircle(
float cx,
float cy,
float rx,
float ry) noexcept;
+
+
936 Result appendArc(
float cx,
float cy,
float radius,
float startAngle,
float sweep,
bool pie) noexcept;
+
+
+
+
+
+
975 Result stroke(uint8_t r, uint8_t g, uint8_t b, uint8_t a = 255) noexcept;
+
+
+
+
1001 Result stroke(const
float* dashPattern, uint32_t cnt) noexcept;
+
+
+
+
+
+
+
1033 Result strokeMiterlimit(
float miterlimit) noexcept;
+
+
1050 Result fill(uint8_t r, uint8_t g, uint8_t b, uint8_t a = 255) noexcept;
+
+
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
1116 uint32_t pathCoords(const
Point** pts) const noexcept;
-
-
-
-
1135 Result fillColor(uint8_t* r, uint8_t* g, uint8_t* b, uint8_t* a =
nullptr) const noexcept;
-
-
-
-
1149 float strokeWidth() const noexcept;
-
-
1161 Result strokeColor(uint8_t* r, uint8_t* g, uint8_t* b, uint8_t* a =
nullptr) const noexcept;
-
-
1168 const
Fill* strokeFill() const noexcept;
-
-
1177 uint32_t strokeDash(const
float** dashPattern) const noexcept;
-
-
-
-
-
-
1200 float strokeMiterlimit() const noexcept;
-
-
1207 static std::unique_ptr<
Shape> gen() noexcept;
+
+
+
1103 uint32_t pathCoords(const
Point** pts) const noexcept;
+
+
+
+
1122 Result fillColor(uint8_t* r, uint8_t* g, uint8_t* b, uint8_t* a =
nullptr) const noexcept;
+
+
+
+
1136 float strokeWidth() const noexcept;
+
+
1148 Result strokeColor(uint8_t* r, uint8_t* g, uint8_t* b, uint8_t* a =
nullptr) const noexcept;
+
+
1155 const
Fill* strokeFill() const noexcept;
+
+
1164 uint32_t strokeDash(const
float** dashPattern) const noexcept;
+
+
+
+
+
+
1187 float strokeMiterlimit() const noexcept;
+
+
1194 static std::unique_ptr<
Shape> gen() noexcept;
+
+
1203 static uint32_t identifier() noexcept;
+
+
1205 _TVG_DECLARE_PRIVATE(
Shape);
+
+
-
1216 static uint32_t identifier() noexcept;
-
-
1218 _TVG_DECLARE_PRIVATE(
Shape);
-
-
-
-
-
-
-
-
-
-
-
1267 TVG_DEPRECATED
Result load(
const char* data, uint32_t size,
bool copy =
false) noexcept;
-
-
1287 Result load(const
char* data, uint32_t size, const std::
string& mimeType,
bool copy = false) noexcept;
+
+
+
+
+
+
+
+
1254 TVG_DEPRECATED
Result load(
const char* data, uint32_t size,
bool copy =
false) noexcept;
+
+
1274 Result load(const
char* data, uint32_t size, const std::
string& mimeType,
bool copy = false) noexcept;
+
+
-
-
-
1310 Result size(
float* w,
float* h) const noexcept;
-
-
1320 Result load(uint32_t* data, uint32_t w, uint32_t h,
bool copy) noexcept;
-
-
-
-
1358 uint32_t mesh(const
Polygon** triangles) const noexcept;
-
-
-
-
1374 static uint32_t identifier() noexcept;
-
-
-
1377 _TVG_DECLARE_PRIVATE(
Picture);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
1458 static std::unique_ptr<
Scene> gen() noexcept;
-
-
1467 static uint32_t identifier() noexcept;
-
-
1469 _TVG_DECLARE_PRIVATE(
Scene);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
1554 static std::unique_ptr<SwCanvas>
gen() noexcept;
-
-
-
-
+
1297 Result size(
float* w,
float* h) const noexcept;
+
+
1314 Result load(uint32_t* data, uint32_t w, uint32_t h,
bool copy) noexcept;
+
+
+
+
1352 uint32_t mesh(const
Polygon** triangles) const noexcept;
+
+
+
+
1368 static uint32_t identifier() noexcept;
+
+
+
1371 _TVG_DECLARE_PRIVATE(
Picture);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
1452 static std::unique_ptr<
Scene> gen() noexcept;
+
+
1461 static uint32_t identifier() noexcept;
+
+
1463 _TVG_DECLARE_PRIVATE(
Scene);
+
+
+
+
+
+
+
+
+
1495 Result font(
const char* name,
float size,
const char* style =
nullptr) noexcept;
+
+
+
+
1525 Result fill(uint8_t r, uint8_t g, uint8_t b) noexcept;
+
+
+
+
1558 static
Result load(const std::
string& path) noexcept;
-
-
-
-
-
-
1581 Result target(uint32_t* buffer, uint32_t stride, uint32_t w, uint32_t h) noexcept;
-
-
1590 static std::unique_ptr<GlCanvas>
gen() noexcept;
-
-
-
+
1575 static
Result unload(const std::
string& path) noexcept;
+
+
1584 static std::unique_ptr<
Text> gen() noexcept;
+
+
1593 static uint32_t identifier() noexcept;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
1595 _TVG_DECLARE_PRIVATE(
Text);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
1703 uint32_t curFrame() const noexcept;
-
-
1715 uint32_t totalFrame() const noexcept;
-
-
1726 float duration() const noexcept;
-
-
-
-
-
-
-
-
-
-
-
-
-
1785 Result save(std::unique_ptr<Paint> paint,
const std::string& path,
bool compress =
true) noexcept;
-
-
+
1680 static std::unique_ptr<SwCanvas>
gen() noexcept;
+
+
+
+
+
+
+
+
+
+
+
1707 Result target(uint32_t* buffer, uint32_t stride, uint32_t w, uint32_t h) noexcept;
+
+
1716 static std::unique_ptr<GlCanvas>
gen() noexcept;
+
+
+
+
+
+
+
+
+
+
+
+
+
1752 static std::unique_ptr<WgCanvas>
gen() noexcept;
+
+
+
+
+
+
+
+
+
+
+
-
1811 static std::unique_ptr<
Saver> gen() noexcept;
-
-
1813 _TVG_DECLARE_PRIVATE(
Saver);
-
-
-
-
-
-
-
-
-
1843 std::unique_ptr<Picture>
set(std::unique_ptr<Picture> picture, std::function<
bool(
const Paint* paint)> func) noexcept;
-
-
1850 static std::unique_ptr<Accessor>
gen() noexcept;
-
-
-
-
-
-
1860 template<typename T>
-
-
-
1863 return std::unique_ptr<T>(
static_cast<T*
>(paint));
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
1865 float curFrame() const noexcept;
-
1871 template<
typename T>
-
-
-
1874 return std::unique_ptr<T>(
static_cast<T*
>(fill));
-
-
-
-
-
-
-
The Accessor is a utility class to debug the Scene structure by traversing the scene-tree.
Definition: thorvg.h:1829
+
1877 float totalFrame() const noexcept;
+
+
1888 float duration() const noexcept;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
1956 Result save(std::unique_ptr<Paint> paint,
const std::string& path,
bool compress =
true) noexcept;
+
+
1981 Result save(std::unique_ptr<
Animation> animation, const std::
string& path, uint32_t quality = 100, uint32_t fps = 0) noexcept;
+
+
+
+
2007 static std::unique_ptr<
Saver> gen() noexcept;
+
+
2009 _TVG_DECLARE_PRIVATE(
Saver);
+
+
+
+
+
+
+
+
+
2039 std::unique_ptr<Picture>
set(std::unique_ptr<Picture> picture, std::function<
bool(
const Paint* paint)> func) noexcept;
+
+
2046 static std::unique_ptr<Accessor>
gen() noexcept;
+
+
+
+
+
+
2056 template<typename T = tvg::
Paint>
+
+
+
2059 return std::unique_ptr<T>(
static_cast<T*
>(paint));
+
+
+
+
2067 template<
typename T = tvg::Fill>
+
+
+
2070 return std::unique_ptr<T>(
static_cast<T*
>(fill));
+
+
+
+
+
+
+
The Accessor is a utility class to debug the Scene structure by traversing the scene-tree.
Definition: thorvg.h:2025
std::unique_ptr< Picture > set(std::unique_ptr< Picture > picture, std::function< bool(const Paint *paint)> func) noexcept
Set the access function for traversing the Picture scene tree nodes.
static std::unique_ptr< Accessor > gen() noexcept
Creates a new Accessor object.
-
The Animation class enables manipulation of animatable images.
Definition: thorvg.h:1657
+
The Animation class enables manipulation of animatable images.
Definition: thorvg.h:1819
Picture * picture() const noexcept
Retrieves a picture instance associated with this animation instance.
-
Result frame(uint32_t no) noexcept
Specifies the current frame in the animation.
-
An abstract class for drawing graphical elements.
Definition: thorvg.h:578
+
Result frame(float no) noexcept
Specifies the current frame in the animation.
+
An abstract class for drawing graphical elements.
Definition: thorvg.h:565
TVG_DEPRECATED Result reserve(uint32_t n) noexcept
Sets the size of the container, where all the paints pushed into the Canvas are stored.
std::list< Paint * > & paints() noexcept
Returns the list of the paints that currently held by the Canvas.
-
An abstract class representing the gradient fill of the Shape object.
Definition: thorvg.h:474
+
An abstract class representing the gradient fill of the Shape object.
Definition: thorvg.h:461
FillSpread spread() const noexcept
Gets the FillSpread value of the fill.
Result colorStops(const ColorStop *colorStops, uint32_t cnt) noexcept
Sets the parameters of the colors of the gradient and their position.
Result transform(const Matrix &m) noexcept
Sets the matrix of the affine transformation for the gradient fill.
uint32_t colorStops(const ColorStop **colorStops) const noexcept
Gets the parameters of the colors of the gradient, their position and number.
Result spread(FillSpread s) noexcept
Sets the FillSpread value, which specifies how to fill the area outside the gradient bounds.
-
A class for the rendering graphic elements with a GL raster engine.
Definition: thorvg.h:1570
+
A class for the rendering graphic elements with a GL raster engine.
Definition: thorvg.h:1696
Result target(uint32_t *buffer, uint32_t stride, uint32_t w, uint32_t h) noexcept
Sets the target buffer for the rasterization.
static std::unique_ptr< GlCanvas > gen() noexcept
Creates a new GlCanvas object.
-
A class that enables initialization and termination of the TVG engines.
Definition: thorvg.h:1602
+
A class that enables initialization and termination of the TVG engines.
Definition: thorvg.h:1764
static Result term(CanvasEngine engine) noexcept
Terminates TVG engines.
static Result init(CanvasEngine engine, uint32_t threads) noexcept
Initializes TVG engines.
-
A class representing the linear gradient fill of the Shape object.
Definition: thorvg.h:689
+
A class representing the linear gradient fill of the Shape object.
Definition: thorvg.h:676
static std::unique_ptr< LinearGradient > gen() noexcept
Creates a new LinearGradient object.
Result linear(float *x1, float *y1, float *x2, float *y2) const noexcept
Gets the linear gradient bounds.
Result linear(float x1, float y1, float x2, float y2) noexcept
Sets the linear gradient bounds.
-
An abstract class for managing graphical elements.
Definition: thorvg.h:282
+
An abstract class for managing graphical elements.
Definition: thorvg.h:269
Result scale(float factor) noexcept
Sets the scale value of the object.
Result rotate(float degree) noexcept
Sets the angle by which the object is rotated.
Result transform(const Matrix &m) noexcept
Sets the matrix of the affine transformation for the object.
Matrix transform() noexcept
Gets the matrix of the affine transformation of the object.
Result translate(float x, float y) noexcept
Sets the values by which the object is moved in a two-dimensional space.
-
A class representing an image read in one of the supported formats: raw, svg, png,...
Definition: thorvg.h:1232
+
A class representing an image read in one of the supported formats: raw, svg, png,...
Definition: thorvg.h:1219
TVG_DEPRECATED Result load(const char *data, uint32_t size, bool copy=false) noexcept
Loads a picture data from a memory block of a given size.
Result load(const std::string &path) noexcept
Loads a picture data directly from a file.
-
A class representing the radial gradient fill of the Shape object.
Definition: thorvg.h:754
+
A class representing the radial gradient fill of the Shape object.
Definition: thorvg.h:741
Result radial(float cx, float cy, float radius) noexcept
Sets the radial gradient bounds.
Result radial(float *cx, float *cy, float *radius) const noexcept
Gets the radial gradient bounds.
static std::unique_ptr< RadialGradient > gen() noexcept
Creates a new RadialGradient object.
-
A class for exporting a paint object into a specified file, from which to recover the paint data late...
Definition: thorvg.h:1759
+
A class for exporting a paint object into a specified file, from which to recover the paint data late...
Definition: thorvg.h:1921
+
Result background(std::unique_ptr< Paint > paint) noexcept
Sets the base background content for the saved image.
Result save(std::unique_ptr< Paint > paint, const std::string &path, bool compress=true) noexcept
Exports the given paint data to the given path.
-
A class to composite children paints.
Definition: thorvg.h:1393
+
A class to composite children paints.
Definition: thorvg.h:1387
Result push(std::unique_ptr< Paint > paint) noexcept
Passes drawing elements to the Scene using Paint objects.
TVG_DEPRECATED Result reserve(uint32_t size) noexcept
Sets the size of the container, where all the paints pushed into the Scene are stored.
std::list< Paint * > & paints() noexcept
Returns the list of the paints that currently held by the Scene.
-
A class representing two-dimensional figures and their properties.
Definition: thorvg.h:817
+
A class representing two-dimensional figures and their properties.
Definition: thorvg.h:804
Result reset() noexcept
Resets the properties of the shape path.
-
A class for the rendering graphical elements with a software raster engine.
Definition: thorvg.h:1479
+
A class for the rendering graphical elements with a software raster engine.
Definition: thorvg.h:1605
Result target(uint32_t *buffer, uint32_t stride, uint32_t w, uint32_t h, Colorspace cs) noexcept
Sets the target buffer for the rasterization.
Result mempool(MempoolPolicy policy) noexcept
Set sw engine memory pool behavior policy.
-
Colorspace
Enumeration specifying the methods of combining the 8-bit color channels into 32-bit color.
Definition: thorvg.h:1487
-
@ ARGB8888S
@BETA_API The channels are joined in the order: alpha, red, green, blue. Colors are un-alpha-premulti...
Definition: thorvg.h:1491
-
@ ABGR8888S
@BETA_API The channels are joined in the order: alpha, blue, green, red. Colors are un-alpha-premulti...
Definition: thorvg.h:1490
-
@ ARGB8888
The channels are joined in the order: alpha, red, green, blue. Colors are alpha-premultiplied....
Definition: thorvg.h:1489
-
MempoolPolicy
Enumeration specifying the methods of Memory Pool behavior policy.
Definition: thorvg.h:1499
-
@ Shareable
Memory Pool is shared among the SwCanvases.
Definition: thorvg.h:1501
+
Colorspace
Enumeration specifying the methods of combining the 8-bit color channels into 32-bit color.
Definition: thorvg.h:1613
+
@ ARGB8888S
The channels are joined in the order: alpha, red, green, blue. Colors are un-alpha-premultiplied.
Definition: thorvg.h:1617
+
@ ABGR8888S
The channels are joined in the order: alpha, blue, green, red. Colors are un-alpha-premultiplied.
Definition: thorvg.h:1616
+
@ ARGB8888
The channels are joined in the order: alpha, red, green, blue. Colors are alpha-premultiplied....
Definition: thorvg.h:1615
+
MempoolPolicy
Enumeration specifying the methods of Memory Pool behavior policy.
Definition: thorvg.h:1625
+
@ Shareable
Memory Pool is shared among the SwCanvases.
Definition: thorvg.h:1627
static std::unique_ptr< SwCanvas > gen() noexcept
Creates a new SwCanvas object.
-
FillSpread
Enumeration specifying how to fill the area outside the gradient bounds.
Definition: thorvg.h:143
-
std::unique_ptr< T > cast(Fill *fill)
The cast() function is a utility function used to cast a 'Fill' to type 'T'.
Definition: thorvg.h:1872
-
Result
Enumeration specifying the result from the APIs.
Definition: thorvg.h:91
-
CanvasEngine
Enumeration specifying the engine type used for the graphics backend. For multiple backends bitwise o...
Definition: thorvg.h:214
-
BlendMethod
Enumeration indicates the method used for blending paint. Please refer to the respective formulas for...
Definition: thorvg.h:192
-
StrokeCap
Enumeration determining the ending type of a stroke in the open sub-paths.
Definition: thorvg.h:121
-
PathCommand
Enumeration specifying the values of the path commands accepted by TVG.
Definition: thorvg.h:109
-
FillRule
Enumeration specifying the algorithm used to establish which parts of the shape are treated as the in...
Definition: thorvg.h:154
-
CompositeMethod
Enumeration indicating the method used in the composition of two objects - the target and the source.
Definition: thorvg.h:168
-
StrokeJoin
Enumeration determining the style used at the corners of joined stroked path segments.
Definition: thorvg.h:132
+
A class to represent text objects in a graphical context, allowing for rendering and manipulation of ...
Definition: thorvg.h:1475
+
Result font(const char *name, float size, const char *style=nullptr) noexcept
Sets the font properties for the text.
+
A class for the rendering graphic elements with a WebGPU raster engine.
Definition: thorvg.h:1732
+
Result target(void *window, uint32_t w, uint32_t h) noexcept
Sets the target window for the rasterization.
+
static std::unique_ptr< WgCanvas > gen() noexcept
Creates a new WgCanvas object.
+
FillSpread
Enumeration specifying how to fill the area outside the gradient bounds.
Definition: thorvg.h:129
+
std::unique_ptr< T > cast(Fill *fill)
The cast() function is a utility function used to cast a 'Fill' to type 'T'.
Definition: thorvg.h:2068
+
Result
Enumeration specifying the result from the APIs.
Definition: thorvg.h:77
+
CanvasEngine
Enumeration specifying the engine type used for the graphics backend. For multiple backends bitwise o...
Definition: thorvg.h:200
+
BlendMethod
Enumeration indicates the method used for blending paint. Please refer to the respective formulas for...
Definition: thorvg.h:178
+
StrokeCap
Enumeration determining the ending type of a stroke in the open sub-paths.
Definition: thorvg.h:107
+
PathCommand
Enumeration specifying the values of the path commands accepted by TVG.
Definition: thorvg.h:95
+
FillRule
Enumeration specifying the algorithm used to establish which parts of the shape are treated as the in...
Definition: thorvg.h:140
+
CompositeMethod
Enumeration indicating the method used in the composition of two objects - the target and the source.
Definition: thorvg.h:154
+
StrokeJoin
Enumeration determining the style used at the corners of joined stroked path segments.
Definition: thorvg.h:118
@ Repeat
The gradient pattern is repeated continuously beyond the gradient area until the expected region is f...
@ Reflect
The gradient pattern is reflected outside the gradient area until the expected region is filled.
@ Pad
The remaining area is filled with the closest stop color.
@@ -733,6 +781,7 @@ $(document).ready(function(){initNavTree('thorvg_8h_source.html',''); initResiza
@ MemoryCorruption
The value returned in the event of bad memory handling - e.g. failing in pointer releasing or casting...
+
@ Wg
WebGPU rasterizer. (Experimental API)
@ SoftLight
The same as Overlay but with applying pure black or white does not result in pure black or white....
@ Lighten
Only has the opposite action of Darken Only. max(S, D)
@ Exclusion
The result is twice the product of the top and bottom layers, subtracted from their sum....
@@ -762,23 +811,23 @@ $(document).ready(function(){initNavTree('thorvg_8h_source.html',''); initResiza
@ ClipPath
The intersection of the source and the target is determined and only the resulting pixels from the so...
@ None
No composition is applied.
@ DifferenceMask
Calculates the absolute difference between the target color and the source color multiplied by the co...
-
@ AddMask
Combines the target and source objects pixels using target alpha. (T * TA) + (S * (255 - TA)) @BETA_A...
+
@ AddMask
Combines the target and source objects pixels using target alpha. (T * TA) + (S * (255 - TA)) (Experi...
@ SubtractMask
Subtracts the source color from the target color while considering their respective target alpha....
@ AlphaMask
Alpha Masking using the compositing target's pixels as an alpha value.
@ IntersectMask
Computes the result by taking the minimum value between the target alpha and the source alpha and mul...
@ Bevel
The outer corner of the joined path segments is bevelled at the join point. The triangular region of ...
@ Round
The outer corner of the joined path segments is rounded. The circular region is centered at the join ...
@ Miter
The outer corner of the joined path segments is spiked. The spike is created by extension beyond the ...
-
A data structure storing the information about the color and its relative position inside the gradien...
Definition: thorvg.h:480
-
uint8_t g
Definition: thorvg.h:483
-
float offset
Definition: thorvg.h:481
-
uint8_t b
Definition: thorvg.h:484
-
uint8_t r
Definition: thorvg.h:482
-
uint8_t a
Definition: thorvg.h:485
-
A data structure representing a three-dimensional matrix.
Definition: thorvg.h:237
-
A data structure representing a point in two-dimensional space.
Definition: thorvg.h:224
-
A data structure representing a triange in a texture mesh.
Definition: thorvg.h:267
-
A data structure representing a texture mesh vertex.
Definition: thorvg.h:253
+
A data structure storing the information about the color and its relative position inside the gradien...
Definition: thorvg.h:467
+
uint8_t g
Definition: thorvg.h:470
+
float offset
Definition: thorvg.h:468
+
uint8_t b
Definition: thorvg.h:471
+
uint8_t r
Definition: thorvg.h:469
+
uint8_t a
Definition: thorvg.h:472
+
A data structure representing a three-dimensional matrix.
Definition: thorvg.h:224
+
A data structure representing a point in two-dimensional space.
Definition: thorvg.h:211
+
A data structure representing a triange in a texture mesh.
Definition: thorvg.h:254
+
A data structure representing a texture mesh vertex.
Definition: thorvg.h:240