diff --git a/docs/Doxyfile b/docs/Doxyfile index b58205ad..893db116 100644 --- a/docs/Doxyfile +++ b/docs/Doxyfile @@ -38,7 +38,7 @@ PROJECT_NAME = ThorVG # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = v0.14 +PROJECT_NUMBER = v0.15 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/docs/html/annotated.html b/docs/html/annotated.html index 04dd0206..5edcea74 100644 --- a/docs/html/annotated.html +++ b/docs/html/annotated.html @@ -27,7 +27,7 @@ Logo
ThorVG -  v0.14 +  v0.15
@@ -92,25 +92,23 @@ $(document).ready(function(){initNavTree('annotated.html',''); initResizable();  Ntvg  CPointA data structure representing a point in two-dimensional space  CMatrixA data structure representing a three-dimensional matrix - CVertexA data structure representing a texture mesh vertex - CPolygonA data structure representing a triangle in a texture mesh - CPaintAn abstract class for managing graphical elements - CFillAn abstract class representing the gradient fill of the Shape object - CColorStopA data structure storing the information about the color and its relative position inside the gradient bounds - CCanvasAn abstract class for drawing graphical elements - CLinearGradientA class representing the linear gradient fill of the Shape object - CRadialGradientA class representing the radial gradient fill of the Shape object - CShapeA class representing two-dimensional figures and their properties - CPictureA 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 - CSceneA class to composite children paints - CTextA class to represent text objects in a graphical context, allowing for rendering and manipulation of unicode text - CSwCanvasA class for the rendering graphical elements with a software raster engine - CGlCanvasA class for the rendering graphic elements with a GL raster engine - CWgCanvasA class for the rendering graphic elements with a WebGPU raster engine - CInitializerA class that enables initialization and termination of the TVG engines - CAnimationEnables manipulation of animatable images - CSaverA class for exporting a paint object into a specified file, from which to recover the paint data later - CAccessorThe Accessor is a utility class to debug the Scene structure by traversing the scene-tree + CPaintAn abstract class for managing graphical elements + CFillAn abstract class representing the gradient fill of the Shape object + CColorStopA data structure storing the information about the color and its relative position inside the gradient bounds + CCanvasAn abstract class for drawing graphical elements + CLinearGradientA class representing the linear gradient fill of the Shape object + CRadialGradientA class representing the radial gradient fill of the Shape object + CShapeA class representing two-dimensional figures and their properties + CPictureA 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 + CSceneA class to composite children paints + CTextA class to represent text objects in a graphical context, allowing for rendering and manipulation of unicode text + CSwCanvasA class for the rendering graphical elements with a software raster engine + CGlCanvasA class for the rendering graphic elements with a GL raster engine + CWgCanvasA class for the rendering graphic elements with a WebGPU raster engine + CInitializerA class that enables initialization and termination of the TVG engines + CAnimationEnables manipulation of animatable images + CSaverA class for exporting a paint object into a specified file, from which to recover the paint data later + CAccessorThe Accessor is a utility class to debug the Scene structure by traversing the scene-tree diff --git a/docs/html/annotated_dup.js b/docs/html/annotated_dup.js index e85ecdcf..72285c5e 100644 --- a/docs/html/annotated_dup.js +++ b/docs/html/annotated_dup.js @@ -3,8 +3,6 @@ var annotated_dup = [ "tvg", null, [ [ "Point", "structtvg_1_1Point.html", null ], [ "Matrix", "structtvg_1_1Matrix.html", null ], - [ "Vertex", "structtvg_1_1Vertex.html", null ], - [ "Polygon", "structtvg_1_1Polygon.html", null ], [ "Paint", "classtvg_1_1Paint.html", "classtvg_1_1Paint" ], [ "Fill", "classtvg_1_1Fill.html", "classtvg_1_1Fill" ], [ "Canvas", "classtvg_1_1Canvas.html", "classtvg_1_1Canvas" ], diff --git a/docs/html/classes.html b/docs/html/classes.html index 0a0d162f..07516267 100644 --- a/docs/html/classes.html +++ b/docs/html/classes.html @@ -27,7 +27,7 @@ Logo
ThorVG -  v0.14 +  v0.15
@@ -87,7 +87,7 @@ $(document).ready(function(){initNavTree('classes.html',''); initResizable(); })
Class Index
-
A | C | F | G | I | L | M | P | R | S | T | V | W
+
A | C | F | G | I | L | M | P | R | S | T | W
A
@@ -112,7 +112,7 @@ $(document).ready(function(){initNavTree('classes.html',''); initResizable(); })
Matrix (tvg)
P
-
Paint (tvg)
Picture (tvg)
Point (tvg)
Polygon (tvg)
+
Paint (tvg)
Picture (tvg)
Point (tvg)
R
RadialGradient (tvg)
@@ -123,9 +123,6 @@ $(document).ready(function(){initNavTree('classes.html',''); initResizable(); })
T
Text (tvg)
-
V
-
Vertex (tvg)
-
W
WgCanvas (tvg)
diff --git a/docs/html/classtvg_1_1Accessor-members.html b/docs/html/classtvg_1_1Accessor-members.html index 5ec1ba6c..9760738a 100644 --- a/docs/html/classtvg_1_1Accessor-members.html +++ b/docs/html/classtvg_1_1Accessor-members.html @@ -27,7 +27,7 @@ Logo
ThorVG -  v0.14 +  v0.15
@@ -91,7 +91,8 @@ $(document).ready(function(){initNavTree('classtvg_1_1Accessor.html',''); initRe

This is the complete list of members for Accessor, including all inherited members.

- + +
gen() noexceptAccessorstatic
set(std::unique_ptr< Picture > picture, std::function< bool(const Paint *paint)> func) noexceptAccessor
id(const char *name) noexceptAccessorstatic
set(const Picture *picture, std::function< bool(const Paint *paint, void *data)> func, void *data) noexceptAccessor
diff --git a/docs/html/classtvg_1_1Accessor.html b/docs/html/classtvg_1_1Accessor.html index e2aecf76..8b16c486 100644 --- a/docs/html/classtvg_1_1Accessor.html +++ b/docs/html/classtvg_1_1Accessor.html @@ -27,7 +27,7 @@ Logo
ThorVG -  v0.14 +  v0.15
@@ -97,12 +97,15 @@ $(document).ready(function(){initNavTree('classtvg_1_1Accessor.html',''); initRe - - - + + +

Public Member Functions

std::unique_ptr< Pictureset (std::unique_ptr< Picture > picture, std::function< bool(const Paint *paint)> func) noexcept
 Set the access function for traversing the Picture scene tree nodes. More...
 
Result set (const Picture *picture, std::function< bool(const Paint *paint, void *data)> func, void *data) noexcept
 Set the access function for traversing the Picture scene tree nodes. More...
 
+ + + @@ -141,8 +144,8 @@ Static Public Member Functions - -

◆ set()

+ +

◆ id()

@@ -151,16 +154,60 @@ Static Public Member Functions
+ + +

Static Public Member Functions

static uint32_t id (const char *name) noexcept
 Generate a unique ID (hash key) from a given name. More...
 
static std::unique_ptr< Accessorgen () noexcept
 Creates a new Accessor object. More...
 
- + - + + + + +
std::unique_ptr<Picture> set static uint32_t id (std::unique_ptr< Pictureconst char * name)
+
+staticnoexcept
+
+ +

Generate a unique ID (hash key) from a given name.

+

This function computes a unique identifier value based on the provided string. You can use this to assign a unique ID to the Paint object.

+
Parameters
+ + +
[in]nameThe input string to generate the unique identifier from.
+
+
+
Returns
The generated unique identifier value.
+
See also
Paint::id
+
Note
Experimental API
+ +
+ + +

◆ set()

+ +
+
+ + + diff --git a/docs/html/classtvg_1_1Animation.html b/docs/html/classtvg_1_1Animation.html index d228ff9c..9e6aac1c 100644 --- a/docs/html/classtvg_1_1Animation.html +++ b/docs/html/classtvg_1_1Animation.html @@ -27,7 +27,7 @@ @@ -395,10 +395,10 @@ Static Public Member Functions
+ + + + + - - + + + + + + + + @@ -179,12 +226,14 @@ Static Public Member Functions
Parameters
Result set (const Picture picture,
std::function< bool(const Paint *paint)> func std::function< bool(const Paint *paint, void *data)> func,
void * data 
- + +
[in]pictureThe picture node to traverse the internal scene-tree.
[in]funcThe callback function calling for every paint nodes of the Picture.
[in]funcThe callback function calling for every paint nodes of the Picture.
[in]dataData passed to the func as its argument.
-
Returns
Return the given picture instance.
-
Note
The bitmap based picture might not have the scene-tree.
+
Note
The bitmap based picture might not have the scene-tree.
+
+Experimental API
diff --git a/docs/html/classtvg_1_1Accessor.js b/docs/html/classtvg_1_1Accessor.js index d8efc84b..d5c788d4 100644 --- a/docs/html/classtvg_1_1Accessor.js +++ b/docs/html/classtvg_1_1Accessor.js @@ -1,4 +1,4 @@ var classtvg_1_1Accessor = [ - [ "set", "classtvg_1_1Accessor.html#a845badc349250125a45b3d90742d23d1", null ] + [ "set", "classtvg_1_1Accessor.html#a19696fc28e7eb51f5a4a8603c60e789d", null ] ]; \ No newline at end of file diff --git a/docs/html/classtvg_1_1Animation-members.html b/docs/html/classtvg_1_1Animation-members.html index a3da931c..17e7d5a8 100644 --- a/docs/html/classtvg_1_1Animation-members.html +++ b/docs/html/classtvg_1_1Animation-members.html @@ -27,7 +27,7 @@
ThorVG -  v0.14 +  v0.15
ThorVG -  v0.14 +  v0.15
-
Note
Range from 0.0~1.0
+
Note
Animation allows a range from 0.0 to 1.0. end should not be higher than begin.
If a marker has been specified, its range will be disregarded.
-
See also
LottieAnimation::segment(const char* marker)
+
See also
LottieAnimation::segment(const char* marker)
Note
Experimental API
diff --git a/docs/html/classtvg_1_1Canvas-members.html b/docs/html/classtvg_1_1Canvas-members.html index 9aa1ba98..2ca7d060 100644 --- a/docs/html/classtvg_1_1Canvas-members.html +++ b/docs/html/classtvg_1_1Canvas-members.html @@ -27,7 +27,7 @@ Logo
ThorVG -  v0.14 +  v0.15
diff --git a/docs/html/classtvg_1_1Canvas.html b/docs/html/classtvg_1_1Canvas.html index dc63ed4f..f22a42bb 100644 --- a/docs/html/classtvg_1_1Canvas.html +++ b/docs/html/classtvg_1_1Canvas.html @@ -27,7 +27,7 @@ Logo
ThorVG -  v0.14 +  v0.15
@@ -303,6 +303,12 @@ Public Member Functions

Guarantees that drawing task is finished.

The Canvas rendering can be performed asynchronously. To make sure that rendering is finished, the sync() must be called after the draw() regardless of threading.

+
Return values
+ + +
Result::InsufficientConditionThe canvas is either already in sync condition or in a damaged condition (a draw is required before syncing).
+
+
See also
Canvas::draw()
@@ -404,11 +410,10 @@ Public Member Functions
GlCanvas::target()
-WgCanvas::target()
+WgCanvas::target()
Warning
It's not allowed to change the viewport during Canvas::push() - Canvas::sync() or Canvas::update() - Canvas::sync().
-
Note
When resetting the target, the viewport will also be reset to the target size.
-
-Experimental API
+
Note
When resetting the target, the viewport will also be reset to the target size.
+
Since
0.15
diff --git a/docs/html/classtvg_1_1Fill-members.html b/docs/html/classtvg_1_1Fill-members.html index fdf2a149..d6e1a6e9 100644 --- a/docs/html/classtvg_1_1Fill-members.html +++ b/docs/html/classtvg_1_1Fill-members.html @@ -27,7 +27,7 @@ Logo
ThorVG -  v0.14 +  v0.15
@@ -93,11 +93,12 @@ $(document).ready(function(){initNavTree('classtvg_1_1Fill.html',''); initResiza colorStops(const ColorStop *colorStops, uint32_t cnt) noexceptFill colorStops(const ColorStop **colorStops) const noexceptFill duplicate() const noexceptFill - identifier() const noexceptFill + identifier() const noexceptFill spread(FillSpread s) noexceptFill spread() const noexceptFill transform(const Matrix &m) noexceptFill transform() const noexceptFill + type() const noexcept=0Fillpure virtual diff --git a/docs/html/classtvg_1_1Fill.html b/docs/html/classtvg_1_1Fill.html index e6cd7d2a..dad5fb7d 100644 --- a/docs/html/classtvg_1_1Fill.html +++ b/docs/html/classtvg_1_1Fill.html @@ -27,7 +27,7 @@ Logo
ThorVG -  v0.14 +  v0.15
@@ -88,7 +88,7 @@ $(document).ready(function(){initNavTree('classtvg_1_1Fill.html',''); initResiza Public Member Functions | List of all members
-
Fill
+
Fillabstract
ThorVG
@@ -134,9 +134,11 @@ Public Member Functions Fillduplicate () const noexcept  Creates a copy of the Fill object. More...
  -uint32_t identifier () const noexcept - Return the unique id value of the Fill instance. More...
-  +virtual Type type () const noexcept=0 + Returns the ID value of this class. More...
+  +TVG_DEPRECATED uint32_t identifier () const noexcept + 

Detailed Description

An abstract class representing the gradient fill of the Shape object.

@@ -251,8 +253,8 @@ Public Member Functions
- -

◆ identifier()

+ +

◆ identifier()

@@ -261,7 +263,7 @@ Public Member Functions - + @@ -273,10 +275,7 @@ Public Member Functions
uint32_t identifier TVG_DEPRECATED uint32_t identifier ( ) const
- -

Return the unique id value of the Fill instance.

-

This method can be called for checking the current concrete instance type.

-
Returns
The type id of the Fill instance.
+
See also
Fill::type()
@@ -404,6 +403,38 @@ Public Member Functions + + + +

◆ type()

+ +
+
+ + + + + +
+ + + + + + + +
virtual Type type () const
+
+pure virtualnoexcept
+
+ +

Returns the ID value of this class.

+

This method can be used to check the current concrete instance type.

+
Returns
The class type ID of the Fill instance.
+
Since
Experimental API
+ +

Implemented in RadialGradient, and LinearGradient.

+
diff --git a/docs/html/classtvg_1_1Fill.js b/docs/html/classtvg_1_1Fill.js index d9ccb3e7..0ed5fdb4 100644 --- a/docs/html/classtvg_1_1Fill.js +++ b/docs/html/classtvg_1_1Fill.js @@ -4,9 +4,10 @@ var classtvg_1_1Fill = [ "colorStops", "classtvg_1_1Fill.html#addbc9de36b4427639f3cc1dceeccb734", null ], [ "colorStops", "classtvg_1_1Fill.html#a92717fc84a7d5df56e42e3bc863fce1a", null ], [ "duplicate", "classtvg_1_1Fill.html#a48e358abab4478ff7f84dfb85608eaf3", null ], - [ "identifier", "classtvg_1_1Fill.html#a37466e9eff2de62ff15c9df3d72b656d", null ], + [ "identifier", "classtvg_1_1Fill.html#aee92a597f61d9bbdbd223b5dfc3877b7", null ], [ "spread", "classtvg_1_1Fill.html#a55f6de063e5ac8023243c9cef5cb9a12", null ], [ "spread", "classtvg_1_1Fill.html#aed49d00ca09e69fdf97aaae235f8e950", null ], [ "transform", "classtvg_1_1Fill.html#ad96ad531732975db718aaf1210d47cd7", null ], - [ "transform", "classtvg_1_1Fill.html#ac9f6ba428afe884bcc2861de0a2a96f4", null ] + [ "transform", "classtvg_1_1Fill.html#ac9f6ba428afe884bcc2861de0a2a96f4", null ], + [ "type", "classtvg_1_1Fill.html#aec24b20e43f4edf0fc046517db603181", null ] ]; \ No newline at end of file diff --git a/docs/html/classtvg_1_1GlCanvas-members.html b/docs/html/classtvg_1_1GlCanvas-members.html index fef1a7f5..2c2c72b1 100644 --- a/docs/html/classtvg_1_1GlCanvas-members.html +++ b/docs/html/classtvg_1_1GlCanvas-members.html @@ -27,7 +27,7 @@ Logo
ThorVG -  v0.14 +  v0.15
diff --git a/docs/html/classtvg_1_1GlCanvas.html b/docs/html/classtvg_1_1GlCanvas.html index 51498412..1e396d6f 100644 --- a/docs/html/classtvg_1_1GlCanvas.html +++ b/docs/html/classtvg_1_1GlCanvas.html @@ -27,7 +27,7 @@ Logo
ThorVG -  v0.14 +  v0.15
@@ -149,7 +149,6 @@ Static Public Member Functions

Detailed Description

A class for the rendering graphic elements with a GL raster engine.

-
Warning
Please do not use it. This class is not fully supported yet.
Since
0.14

Member Function Documentation

diff --git a/docs/html/classtvg_1_1Initializer-members.html b/docs/html/classtvg_1_1Initializer-members.html index b8718670..81211fa8 100644 --- a/docs/html/classtvg_1_1Initializer-members.html +++ b/docs/html/classtvg_1_1Initializer-members.html @@ -27,7 +27,7 @@ Logo
ThorVG -  v0.14 +  v0.15
@@ -92,6 +92,7 @@ $(document).ready(function(){initNavTree('classtvg_1_1Initializer.html',''); ini +
init(CanvasEngine engine, uint32_t threads) noexceptInitializerstatic
term(CanvasEngine engine) noexceptInitializerstatic
version(uint32_t *major, uint32_t *minor, uint32_t *micro) noexceptInitializerstatic
diff --git a/docs/html/classtvg_1_1Initializer.html b/docs/html/classtvg_1_1Initializer.html index 038fdb27..ceecb68a 100644 --- a/docs/html/classtvg_1_1Initializer.html +++ b/docs/html/classtvg_1_1Initializer.html @@ -27,7 +27,7 @@ Logo
ThorVG -  v0.14 +  v0.15
@@ -102,6 +102,9 @@ Static Public Member Functions static Result term (CanvasEngine engine) noexcept  Terminates TVG engines. More...
  +static const char * version (uint32_t *major, uint32_t *minor, uint32_t *micro) noexcept + Retrieves the version of the TVG engine. More...

Detailed Description

A class that enables initialization and termination of the TVG engines.

@@ -201,6 +204,60 @@ Static Public Member Functions
Note
Initializer does own reference counting for multiple calls.
See also
Initializer::init()
+
+ + +

◆ version()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
static const char* version (uint32_t * major,
uint32_t * minor,
uint32_t * micro 
)
+
+staticnoexcept
+
+ +

Retrieves the version of the TVG engine.

+
Parameters
+ + + + +
[out]majorA major version number.
[out]minorA minor version number.
[out]microA micro version number.
+
+
+
Returns
The version of the engine in the format major.minor.micro, or a nullptr in case of an internal error.
+
Since
0.15
+
diff --git a/docs/html/classtvg_1_1LinearGradient-members.html b/docs/html/classtvg_1_1LinearGradient-members.html index df4e2970..e0aaf8f2 100644 --- a/docs/html/classtvg_1_1LinearGradient-members.html +++ b/docs/html/classtvg_1_1LinearGradient-members.html @@ -27,7 +27,7 @@ Logo
ThorVG -  v0.14 +  v0.15
@@ -94,14 +94,15 @@ $(document).ready(function(){initNavTree('classtvg_1_1LinearGradient.html',''); colorStops(const ColorStop **colorStops) const noexceptFill duplicate() const noexceptFill gen() noexceptLinearGradientstatic - identifier() noexceptLinearGradientstatic - tvg::Fill::identifier() const noexceptFill + identifier() noexceptLinearGradientstatic + tvg::Fill::identifier() const noexceptFill linear(float x1, float y1, float x2, float y2) noexceptLinearGradient linear(float *x1, float *y1, float *x2, float *y2) const noexceptLinearGradient spread(FillSpread s) noexceptFill spread() const noexceptFill transform(const Matrix &m) noexceptFill transform() const noexceptFill + type() const noexcept overrideLinearGradientvirtual diff --git a/docs/html/classtvg_1_1LinearGradient.html b/docs/html/classtvg_1_1LinearGradient.html index 3b8af9e1..17fe781c 100644 --- a/docs/html/classtvg_1_1LinearGradient.html +++ b/docs/html/classtvg_1_1LinearGradient.html @@ -27,7 +27,7 @@ Logo
ThorVG -  v0.14 +  v0.15
@@ -121,6 +121,9 @@ Public Member Functions Result linear (float *x1, float *y1, float *x2, float *y2) const noexcept  Gets the linear gradient bounds. More...
  +Type type () const noexcept override + Returns the ID value of this class. More...
- Public Member Functions inherited from Fill Result colorStops (const ColorStop *colorStops, uint32_t cnt) noexcept  Sets the parameters of the colors of the gradient and their position. More...
@@ -143,18 +146,16 @@ Public Member Functions Fillduplicate () const noexcept  Creates a copy of the Fill object. More...
  -uint32_t identifier () const noexcept - Return the unique id value of the Fill instance. More...
-  +TVG_DEPRECATED uint32_t identifier () const noexcept +  - - - + +

Static Public Member Functions

static std::unique_ptr< LinearGradientgen () noexcept
 Creates a new LinearGradient object. More...
 
static uint32_t identifier () noexcept
 Return the unique id value of this class. More...
 
static TVG_DEPRECATED uint32_t identifier () noexcept
 

Detailed Description

A class representing the linear gradient fill of the Shape object.

@@ -188,8 +189,8 @@ Static Public Member Functions
- -

◆ identifier()

+ +

◆ identifier()

@@ -198,7 +199,7 @@ Static Public Member Functions - + @@ -210,10 +211,7 @@ Static Public Member Functions
static uint32_t identifier static TVG_DEPRECATED uint32_t identifier ( )
- -

Return the unique id value of this class.

-

This method can be referred for identifying the LinearGradient class type.

-
Returns
The type id of the LinearGradient class.
+
See also
LinearGradient::type()
@@ -334,7 +332,40 @@ Static Public Member Functions -
Note
In case the first and the second points are equal, an object filled with such a gradient fill is not rendered.
+
Note
In case the first and the second points are equal, an object is filled with a single color using the last color specified in the colorStops().
+
See also
Fill::colorStops()
+ + + + +

◆ type()

+ +
+
+ + + + + +
+ + + + + + + +
Type type () const
+
+overridevirtualnoexcept
+
+ +

Returns the ID value of this class.

+

This method can be used to check the current concrete instance type.

+
Returns
The class type ID of the LinearGradient instance.
+
Since
Experimental API
+ +

Implements Fill.

diff --git a/docs/html/classtvg_1_1LinearGradient.js b/docs/html/classtvg_1_1LinearGradient.js index cff2907b..ebfbb915 100644 --- a/docs/html/classtvg_1_1LinearGradient.js +++ b/docs/html/classtvg_1_1LinearGradient.js @@ -1,5 +1,6 @@ var classtvg_1_1LinearGradient = [ [ "linear", "classtvg_1_1LinearGradient.html#a5c77e9f6e855a595945f45a6b19ee983", null ], - [ "linear", "classtvg_1_1LinearGradient.html#aa881eb89e14ade6a30bc41d7eb8eaf52", null ] + [ "linear", "classtvg_1_1LinearGradient.html#aa881eb89e14ade6a30bc41d7eb8eaf52", null ], + [ "type", "classtvg_1_1LinearGradient.html#a0998d9f221df277cafde4934e3828aa2", null ] ]; \ No newline at end of file diff --git a/docs/html/classtvg_1_1Paint-members.html b/docs/html/classtvg_1_1Paint-members.html index 130ac3ea..747500a3 100644 --- a/docs/html/classtvg_1_1Paint-members.html +++ b/docs/html/classtvg_1_1Paint-members.html @@ -27,7 +27,7 @@ Logo
ThorVG -  v0.14 +  v0.15
@@ -90,21 +90,23 @@ $(document).ready(function(){initNavTree('classtvg_1_1Paint.html',''); initResiz

This is the complete list of members for Paint, including all inherited members.

- - - - + + + + - - - - - - - - + + + + + + + + + +
blend(BlendMethod method) const noexceptPaint
blend() const noexceptPaint
bounds(float *x, float *y, float *w, float *h) const noexceptPaint
bounds(float *x, float *y, float *w, float *h, bool transformed) const noexceptPaint
blend(BlendMethod method) noexceptPaint
bounds(float *x, float *y, float *w, float *h) const noexceptPaint
bounds(float *x, float *y, float *w, float *h, bool transformed) const noexceptPaint
clip(std::unique_ptr< Paint > clipper) noexceptPaint
composite(std::unique_ptr< Paint > target, CompositeMethod method) noexceptPaint
composite(const Paint **target) const noexceptPaint
duplicate() const noexceptPaint
identifier() const noexceptPaint
opacity(uint8_t o) noexceptPaint
opacity() const noexceptPaint
rotate(float degree) noexceptPaint
scale(float factor) noexceptPaint
transform(const Matrix &m) noexceptPaint
transform() noexceptPaint
translate(float x, float y) noexceptPaint
idPaint
identifier() const noexceptPaint
opacity(uint8_t o) noexceptPaint
opacity() const noexceptPaint
rotate(float degree) noexceptPaint
scale(float factor) noexceptPaint
transform(const Matrix &m) noexceptPaint
transform() noexceptPaint
translate(float x, float y) noexceptPaint
type() const noexcept=0Paintpure virtual
diff --git a/docs/html/classtvg_1_1Paint.html b/docs/html/classtvg_1_1Paint.html index 7244dc47..b05bf36f 100644 --- a/docs/html/classtvg_1_1Paint.html +++ b/docs/html/classtvg_1_1Paint.html @@ -27,7 +27,7 @@ Logo
ThorVG -  v0.14 +  v0.15
@@ -85,9 +85,10 @@ $(document).ready(function(){initNavTree('classtvg_1_1Paint.html',''); initResiz
Public Member Functions | +Public Attributes | List of all members
-
Paint
+
Paintabstract
@@ -129,9 +130,12 @@ Public Member Functions Result composite (std::unique_ptr< Paint > target, CompositeMethod method) noexcept  Sets the composition target object and the composition method. More...
  -Result blend (BlendMethod method) const noexcept - Sets the blending method for the paint object. More...
-  +Result clip (std::unique_ptr< Paint > clipper) noexcept + Clip the drawing region of the paint object. More...
+  +Result blend (BlendMethod method) noexcept + Sets the blending method for the paint object. More...
+  TVG_DEPRECATED Result bounds (float *x, float *y, float *w, float *h) const noexcept   Result bounds (float *x, float *y, float *w, float *h, bool transformed) const noexcept @@ -146,48 +150,24 @@ Public Member Functions CompositeMethod composite (const Paint **target) const noexcept  Gets the composition target object and the composition method. More...
  -BlendMethod blend () const noexcept - Gets the blending method of the object. More...
-  -uint32_t identifier () const noexcept - Return the unique id value of the paint instance. More...
-  +virtual Type type () const noexcept=0 + Returns the ID value of this class. More...
+  +TVG_DEPRECATED uint32_t identifier () const noexcept +  + + + + +

+Public Attributes

uint32_t id = 0
 Unique ID of this instance. More...
 

Detailed Description

An abstract class for managing graphical elements.

A graphical element in TVG is any object composed into a Canvas. Paint represents such a graphical object and its behaviors such as duplication, transformation and composition. TVG recommends the user to regard a paint as a set of volatile commands. They can prepare a Paint and then request a Canvas to run them.

Member Function Documentation

- -

◆ blend() [1/2]

- -
-
- - - - - -
- - - - - - - -
BlendMethod blend () const
-
-noexcept
-
- -

Gets the blending method of the object.

-
Returns
The blending method
-
Note
Experimental API
- -
-
- -

◆ blend() [2/2]

+ +

◆ blend()

@@ -200,7 +180,7 @@ Public Member Functions ( BlendMethod  method) - const + @@ -323,18 +303,66 @@ Public Member Functions

Gets the axis-aligned bounding box of the paint object.

-

In case transform is true, all object's transformations are applied first, and then the bounding box is established. Otherwise, the bounding box is determined before any transformations.

Parameters
- +
[out]xThe x-coordinate of the upper-left corner of the object.
[out]yThe y-coordinate of the upper-left corner of the object.
[out]wThe width of the object.
[out]hThe height of the object.
[in]transformedIf true, the paint's transformations are taken into account, otherwise they aren't.
[in]transformedIf true, the paint's transformations are taken into account in the scene it belongs to. Otherwise they aren't.
-
Note
The bounding box doesn't indicate the actual drawing region. It's the smallest rectangle that encloses the object.
+
Note
This is useful when you need to figure out the bounding box of the paint in the canvas space.
+
+The bounding box doesn't indicate the actual drawing region. It's the smallest rectangle that encloses the object.
+
+If transformed is true, the paint needs to be pushed into a canvas and updated before this api is called.
+
See also
Canvas::update()
+ +
+
+ +

◆ clip()

+ +
+
+ + + + + +
+ + + + + + + + +
Result clip (std::unique_ptr< Paintclipper)
+
+noexcept
+
+ +

Clip the drawing region of the paint object.

+

This function restricts the drawing area of the paint object to the specified shape's paths.

+
Parameters
+ + +
[in]clipperThe shape object as the clipper.
+
+
+
Return values
+ + +
Result::NonSupportIf the clipper type is not Shape.
+
+
+
Note
clipper only supports the Shape type.
+
+Experimental API
@@ -448,8 +476,8 @@ Public Member Functions
- -

◆ identifier()

+ +

◆ identifier()

@@ -458,7 +486,7 @@ Public Member Functions - + @@ -470,10 +498,7 @@ Public Member Functions
uint32_t identifier TVG_DEPRECATED uint32_t identifier ( ) const
- -

Return the unique id value of the paint instance.

-

This method can be called for checking the current concrete instance type.

-
Returns
The type id of the Paint instance.
+
See also
Paint::type()
@@ -536,9 +561,7 @@ Public Member Functions -
Note
Setting the opacity with this API may require multiple render pass for composition. It is recommended to avoid changing the opacity if possible.
-
-ClipPath won't use the opacity value. (see: enum class CompositeMethod::ClipPath)
+
Note
Setting the opacity with this API may require multiple render pass for composition. It is recommended to avoid changing the opacity if possible.
@@ -570,10 +593,17 @@ ClipPath won't use the opacity value. (see: enum class
Parameters
- +
[in]degreeThe value of the angle in degrees.
[in]degreeThe value of the angle in degrees.
+
Return values
+ + +
Result::InsufficientConditionin case a custom transform is applied.
+
+
+
See also
Paint::transform()
@@ -604,10 +634,17 @@ ClipPath won't use the opacity value. (see: enum class
Parameters
- +
[in]factorThe value of the scaling factor. The default value is 1.
[in]factorThe value of the scaling factor. The default value is 1.
+
Return values
+ + +
Result::InsufficientConditionin case a custom transform is applied.
+
+
+
See also
Paint::transform()
@@ -715,10 +752,68 @@ ClipPath won't use the opacity value. (see: enum class
Parameters
- +
[in]xThe value of the horizontal shift.
[in]yThe value of the vertical shift.
[in]yThe value of the vertical shift.
+
Return values
+ + +
Result::InsufficientConditionin case a custom transform is applied.
+
+
+
See also
Paint::transform()
+ + + + +

◆ type()

+ +
+
+ + + + + +
+ + + + + + + +
virtual Type type () const
+
+pure virtualnoexcept
+
+ +

Returns the ID value of this class.

+

This method can be used to check the current concrete instance type.

+
Returns
The class type ID of the Paint instance.
+
Since
Experimental API
+ +

Implemented in Text, Scene, Picture, and Shape.

+ +
+
+

Member Data Documentation

+ +

◆ id

+ +
+
+ + + + +
uint32_t id = 0
+
+ +

Unique ID of this instance.

+

This is reserved to specify an paint instance in a scene.

+
Since
Experimental API
diff --git a/docs/html/classtvg_1_1Paint.js b/docs/html/classtvg_1_1Paint.js index 301aa6b5..a17f986f 100644 --- a/docs/html/classtvg_1_1Paint.js +++ b/docs/html/classtvg_1_1Paint.js @@ -1,18 +1,20 @@ var classtvg_1_1Paint = [ - [ "blend", "classtvg_1_1Paint.html#a4bd3efb580822b2db64034e3f3cd18ad", null ], - [ "blend", "classtvg_1_1Paint.html#a7e1214a5dc2f3c19ddeedc5371c4e488", null ], + [ "blend", "classtvg_1_1Paint.html#a1878016c09373a24de7b8d618d7be6ee", null ], [ "bounds", "classtvg_1_1Paint.html#aed5a6ad8edd827a378111b590ed7755d", null ], [ "bounds", "classtvg_1_1Paint.html#a1b51b7344eac48d285c073bc488197d3", null ], + [ "clip", "classtvg_1_1Paint.html#a750662e70fca25a8a0e3f6661021c35c", null ], [ "composite", "classtvg_1_1Paint.html#aefe4ade5b1b6bc13d518bd5f968af3ee", null ], [ "composite", "classtvg_1_1Paint.html#a2e2d077b820d1cfd6502a86e0221638b", null ], [ "duplicate", "classtvg_1_1Paint.html#a71afac69fe1e7c352460be5878812635", null ], - [ "identifier", "classtvg_1_1Paint.html#a37466e9eff2de62ff15c9df3d72b656d", null ], + [ "identifier", "classtvg_1_1Paint.html#aee92a597f61d9bbdbd223b5dfc3877b7", null ], [ "opacity", "classtvg_1_1Paint.html#a2ee7517b8bfad47e0f999ba3450e0e3e", null ], [ "opacity", "classtvg_1_1Paint.html#a2f25b71fed3ae390eb8051c7ea65aebf", null ], [ "rotate", "classtvg_1_1Paint.html#a7841fa0c14643e09735d48042ead68f3", null ], [ "scale", "classtvg_1_1Paint.html#a5c057876185525c5723215f95a3984f2", null ], [ "transform", "classtvg_1_1Paint.html#ad1e49b6eb81e87bd860f19e1b92c574b", null ], [ "transform", "classtvg_1_1Paint.html#ac9f6ba428afe884bcc2861de0a2a96f4", null ], - [ "translate", "classtvg_1_1Paint.html#ae896f56bfa51c98a50eee3f2bb62e41e", null ] + [ "translate", "classtvg_1_1Paint.html#ae896f56bfa51c98a50eee3f2bb62e41e", null ], + [ "type", "classtvg_1_1Paint.html#aec24b20e43f4edf0fc046517db603181", null ], + [ "id", "classtvg_1_1Paint.html#abaabdc509cdaba7df9f56c6c76f3ae19", null ] ]; \ No newline at end of file diff --git a/docs/html/classtvg_1_1Picture-members.html b/docs/html/classtvg_1_1Picture-members.html index c7ea543f..67f62d8f 100644 --- a/docs/html/classtvg_1_1Picture-members.html +++ b/docs/html/classtvg_1_1Picture-members.html @@ -27,7 +27,7 @@ Logo
ThorVG -  v0.14 +  v0.15
@@ -90,24 +90,24 @@ $(document).ready(function(){initNavTree('classtvg_1_1Picture.html',''); initRes

This is the complete list of members for Picture, including all inherited members.

- - - - + + + + - - - - - - - - - - + + + + + + + + + + @@ -115,6 +115,7 @@ $(document).ready(function(){initNavTree('classtvg_1_1Picture.html',''); initRes +
blend(BlendMethod method) const noexceptPaint
blend() const noexceptPaint
bounds(float *x, float *y, float *w, float *h) const noexceptPaint
bounds(float *x, float *y, float *w, float *h, bool transformed) const noexceptPaint
blend(BlendMethod method) noexceptPaint
bounds(float *x, float *y, float *w, float *h) const noexceptPaint
bounds(float *x, float *y, float *w, float *h, bool transformed) const noexceptPaint
clip(std::unique_ptr< Paint > clipper) noexceptPaint
composite(std::unique_ptr< Paint > target, CompositeMethod method) noexceptPaint
composite(const Paint **target) const noexceptPaint
duplicate() const noexceptPaint
gen() noexceptPicturestatic
identifier() noexceptPicturestatic
tvg::Paint::identifier() const noexceptPaint
load(const std::string &path) noexceptPicture
load(const char *data, uint32_t size, bool copy=false) noexceptPicture
load(const char *data, uint32_t size, const std::string &mimeType, bool copy=false) noexceptPicture
load(uint32_t *data, uint32_t w, uint32_t h, bool copy) noexceptPicture
mesh(const Polygon *triangles, uint32_t triangleCnt) noexceptPicture
mesh(const Polygon **triangles) const noexceptPicture
opacity(uint8_t o) noexceptPaint
opacity() const noexceptPaint
idPaint
identifier() noexceptPicturestatic
tvg::Paint::identifier() const noexceptPaint
load(const std::string &path) noexceptPicture
load(const char *data, uint32_t size, bool copy=false) noexceptPicture
load(const char *data, uint32_t size, const std::string &mimeType, bool copy=false) noexceptPicture
load(uint32_t *data, uint32_t w, uint32_t h, bool copy) noexceptPicture
opacity(uint8_t o) noexceptPaint
opacity() const noexceptPaint
paint(uint32_t id) noexceptPicture
rotate(float degree) noexceptPaint
scale(float factor) noexceptPaint
size(float w, float h) noexceptPicture
transform(const Matrix &m) noexceptPaint
transform() noexceptPaint
translate(float x, float y) noexceptPaint
type() const noexcept overridePicturevirtual
diff --git a/docs/html/classtvg_1_1Picture.html b/docs/html/classtvg_1_1Picture.html index ae2d8275..f8128565 100644 --- a/docs/html/classtvg_1_1Picture.html +++ b/docs/html/classtvg_1_1Picture.html @@ -27,7 +27,7 @@ Logo
ThorVG -  v0.14 +  v0.15
@@ -130,14 +130,14 @@ Public Member Functions  Gets the size of the image. More...
  Result load (uint32_t *data, uint32_t w, uint32_t h, bool copy) noexcept - Loads a raw data from a memory block with a given size. More...
+ Loads raw data in ARGB8888 format from a memory block of the given size. More...
  -Result mesh (const Polygon *triangles, uint32_t triangleCnt) noexcept - Sets or removes the triangle mesh to deform the image. More...
-  -uint32_t mesh (const Polygon **triangles) const noexcept - Return the number of triangles in the mesh, and optionally get a pointer to the array of triangles in the mesh. More...
-  +const Paintpaint (uint32_t id) noexcept + Retrieve a paint object from the Picture scene by its Unique ID. More...
+  +Type type () const noexcept override + Returns the ID value of this class. More...
- Public Member Functions inherited from Paint Result rotate (float degree) noexcept  Sets the angle by which the object is rotated. More...
@@ -160,9 +160,12 @@ Public Member Functions Result composite (std::unique_ptr< Paint > target, CompositeMethod method) noexcept  Sets the composition target object and the composition method. More...
  -Result blend (BlendMethod method) const noexcept - Sets the blending method for the paint object. More...
-  +Result clip (std::unique_ptr< Paint > clipper) noexcept + Clip the drawing region of the paint object. More...
+  +Result blend (BlendMethod method) noexcept + Sets the blending method for the paint object. More...
+  TVG_DEPRECATED Result bounds (float *x, float *y, float *w, float *h) const noexcept   Result bounds (float *x, float *y, float *w, float *h, bool transformed) const noexcept @@ -177,21 +180,23 @@ Public Member Functions CompositeMethod composite (const Paint **target) const noexcept  Gets the composition target object and the composition method. More...
  -BlendMethod blend () const noexcept - Gets the blending method of the object. More...
-  -uint32_t identifier () const noexcept - Return the unique id value of the paint instance. More...
-  +TVG_DEPRECATED uint32_t identifier () const noexcept +  - - - + + +

Static Public Member Functions

static std::unique_ptr< Picturegen () noexcept
 Creates a new Picture object. More...
 
static uint32_t identifier () noexcept
 Return the unique id value of this class. More...
 
static TVG_DEPRECATED uint32_t identifier () noexcept
 
+ + + + +

+Additional Inherited Members

- Public Attributes inherited from Paint
uint32_t id = 0
 Unique ID of this instance. More...
 

Detailed Description

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.

@@ -227,8 +232,8 @@ See -

◆ identifier()

+ +

◆ identifier()

@@ -237,7 +242,7 @@ See - + @@ -249,10 +254,7 @@ See - -

Return the unique id value of this class.

-

This method can be referred for identifying the Picture class type.

-
Returns
The type id of the Picture class.
+
See also
Picture::type()
@@ -348,7 +350,7 @@ See
Parameters
static uint32_t identifier static TVG_DEPRECATED uint32_t identifier ( )
- + @@ -362,7 +364,7 @@ See
Warning
: It's the user responsibility to release the data memory.
+
Warning
It's the user responsibility to release the data memory.
Note
If you are unsure about the MIME type, you can provide an empty value like "", and thorvg will attempt to figure it out.
Since
0.5
@@ -458,7 +460,7 @@ See
-

Loads a raw data from a memory block with a given size.

+

Loads raw data in ARGB8888 format from a memory block of the given size.

ThorVG efficiently caches the loaded data using the specified data address as a key when the copy has false. This means that loading the same data again will not result in duplicate operations for the sharable data. Instead, ThorVG will reuse the previously loaded picture data.

Parameters
[in]dataA pointer to a memory location where the content of the picture file is stored.
[in]dataA pointer to a memory location where the content of the picture file is stored. A null-terminated string is expected for non-binary data if copy is false.
[in]sizeThe size in bytes of the memory occupied by the data.
[in]mimeTypeMimetype or extension of data such as "jpg", "jpeg", "lottie", "svg", "svg+xml", "png", etc. In case an empty string or an unknown type is provided, the loaders will be tried one by one.
[in]copyIf true the data are copied into the engine local buffer, otherwise they are not.
@@ -474,8 +476,8 @@ See -

◆ mesh() [1/2]

+ +

◆ paint()

@@ -484,59 +486,11 @@ See
- + - - - - -
uint32_t mesh const Paint* paint (const Polygon ** triangles) const
- - -noexcept - - -
-
- -

◆ mesh() [2/2]

- -
-
- - - @@ -546,19 +500,16 @@ See -

Sets or removes the triangle mesh to deform the image.

-

If a mesh is provided, the transform property of the Picture will apply to the triangle mesh, and the image data will be used as the texture.

-

If triangles is nullptr, or triangleCnt is 0, the mesh will be removed.

-

Only raster image types are supported at this time (png, jpg). Vector types like svg and tvg do not support. mesh deformation. However, if required you should be able to render a vector image to a raster image and then apply a mesh.

+

Retrieve a paint object from the Picture scene by its Unique ID.

+

This function searches for a paint object within the Picture scene that matches the provided id.

Parameters
- - - - - - - - - - - - - + - -
Result mesh (const Polygontriangles,
uint32_t triangleCnt 
id) )
- - +
[in]trianglesAn array of Polygons(triangles) that make up the mesh, or null to remove the mesh.
[in]triangleCntThe number of Polygons(triangles) provided, or 0 to remove the mesh.
[in]idThe Unique ID of the paint object.
-
Note
The Polygons are copied internally, so modifying them after calling Mesh::mesh has no affect.
-
Warning
Please do not use it, this API is not official one. It could be modified in the next version.
+
Returns
A pointer to the paint object that matches the given identifier, or nullptr if no matching paint object is found.
+
See also
Accessor::id()
Note
Experimental API
@@ -652,6 +603,38 @@ See +

◆ type()

+ +
+
+ + + + + +
+ + + + + + + +
Type type () const
+
+overridevirtualnoexcept
+
+ +

Returns the ID value of this class.

+

This method can be used to check the current concrete instance type.

+
Returns
The class type ID of the Picture instance.
+
Since
Experimental API
+ +

Implements Paint.

+
diff --git a/docs/html/classtvg_1_1Picture.js b/docs/html/classtvg_1_1Picture.js index b1343d91..4a11a93b 100644 --- a/docs/html/classtvg_1_1Picture.js +++ b/docs/html/classtvg_1_1Picture.js @@ -4,8 +4,8 @@ var classtvg_1_1Picture = [ "load", "classtvg_1_1Picture.html#a95979a7c4ce51445c7ef9d6461c34767", null ], [ "load", "classtvg_1_1Picture.html#aaf06be7d0b572c5ce35315cbddd7d318", null ], [ "load", "classtvg_1_1Picture.html#a1fdf75092cebaa7cde48d6a7d4946368", null ], - [ "mesh", "classtvg_1_1Picture.html#ae4d1479dbae28f521da8e90f91a97caa", null ], - [ "mesh", "classtvg_1_1Picture.html#a761d19e78330e8ce73add01cbf1cd2e9", null ], + [ "paint", "classtvg_1_1Picture.html#aeaff657c918ea2a3d984478a5e981ea2", null ], [ "size", "classtvg_1_1Picture.html#af80639ef3460a5cf06278fdc03c13aad", null ], - [ "size", "classtvg_1_1Picture.html#a065e47b46c791ee4d93ed3252d581a40", null ] + [ "size", "classtvg_1_1Picture.html#a065e47b46c791ee4d93ed3252d581a40", null ], + [ "type", "classtvg_1_1Picture.html#a0998d9f221df277cafde4934e3828aa2", null ] ]; \ No newline at end of file diff --git a/docs/html/classtvg_1_1RadialGradient-members.html b/docs/html/classtvg_1_1RadialGradient-members.html index 1a21b9eb..c8e54ec0 100644 --- a/docs/html/classtvg_1_1RadialGradient-members.html +++ b/docs/html/classtvg_1_1RadialGradient-members.html @@ -27,7 +27,7 @@ Logo
ThorVG -  v0.14 +  v0.15
@@ -94,14 +94,15 @@ $(document).ready(function(){initNavTree('classtvg_1_1RadialGradient.html',''); colorStops(const ColorStop **colorStops) const noexceptFill duplicate() const noexceptFill gen() noexceptRadialGradientstatic - identifier() noexceptRadialGradientstatic - tvg::Fill::identifier() const noexceptFill + identifier() noexceptRadialGradientstatic + tvg::Fill::identifier() const noexceptFill radial(float cx, float cy, float radius) noexceptRadialGradient radial(float *cx, float *cy, float *radius) const noexceptRadialGradient spread(FillSpread s) noexceptFill spread() const noexceptFill transform(const Matrix &m) noexceptFill transform() const noexceptFill + type() const noexcept overrideRadialGradientvirtual
diff --git a/docs/html/classtvg_1_1RadialGradient.html b/docs/html/classtvg_1_1RadialGradient.html index 1194158a..ea980351 100644 --- a/docs/html/classtvg_1_1RadialGradient.html +++ b/docs/html/classtvg_1_1RadialGradient.html @@ -27,7 +27,7 @@ Logo
ThorVG -  v0.14 +  v0.15
@@ -121,6 +121,9 @@ Public Member Functions Result radial (float *cx, float *cy, float *radius) const noexcept  Gets the radial gradient bounds. More...
  +Type type () const noexcept override + Returns the ID value of this class. More...
- Public Member Functions inherited from Fill Result colorStops (const ColorStop *colorStops, uint32_t cnt) noexcept  Sets the parameters of the colors of the gradient and their position. More...
@@ -143,18 +146,16 @@ Public Member Functions Fillduplicate () const noexcept  Creates a copy of the Fill object. More...
  -uint32_t identifier () const noexcept - Return the unique id value of the Fill instance. More...
-  +TVG_DEPRECATED uint32_t identifier () const noexcept +  - - - + +

Static Public Member Functions

static std::unique_ptr< RadialGradientgen () noexcept
 Creates a new RadialGradient object. More...
 
static uint32_t identifier () noexcept
 Return the unique id value of this class. More...
 
static TVG_DEPRECATED uint32_t identifier () noexcept
 

Detailed Description

A class representing the radial gradient fill of the Shape object.

@@ -187,8 +188,8 @@ Static Public Member Functions
- -

◆ identifier()

+ +

◆ identifier()

@@ -197,7 +198,7 @@ Static Public Member Functions - + @@ -209,10 +210,7 @@ Static Public Member Functions
static uint32_t identifier static TVG_DEPRECATED uint32_t identifier ( )
- -

Return the unique id value of this class.

-

This method can be referred for identifying the RadialGradient class type.

-
Returns
The type id of the RadialGradient class.
+
See also
RadialGradient::type()
@@ -321,10 +319,43 @@ Static Public Member Functions
Return values
- +
Result::InvalidArgumentsin case the radius value is zero or less.
Result::InvalidArgumentsin case the radius value is zero or less.
+
Note
In case the radius is zero, an object is filled with a single color using the last color specified in the colorStops().
+ + + + +

◆ type()

+ +
+
+ + + + + +
+ + + + + + + +
Type type () const
+
+overridevirtualnoexcept
+
+ +

Returns the ID value of this class.

+

This method can be used to check the current concrete instance type.

+
Returns
The class type ID of the LinearGradient instance.
+
Since
Experimental API
+ +

Implements Fill.

diff --git a/docs/html/classtvg_1_1RadialGradient.js b/docs/html/classtvg_1_1RadialGradient.js index 30769d7c..8490557d 100644 --- a/docs/html/classtvg_1_1RadialGradient.js +++ b/docs/html/classtvg_1_1RadialGradient.js @@ -1,5 +1,6 @@ var classtvg_1_1RadialGradient = [ [ "radial", "classtvg_1_1RadialGradient.html#a706e9ec51bf12483b1d59f99c6fe045e", null ], - [ "radial", "classtvg_1_1RadialGradient.html#a3688387d86ebd5003ee98d90f24a6030", null ] + [ "radial", "classtvg_1_1RadialGradient.html#a3688387d86ebd5003ee98d90f24a6030", null ], + [ "type", "classtvg_1_1RadialGradient.html#a0998d9f221df277cafde4934e3828aa2", null ] ]; \ No newline at end of file diff --git a/docs/html/classtvg_1_1Saver-members.html b/docs/html/classtvg_1_1Saver-members.html index e5d4d03e..e05488f6 100644 --- a/docs/html/classtvg_1_1Saver-members.html +++ b/docs/html/classtvg_1_1Saver-members.html @@ -27,7 +27,7 @@ Logo
ThorVG -  v0.14 +  v0.15
diff --git a/docs/html/classtvg_1_1Saver.html b/docs/html/classtvg_1_1Saver.html index b0ad4bdd..9737f841 100644 --- a/docs/html/classtvg_1_1Saver.html +++ b/docs/html/classtvg_1_1Saver.html @@ -27,7 +27,7 @@ Logo
ThorVG -  v0.14 +  v0.15
@@ -119,7 +119,7 @@ Static Public Member Functions

Detailed Description

A class for exporting a paint object into a specified file, from which to recover the paint data later.

ThorVG provides a feature for exporting & importing paint data. The Saver role is to export the paint data to a file. It's useful when you need to save the composed scene or image from a paint object and recreate it later.

-

The file format is decided by the extension name(i.e. "*.tvg") while the supported formats depend on the TVG packaging environment. If it doesn't support the file format, the save() method returns the Result::NonSupport result.

+

The file format is decided by the extension name(i.e. "*.tvg") while the supported formats depend on the TVG packaging environment. If it doesn't support the file format, the save() method returns the Result::NonSupport result.

Once you export a paint to the file successfully, you can recreate it using the Picture class.

See also
Picture::load()
Since
0.5
diff --git a/docs/html/classtvg_1_1Scene-members.html b/docs/html/classtvg_1_1Scene-members.html index 6bc70570..eed7812c 100644 --- a/docs/html/classtvg_1_1Scene-members.html +++ b/docs/html/classtvg_1_1Scene-members.html @@ -27,7 +27,7 @@ Logo
ThorVG -  v0.14 +  v0.15
@@ -90,26 +90,29 @@ $(document).ready(function(){initNavTree('classtvg_1_1Scene.html',''); initResiz

This is the complete list of members for Scene, including all inherited members.

- - - - - + + + + + - - - - - - + + + + + + + + +
blend(BlendMethod method) const noexceptPaint
blend() const noexceptPaint
bounds(float *x, float *y, float *w, float *h) const noexceptPaint
bounds(float *x, float *y, float *w, float *h, bool transformed) const noexceptPaint
clear(bool free=true) noexceptScene
blend(BlendMethod method) noexceptPaint
bounds(float *x, float *y, float *w, float *h) const noexceptPaint
bounds(float *x, float *y, float *w, float *h, bool transformed) const noexceptPaint
clear(bool free=true) noexceptScene
clip(std::unique_ptr< Paint > clipper) noexceptPaint
composite(std::unique_ptr< Paint > target, CompositeMethod method) noexceptPaint
composite(const Paint **target) const noexceptPaint
duplicate() const noexceptPaint
gen() noexceptScenestatic
identifier() noexceptScenestatic
tvg::Paint::identifier() const noexceptPaint
opacity(uint8_t o) noexceptPaint
opacity() const noexceptPaint
paints() noexceptScene
push(std::unique_ptr< Paint > paint) noexceptScene
idPaint
identifier() noexceptScenestatic
tvg::Paint::identifier() const noexceptPaint
opacity(uint8_t o) noexceptPaint
opacity() const noexceptPaint
paints() noexceptScene
push(std::unique_ptr< Paint > paint) noexceptScene
push(SceneEffect effect,...) noexceptScene
rotate(float degree) noexceptPaint
scale(float factor) noexceptPaint
transform(const Matrix &m) noexceptPaint
transform() noexceptPaint
translate(float x, float y) noexceptPaint
type() const noexcept overrideScenevirtual
diff --git a/docs/html/classtvg_1_1Scene.html b/docs/html/classtvg_1_1Scene.html index 0c7a56d1..af3e47bc 100644 --- a/docs/html/classtvg_1_1Scene.html +++ b/docs/html/classtvg_1_1Scene.html @@ -27,7 +27,7 @@ Logo
ThorVG -  v0.14 +  v0.15
@@ -124,6 +124,12 @@ Public Member Functions Result clear (bool free=true) noexcept  Sets the total number of the paints pushed into the scene to be zero. Depending on the value of the free argument, the paints are freed or not. More...
  +Result push (SceneEffect effect,...) noexcept + Apply a post-processing effect to the scene. More...
+  +Type type () const noexcept override + Returns the ID value of this class. More...
- Public Member Functions inherited from Paint Result rotate (float degree) noexcept  Sets the angle by which the object is rotated. More...
@@ -146,9 +152,12 @@ Public Member Functions Result composite (std::unique_ptr< Paint > target, CompositeMethod method) noexcept  Sets the composition target object and the composition method. More...
  -Result blend (BlendMethod method) const noexcept - Sets the blending method for the paint object. More...
-  +Result clip (std::unique_ptr< Paint > clipper) noexcept + Clip the drawing region of the paint object. More...
+  +Result blend (BlendMethod method) noexcept + Sets the blending method for the paint object. More...
+  TVG_DEPRECATED Result bounds (float *x, float *y, float *w, float *h) const noexcept   Result bounds (float *x, float *y, float *w, float *h, bool transformed) const noexcept @@ -163,21 +172,23 @@ Public Member Functions CompositeMethod composite (const Paint **target) const noexcept  Gets the composition target object and the composition method. More...
  -BlendMethod blend () const noexcept - Gets the blending method of the object. More...
-  -uint32_t identifier () const noexcept - Return the unique id value of the paint instance. More...
-  +TVG_DEPRECATED uint32_t identifier () const noexcept +  - - - + + +

Static Public Member Functions

static std::unique_ptr< Scenegen () noexcept
 Creates a new Scene object. More...
 
static uint32_t identifier () noexcept
 Return the unique id value of this class. More...
 
static TVG_DEPRECATED uint32_t identifier () noexcept
 
+ + + + +

+Additional Inherited Members

- Public Attributes inherited from Paint
uint32_t id = 0
 Unique ID of this instance. More...
 

Detailed Description

A class to composite children paints.

@@ -248,8 +259,8 @@ Static Public Member Functions
- -

◆ identifier()

+ +

◆ identifier()

@@ -258,7 +269,7 @@ Static Public Member Functions - + @@ -270,10 +281,7 @@ Static Public Member Functions
static uint32_t identifier static TVG_DEPRECATED uint32_t identifier ( )
- -

Return the unique id value of this class.

-

This method can be referred for identifying the Scene class type.

-
Returns
The type id of the Scene class.
+
See also
Scene::type()
@@ -305,15 +313,62 @@ Static Public Member Functions
Warning
Please avoid accessing the paints during Scene update/draw. You can access them after calling Canvas::sync().
See also
Canvas::sync()
-Scene::push()
+Scene::push(std::unique_ptr<Paint> paint)
Scene::clear()
Note
Experimental API
+ + + +

◆ push() [1/2]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
Result push (SceneEffect effect,
 ... 
)
+
+noexcept
+
+ +

Apply a post-processing effect to the scene.

+

This function adds a specified scene effect, such as clearing all effects or applying a Gaussian blur, to the scene after it has been rendered. Multiple effects can be applied in sequence.

+
Parameters
+ + + +
[in]effectThe scene effect to apply. Options are defined in the SceneEffect enum. For example, use SceneEffect::GaussianBlur to apply a blur with specific parameters.
[in]...Additional variadic parameters required for certain effects (e.g., sigma and direction for GaussianBlur).
+
+
+
Note
Experimental API
+
-

◆ push()

+

◆ push() [2/2]

@@ -349,6 +404,38 @@ Static Public Member Functions
Scene::clear()
+
+
+ +

◆ type()

+ +
+
+ + + + + +
+ + + + + + + +
Type type () const
+
+overridevirtualnoexcept
+
+ +

Returns the ID value of this class.

+

This method can be used to check the current concrete instance type.

+
Returns
The class type ID of the Scene instance.
+
Since
Experimental API
+ +

Implements Paint.

+
diff --git a/docs/html/classtvg_1_1Scene.js b/docs/html/classtvg_1_1Scene.js index 16c84c91..95156c55 100644 --- a/docs/html/classtvg_1_1Scene.js +++ b/docs/html/classtvg_1_1Scene.js @@ -2,5 +2,7 @@ var classtvg_1_1Scene = [ [ "clear", "classtvg_1_1Scene.html#ac020ea777be697067c6f5c8b18f6a4ed", null ], [ "paints", "classtvg_1_1Scene.html#ace6c268f853a4c144076de89b7bbbe75", null ], - [ "push", "classtvg_1_1Scene.html#a19240cd5b53571da718fabef8afb7103", null ] + [ "push", "classtvg_1_1Scene.html#a8c4d96805c51d1e1876458ad84708925", null ], + [ "push", "classtvg_1_1Scene.html#a19240cd5b53571da718fabef8afb7103", null ], + [ "type", "classtvg_1_1Scene.html#a0998d9f221df277cafde4934e3828aa2", null ] ]; \ No newline at end of file diff --git a/docs/html/classtvg_1_1Shape-members.html b/docs/html/classtvg_1_1Shape-members.html index a4375ec6..f220554c 100644 --- a/docs/html/classtvg_1_1Shape-members.html +++ b/docs/html/classtvg_1_1Shape-members.html @@ -27,7 +27,7 @@ Logo
ThorVG -  v0.14 +  v0.15
@@ -90,14 +90,14 @@ $(document).ready(function(){initNavTree('classtvg_1_1Shape.html',''); initResiz

This is the complete list of members for Shape, including all inherited members.

- + - - - - + + + + @@ -110,37 +110,38 @@ $(document).ready(function(){initNavTree('classtvg_1_1Shape.html',''); initResiz - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + +
appendArc(float cx, float cy, float radius, float startAngle, float sweep, bool pie) noexceptShape
appendArc(float cx, float cy, float radius, float startAngle, float sweep, bool pie) noexceptShape
appendCircle(float cx, float cy, float rx, float ry) noexceptShape
appendPath(const PathCommand *cmds, uint32_t cmdCnt, const Point *pts, uint32_t ptsCnt) noexceptShape
appendRect(float x, float y, float w, float h, float rx=0, float ry=0) noexceptShape
blend(BlendMethod method) const noexceptPaint
blend() const noexceptPaint
bounds(float *x, float *y, float *w, float *h) const noexceptPaint
bounds(float *x, float *y, float *w, float *h, bool transformed) const noexceptPaint
blend(BlendMethod method) noexceptPaint
bounds(float *x, float *y, float *w, float *h) const noexceptPaint
bounds(float *x, float *y, float *w, float *h, bool transformed) const noexceptPaint
clip(std::unique_ptr< Paint > clipper) noexceptPaint
close() noexceptShape
composite(std::unique_ptr< Paint > target, CompositeMethod method) noexceptPaint
composite(const Paint **target) const noexceptPaint
fillColor(uint8_t *r, uint8_t *g, uint8_t *b, uint8_t *a=nullptr) const noexceptShape
fillRule() const noexceptShape
gen() noexceptShapestatic
identifier() noexceptShapestatic
tvg::Paint::identifier() const noexceptPaint
lineTo(float x, float y) noexceptShape
moveTo(float x, float y) noexceptShape
opacity(uint8_t o) noexceptPaint
opacity() const noexceptPaint
order(bool strokeFirst) noexceptShape
pathCommands(const PathCommand **cmds) const noexceptShape
pathCoords(const Point **pts) const noexceptShape
reset() noexceptShape
rotate(float degree) noexceptPaint
scale(float factor) noexceptPaint
stroke(float width) noexceptShape
stroke(uint8_t r, uint8_t g, uint8_t b, uint8_t a=255) noexceptShape
stroke(std::unique_ptr< Fill > f) noexceptShape
stroke(const float *dashPattern, uint32_t cnt) noexceptShape
stroke(StrokeCap cap) noexceptShape
stroke(StrokeJoin join) noexceptShape
strokeCap() const noexceptShape
strokeColor(uint8_t *r, uint8_t *g, uint8_t *b, uint8_t *a=nullptr) const noexceptShape
strokeDash(const float **dashPattern) const noexceptShape
strokeFill() const noexceptShape
strokeJoin() const noexceptShape
strokeMiterlimit(float miterlimit) noexceptShape
strokeMiterlimit() const noexceptShape
strokeTrim(float begin, float end, bool simultaneous=true) noexceptShape
strokeTrim(float *begin, float *end) const noexceptShape
idPaint
identifier() noexceptShapestatic
tvg::Paint::identifier() const noexceptPaint
lineTo(float x, float y) noexceptShape
moveTo(float x, float y) noexceptShape
opacity(uint8_t o) noexceptPaint
opacity() const noexceptPaint
order(bool strokeFirst) noexceptShape
pathCommands(const PathCommand **cmds) const noexceptShape
pathCoords(const Point **pts) const noexceptShape
reset() noexceptShape
rotate(float degree) noexceptPaint
scale(float factor) noexceptPaint
stroke(float width) noexceptShape
stroke(uint8_t r, uint8_t g, uint8_t b, uint8_t a=255) noexceptShape
stroke(std::unique_ptr< Fill > f) noexceptShape
stroke(const float *dashPattern, uint32_t cnt) noexceptShape
stroke(StrokeCap cap) noexceptShape
stroke(StrokeJoin join) noexceptShape
strokeCap() const noexceptShape
strokeColor(uint8_t *r, uint8_t *g, uint8_t *b, uint8_t *a=nullptr) const noexceptShape
strokeDash(const float **dashPattern) const noexceptShape
strokeFill() const noexceptShape
strokeJoin() const noexceptShape
strokeMiterlimit(float miterlimit) noexceptShape
strokeMiterlimit() const noexceptShape
strokeTrim(float begin, float end, bool simultaneous=true) noexceptShape
strokeWidth() const noexceptShape
transform(const Matrix &m) noexceptPaint
transform() noexceptPaint
translate(float x, float y) noexceptPaint
type() const noexcept overrideShapevirtual
diff --git a/docs/html/classtvg_1_1Shape.html b/docs/html/classtvg_1_1Shape.html index 79b5ae4f..8d43eae4 100644 --- a/docs/html/classtvg_1_1Shape.html +++ b/docs/html/classtvg_1_1Shape.html @@ -27,7 +27,7 @@ Logo
ThorVG -  v0.14 +  v0.15
@@ -116,7 +116,7 @@ Collaboration diagram for Shape:

Public Member Functions

Result reset () noexcept - Resets the properties of the shape path. More...
+ Resets the shape path. More...
  Result moveTo (float x, float y) noexcept  Sets the initial point of the sub-path. More...
@@ -136,9 +136,9 @@ Public Member Functions Result appendCircle (float cx, float cy, float rx, float ry) noexcept  Appends an ellipse to the path. More...
  -Result appendArc (float cx, float cy, float radius, float startAngle, float sweep, bool pie) noexcept - Appends a circular arc to the path. More...
-  +TVG_DEPRECATED Result appendArc (float cx, float cy, float radius, float startAngle, float sweep, bool pie) noexcept + Appends a circular arc to the path. More...
Result appendPath (const PathCommand *cmds, uint32_t cmdCnt, const Point *pts, uint32_t ptsCnt) noexcept  Appends a given sub-path to the path. More...
  @@ -214,9 +214,9 @@ Public Member Functions float strokeMiterlimit () const noexcept  Gets the stroke miterlimit. More...
  -bool strokeTrim (float *begin, float *end) const noexcept - Gets the trim of the stroke along the defined path segment. More...
-  +Type type () const noexcept override + Returns the ID value of this class. More...
- Public Member Functions inherited from Paint Result rotate (float degree) noexcept  Sets the angle by which the object is rotated. More...
@@ -239,9 +239,12 @@ Public Member Functions Result composite (std::unique_ptr< Paint > target, CompositeMethod method) noexcept  Sets the composition target object and the composition method. More...
  -Result blend (BlendMethod method) const noexcept - Sets the blending method for the paint object. More...
-  +Result clip (std::unique_ptr< Paint > clipper) noexcept + Clip the drawing region of the paint object. More...
+  +Result blend (BlendMethod method) noexcept + Sets the blending method for the paint object. More...
+  TVG_DEPRECATED Result bounds (float *x, float *y, float *w, float *h) const noexcept   Result bounds (float *x, float *y, float *w, float *h, bool transformed) const noexcept @@ -256,29 +259,31 @@ Public Member Functions CompositeMethod composite (const Paint **target) const noexcept  Gets the composition target object and the composition method. More...
  -BlendMethod blend () const noexcept - Gets the blending method of the object. More...
-  -uint32_t identifier () const noexcept - Return the unique id value of the paint instance. More...
-  +TVG_DEPRECATED uint32_t identifier () const noexcept +  - - - + + +

Static Public Member Functions

static std::unique_ptr< Shapegen () noexcept
 Creates a new Shape object. More...
 
static uint32_t identifier () noexcept
 Return the unique id value of this class. More...
 
static TVG_DEPRECATED uint32_t identifier () noexcept
 
+ + + + +

+Additional Inherited Members

- Public Attributes inherited from Paint
uint32_t id = 0
 Unique ID of this instance. More...
 

Detailed Description

A class representing two-dimensional figures and their properties.

A shape has three major properties: shape outline, stroking, filling. The outline in the Shape is retained as the path. Path can be composed by accumulating primitive commands such as moveTo(), lineTo(), cubicTo(), or complete shape interfaces such as appendRect(), appendCircle(), etc. Path can consists of sub-paths. One sub-path is determined by a close command.

The stroke of Shape is an optional property in case the Shape needs to be represented with/without the outline borders. It's efficient since the shape path and the stroking path can be shared with each other. It's also convenient when controlling both in one context.

Member Function Documentation

- -

◆ appendArc()

+ +

◆ appendArc()

@@ -287,7 +292,7 @@ Static Public Member Functions - + @@ -812,9 +817,7 @@ Static Public Member Functions
Result appendArc TVG_DEPRECATED Result appendArc ( float  cx,
-
Note
Either a solid color or a gradient fill is applied, depending on what was set as last.
-
-ClipPath won't use the fill values. (see: enum class CompositeMethod::ClipPath)
+
Note
Either a solid color or a gradient fill is applied, depending on what was set as last.
@@ -870,11 +873,10 @@ ClipPath won't use the fill values. (see: enum class [out]rThe red color channel value in the range [0 ~ 255]. [out]gThe green color channel value in the range [0 ~ 255]. [out]bThe blue color channel value in the range [0 ~ 255]. - [out]aThe alpha channel value in the range [0 ~ 255], where 0 is completely transparent and 255 is opaque. + [out]aThe alpha channel value in the range [0 ~ 255], where 0 is completely transparent and 255 is opaque. -
Returns
Result::Success when succeed.
@@ -934,8 +936,8 @@ ClipPath won't use the fill values. (see: enum class -

◆ identifier()

+ +

◆ identifier()

@@ -944,7 +946,7 @@ ClipPath won't use the fill values. (see: enum class - + @@ -956,10 +958,7 @@ ClipPath won't use the fill values. (see: enum class - -

Return the unique id value of this class.

-

This method can be referred for identifying the Shape class type.

-
Returns
The type id of the Shape class.
+
See also
Shape::type()
@@ -1184,9 +1183,9 @@ ClipPath won't use the fill values. (see: enum class -

Resets the properties of the shape path.

-

The transformation matrix, the color, the fill and the stroke properties are retained.

-
Note
The memory, where the path data is stored, is not deallocated at this stage for caching effect.
+

Resets the shape path.

+

The transformation matrix, color, fill, and stroke properties are retained.

+
Note
The memory where the path data is stored is not deallocated at this stage to allow for caching.
@@ -1691,57 +1690,10 @@ ClipPath won't use the fill values. (see: enum class
Since
0.11
- - -
-

◆ strokeTrim() [1/2]

- -
-
-
static uint32_t identifier static TVG_DEPRECATED uint32_t identifier ( )
- - - - -
- - - - - - - - - - - - - - - - - - -
bool strokeTrim (float * begin,
float * end 
) const
-
-noexcept
-
- -

Gets the trim of the stroke along the defined path segment.

-
Parameters
- - - -
[out]beginThe starting point of the segment to display along the path.
[out]endSpecifies the end of the segment to display along the path.
-
-
-
Returns
true if trimming is applied simultaneously to all paths of the shape, false otherwise.
-
Note
Experimental API
-
-

◆ strokeTrim() [2/2]

+

◆ strokeTrim()

@@ -1781,7 +1733,7 @@ ClipPath won't use the fill values. (see: enum class

Sets the trim of the stroke along the defined path segment, allowing control over which part of the stroke is visible.

-

The values of the arguments begin, end, and offset are in the range of 0.0 to 1.0, representing the beginning of the path and the end, respectively.

+

If the values of the arguments begin and end exceed the 0-1 range, they are wrapped around in a manner similar to angle wrapping, effectively treating the range as circular.

Parameters
@@ -1820,6 +1772,38 @@ ClipPath won't use the fill values. (see: enum class
Returns
The stroke width value when succeed, zero if no stroke was set.
+ + +
+

◆ type()

+ +
+
+
[in]beginSpecifies the start of the segment to display along the path.
+ + + + +
+ + + + + + + +
Type type () const
+
+overridevirtualnoexcept
+
+ +

Returns the ID value of this class.

+

This method can be used to check the current concrete instance type.

+
Returns
The class type ID of the Shape instance.
+
Since
Experimental API
+ +

Implements Paint.

+
diff --git a/docs/html/classtvg_1_1Shape.js b/docs/html/classtvg_1_1Shape.js index 74ed85ff..8b52e536 100644 --- a/docs/html/classtvg_1_1Shape.js +++ b/docs/html/classtvg_1_1Shape.js @@ -1,6 +1,6 @@ var classtvg_1_1Shape = [ - [ "appendArc", "classtvg_1_1Shape.html#a2f003a843ff42f6cee6a726f543836e3", null ], + [ "appendArc", "classtvg_1_1Shape.html#a5c2815889f8a3d7d2c980cb225989e43", null ], [ "appendCircle", "classtvg_1_1Shape.html#a52eccb2815eaa1231da9c389cd92ffa1", null ], [ "appendPath", "classtvg_1_1Shape.html#a3588ea30776a747a22b6ee82dadb9717", null ], [ "appendRect", "classtvg_1_1Shape.html#a8ef2587269a01153c9ea4ca4a8d31b49", null ], @@ -31,7 +31,7 @@ var classtvg_1_1Shape = [ "strokeJoin", "classtvg_1_1Shape.html#aac0235df4172e9c079689e5291c7ad5a", null ], [ "strokeMiterlimit", "classtvg_1_1Shape.html#a84ec91023314c914e900cade78a9095d", null ], [ "strokeMiterlimit", "classtvg_1_1Shape.html#ad8fb8f42c07ac68ef83383b05203ff6f", null ], - [ "strokeTrim", "classtvg_1_1Shape.html#a5e0762495957f05713a60540984fdae4", null ], [ "strokeTrim", "classtvg_1_1Shape.html#ac69db0796d8e184334add6b0b94b1898", null ], - [ "strokeWidth", "classtvg_1_1Shape.html#a1536ec32e91c29dd8300b0d4354773f9", null ] + [ "strokeWidth", "classtvg_1_1Shape.html#a1536ec32e91c29dd8300b0d4354773f9", null ], + [ "type", "classtvg_1_1Shape.html#a0998d9f221df277cafde4934e3828aa2", null ] ]; \ No newline at end of file diff --git a/docs/html/classtvg_1_1SwCanvas-members.html b/docs/html/classtvg_1_1SwCanvas-members.html index 21eb033e..e3689c34 100644 --- a/docs/html/classtvg_1_1SwCanvas-members.html +++ b/docs/html/classtvg_1_1SwCanvas-members.html @@ -27,7 +27,7 @@ Logo
ThorVG -  v0.14 +  v0.15
diff --git a/docs/html/classtvg_1_1SwCanvas.html b/docs/html/classtvg_1_1SwCanvas.html index daab0d26..c93ea498 100644 --- a/docs/html/classtvg_1_1SwCanvas.html +++ b/docs/html/classtvg_1_1SwCanvas.html @@ -27,7 +27,7 @@ Logo
ThorVG -  v0.14 +  v0.15
diff --git a/docs/html/classtvg_1_1Text-members.html b/docs/html/classtvg_1_1Text-members.html index 5e5e6061..de4c93f9 100644 --- a/docs/html/classtvg_1_1Text-members.html +++ b/docs/html/classtvg_1_1Text-members.html @@ -27,7 +27,7 @@ Logo
ThorVG -  v0.14 +  v0.15
@@ -90,10 +90,10 @@ $(document).ready(function(){initNavTree('classtvg_1_1Text.html',''); initResiza

This is the complete list of members for Text, including all inherited members.

- - - - + + + + @@ -101,8 +101,8 @@ $(document).ready(function(){initNavTree('classtvg_1_1Text.html',''); initResiza - - + + @@ -113,7 +113,8 @@ $(document).ready(function(){initNavTree('classtvg_1_1Text.html',''); initResiza - + +
blend(BlendMethod method) const noexceptPaint
blend() const noexceptPaint
bounds(float *x, float *y, float *w, float *h) const noexceptPaint
bounds(float *x, float *y, float *w, float *h, bool transformed) const noexceptPaint
blend(BlendMethod method) noexceptPaint
bounds(float *x, float *y, float *w, float *h) const noexceptPaint
bounds(float *x, float *y, float *w, float *h, bool transformed) const noexceptPaint
clip(std::unique_ptr< Paint > clipper) noexceptPaint
composite(std::unique_ptr< Paint > target, CompositeMethod method) noexceptPaint
composite(const Paint **target) const noexceptPaint
duplicate() const noexceptPaint
fill(std::unique_ptr< Fill > f) noexceptText
font(const char *name, float size, const char *style=nullptr) noexceptText
gen() noexceptTextstatic
identifier() noexceptTextstatic
tvg::Paint::identifier() const noexceptPaint
idPaint
identifier() const noexceptPaint
load(const std::string &path) noexceptTextstatic
load(const char *name, const char *data, uint32_t size, const std::string &mimeType="ttf", bool copy=false) noexceptTextstatic
opacity(uint8_t o) noexceptPaint
transform(const Matrix &m) noexceptPaint
transform() noexceptPaint
translate(float x, float y) noexceptPaint
unload(const std::string &path) noexceptTextstatic
type() const noexcept overrideTextvirtual
unload(const std::string &path) noexceptTextstatic
diff --git a/docs/html/classtvg_1_1Text.html b/docs/html/classtvg_1_1Text.html index f3c17a45..d66187d7 100644 --- a/docs/html/classtvg_1_1Text.html +++ b/docs/html/classtvg_1_1Text.html @@ -27,7 +27,7 @@ Logo
ThorVG -  v0.14 +  v0.15
@@ -127,6 +127,9 @@ Public Member Functions Result fill (std::unique_ptr< Fill > f) noexcept  Sets the gradient fill for all of the figures from the text. More...
  +Type type () const noexcept override + Returns the ID value of this class. More...
- Public Member Functions inherited from Paint Result rotate (float degree) noexcept  Sets the angle by which the object is rotated. More...
@@ -149,9 +152,12 @@ Public Member Functions Result composite (std::unique_ptr< Paint > target, CompositeMethod method) noexcept  Sets the composition target object and the composition method. More...
  -Result blend (BlendMethod method) const noexcept - Sets the blending method for the paint object. More...
-  +Result clip (std::unique_ptr< Paint > clipper) noexcept + Clip the drawing region of the paint object. More...
+  +Result blend (BlendMethod method) noexcept + Sets the blending method for the paint object. More...
+  TVG_DEPRECATED Result bounds (float *x, float *y, float *w, float *h) const noexcept   Result bounds (float *x, float *y, float *w, float *h, bool transformed) const noexcept @@ -166,12 +172,8 @@ Public Member Functions CompositeMethod composite (const Paint **target) const noexcept  Gets the composition target object and the composition method. More...
  -BlendMethod blend () const noexcept - Gets the blending method of the object. More...
-  -uint32_t identifier () const noexcept - Return the unique id value of the paint instance. More...
-  +TVG_DEPRECATED uint32_t identifier () const noexcept +  @@ -187,13 +189,17 @@ Static Public Member Functions - - - +

Static Public Member Functions

static std::unique_ptr< Textgen () noexcept
 Creates a new Text object. More...
 
static uint32_t identifier () noexcept
 Return the unique id value of this class. More...
 
+ + + + +

+Additional Inherited Members

- Public Attributes inherited from Paint
uint32_t id = 0
 Unique ID of this instance. More...
 

Detailed Description

A class to represent text objects in a graphical context, allowing for rendering and manipulation of unicode text.

-
Note
Experimental API
+
Since
0.15

Member Function Documentation

◆ fill() [1/2]

@@ -227,16 +233,9 @@ Static Public Member Functions -
Return values
- - -
Result::InsufficientConditionwhen the font has not been set up prior to this operation.
-
-
-
Note
Either a solid color or a gradient fill is applied, depending on what was set as last.
-
-Experimental API
-
See also
Text::font()
+
Note
Either a solid color or a gradient fill is applied, depending on what was set as last.
+
See also
Text::font()
+
Since
0.15
@@ -289,14 +288,8 @@ Experimental API -
Return values
- - -
Result::InsufficientConditionwhen the font has not been set up prior to this operation.
-
-
See also
Text::font()
-
Note
Experimental API
+
Since
0.15
@@ -385,36 +378,7 @@ Experimental API

Creates a new Text object.

Returns
A new Text object.
-
Note
Experimental API
- - - - -

◆ identifier()

- -
-
- - - - - -
- - - - - - - -
static uint32_t identifier ()
-
-staticnoexcept
-
- -

Return the unique id value of this class.

-

This method can be referred for identifying the Text class type.

-
Returns
The type id of the Text class.
+
Since
0.15
@@ -490,13 +454,12 @@ Experimental API -
Warning
: It's the user responsibility to release the data memory.
+
Warning
It's the user responsibility to release the data memory.
Note
To unload the font data loaded using this API, pass the proper name and nullptr as data.
-If you are unsure about the MIME type, you can provide an empty value like "", and thorvg will attempt to figure it out.
-
-Experimental API
-
See also
Text::font(const char* name, float size, const char* style)
+If you are unsure about the MIME type, you can provide an empty value like "", and thorvg will attempt to figure it out. +
See also
Text::font(const char* name, float size, const char* style)
+
Note
0.15
@@ -539,8 +502,8 @@ Experimental API -
Note
Experimental API
-
See also
Text::unload(const std::string& path)
+
See also
Text::unload(const std::string& path)
+
Since
0.15
@@ -578,6 +541,38 @@ Experimental API
Note
Experimental API
+ + + +

◆ type()

+ +
+
+ + + + + +
+ + + + + + + +
Type type () const
+
+overridevirtualnoexcept
+
+ +

Returns the ID value of this class.

+

This method can be used to check the current concrete instance type.

+
Returns
The class type ID of the Text instance.
+
Since
Experimental API
+ +

Implements Paint.

+
@@ -618,10 +613,9 @@ Experimental API -
Note
If the font data is currently in use, it will not be immediately unloaded.
-
-Experimental API
-
See also
Text::load(const std::string& path)
+
Note
If the font data is currently in use, it will not be immediately unloaded.
+
See also
Text::load(const std::string& path)
+
Since
0.15
diff --git a/docs/html/classtvg_1_1Text.js b/docs/html/classtvg_1_1Text.js index 49ba4474..61b33793 100644 --- a/docs/html/classtvg_1_1Text.js +++ b/docs/html/classtvg_1_1Text.js @@ -3,5 +3,6 @@ var classtvg_1_1Text = [ "fill", "classtvg_1_1Text.html#ad0cb7b2ec8d18d7c6d366cc84741682c", null ], [ "fill", "classtvg_1_1Text.html#ab82934b0e19f300568f0aaab976e56fa", null ], [ "font", "classtvg_1_1Text.html#ae75b2b7eaa5757cfaa6620df127c0416", null ], - [ "text", "classtvg_1_1Text.html#a9dd4d33d94a639639321538338e9f9f8", null ] + [ "text", "classtvg_1_1Text.html#a9dd4d33d94a639639321538338e9f9f8", null ], + [ "type", "classtvg_1_1Text.html#a0998d9f221df277cafde4934e3828aa2", null ] ]; \ No newline at end of file diff --git a/docs/html/classtvg_1_1WgCanvas-members.html b/docs/html/classtvg_1_1WgCanvas-members.html index e16d43fa..a408f72b 100644 --- a/docs/html/classtvg_1_1WgCanvas-members.html +++ b/docs/html/classtvg_1_1WgCanvas-members.html @@ -27,7 +27,7 @@ Logo
ThorVG -  v0.14 +  v0.15
@@ -96,7 +96,7 @@ $(document).ready(function(){initNavTree('classtvg_1_1WgCanvas.html',''); initRe paints() noexceptCanvas push(std::unique_ptr< Paint > paint) noexceptCanvasvirtual sync() noexceptCanvasvirtual - target(void *instance, void *surface, uint32_t w, uint32_t h) noexceptWgCanvas + target(void *instance, void *surface, uint32_t w, uint32_t h, void *device=nullptr) noexceptWgCanvas update(Paint *paint=nullptr) noexceptCanvasvirtual viewport(int32_t x, int32_t y, int32_t w, int32_t h) noexceptCanvasvirtual diff --git a/docs/html/classtvg_1_1WgCanvas.html b/docs/html/classtvg_1_1WgCanvas.html index 81746710..a5601e5a 100644 --- a/docs/html/classtvg_1_1WgCanvas.html +++ b/docs/html/classtvg_1_1WgCanvas.html @@ -27,7 +27,7 @@ Logo
ThorVG -  v0.14 +  v0.15
@@ -115,9 +115,9 @@ Collaboration diagram for WgCanvas: - - - + + + @@ -150,7 +150,7 @@ Static Public Member Functions

Detailed Description

A class for the rendering graphic elements with a WebGPU raster engine.

Warning
Please do not use it. This class is not fully supported yet.
-
Note
Experimental API
+
Since
0.15

Member Function Documentation

◆ gen()

@@ -177,12 +177,12 @@ Static Public Member Functions

Creates a new WgCanvas object.

Returns
A new WgCanvas object.
-
Note
Experimental API
+
Since
0.15
- -

◆ target()

+ +

◆ target()

@@ -212,7 +212,13 @@ Static Public Member Functions
- + + + + + + + @@ -233,7 +239,8 @@ Static Public Member Functions - + +

Public Member Functions

Result target (void *instance, void *surface, uint32_t w, uint32_t h) noexcept
 Sets the drawing target for the rasterization. More...
 
Result target (void *instance, void *surface, uint32_t w, uint32_t h, void *device=nullptr) noexcept
 Sets the drawing target for the rasterization. More...
 
- Public Member Functions inherited from Canvas
std::list< Paint * > & paints () noexcept
 Returns the list of the paints that currently held by the Canvas. More...
uint32_t h h,
void * device = nullptr 
[in]instanceWGPUInstance, context for all other wgpu objects.
[in]surfaceWGPUSurface, handle to a presentable surface.
[in]wThe width of the surface.
[in]hThe height of the surface.
[in]hThe height of the surface.
[in]deviceWGPUDevice, a desired handle for the wgpu device. If it is nullptr, ThorVG will assign an appropriate device internally.
diff --git a/docs/html/classtvg_1_1WgCanvas.js b/docs/html/classtvg_1_1WgCanvas.js index eab7fb32..47f795e2 100644 --- a/docs/html/classtvg_1_1WgCanvas.js +++ b/docs/html/classtvg_1_1WgCanvas.js @@ -1,4 +1,4 @@ var classtvg_1_1WgCanvas = [ - [ "target", "classtvg_1_1WgCanvas.html#a8374462d6f583b287a3664bee0d22c9a", null ] + [ "target", "classtvg_1_1WgCanvas.html#abf98e4ee044acb637747310e55631d32", null ] ]; \ No newline at end of file diff --git a/docs/html/dir_bfccd401955b95cf8c75461437045ac0.html b/docs/html/dir_bfccd401955b95cf8c75461437045ac0.html index 19fda501..c8c8ec4f 100644 --- a/docs/html/dir_bfccd401955b95cf8c75461437045ac0.html +++ b/docs/html/dir_bfccd401955b95cf8c75461437045ac0.html @@ -27,7 +27,7 @@ Logo
ThorVG -  v0.14 +  v0.15
diff --git a/docs/html/functions.html b/docs/html/functions.html index 508fe2da..bef1e065 100644 --- a/docs/html/functions.html +++ b/docs/html/functions.html @@ -27,7 +27,7 @@ Logo
ThorVG -  v0.14 +  v0.15
@@ -96,7 +96,7 @@ $(document).ready(function(){initNavTree('functions.html',''); initResizable(); : SwCanvas
  • appendArc() -: Shape +: Shape
  • appendCircle() : Shape @@ -124,7 +124,7 @@ $(document).ready(function(){initNavTree('functions.html',''); initResizable(); : Saver
  • blend() -: Paint +: Paint
  • bounds() : Paint @@ -137,6 +137,9 @@ $(document).ready(function(){initNavTree('functions.html',''); initResizable(); : Canvas , Scene
  • +
  • clip() +: Paint +
  • close() : Shape
  • @@ -217,15 +220,18 @@ $(document).ready(function(){initNavTree('functions.html',''); initResizable();

    - i -