Lines Matching full:the
85 * @brief Enumeration specifying the result from the APIs.
87 * All ThorVG APIs could potentially return one of the values in the list.
88 * Please note that some APIs may additionally specify the reasons that trigger their return values.
93 Success = 0, ///< The value returned in case of a correct request execution.
94 …InvalidArguments, ///< The value returned in the event of a problem with the arguments given …
95 …InsufficientCondition, ///< The value returned in case the request cannot be processed - e.g. aski…
96 FailedAllocation, ///< The value returned in case of unsuccessful memory allocation.
97 …MemoryCorruption, ///< The value returned in the event of bad memory handling - e.g. failing …
98 …NonSupport, ///< The value returned in case of choosing unsupported engine features(opt…
99 Unknown ///< The value returned in all other cases.
104 * @brief Enumeration specifying the values of the path commands accepted by TVG.
106 …* Not to be confused with the path commands from the svg path element (like M, L, Q, H and many ot…
107 * TVG interprets all of them and translates to the ones from the PathCommand values.
111 …Close = 0, ///< Ends the current sub-path and connects it with its initial point. This command doe…
112 …eTo, ///< Sets a new initial point of the sub-path and a new current point. This command expect…
113 …line from the current point to the given point and sets a new value of the current point. This com…
114 …the current point to the given point using two given control points and sets a new value of the cu…
119 * @brief Enumeration determining the ending type of a stroke in the open sub-paths.
123 …The stroke is extended in both end-points of a sub-path by a rectangle, with the width equal to th…
124 …Round, ///< The stroke is extended in both end-points of a sub-path by a half circle, with a …
125 …Butt ///< The stroke ends exactly at each of the two end-points of a sub-path. For zero len…
130 * @brief Enumeration determining the style used at the corners of joined stroked path segments.
134 …The outer corner of the joined path segments is bevelled at the join point. The triangular region …
135 …Round, ///< The outer corner of the joined path segments is rounded. The circular region is ce…
136 …The outer corner of the joined path segments is spiked. The spike is created by extension beyond t…
141 * @brief Enumeration specifying how to fill the area outside the gradient bounds.
145 Pad = 0, ///< The remaining area is filled with the closest stop color.
146 …Reflect, ///< The gradient pattern is reflected outside the gradient area until the expected regio…
147 …Repeat ///< The gradient pattern is repeated continuously beyond the gradient area until the exp…
152 …* @brief Enumeration specifying the algorithm used to establish which parts of the shape are treat…
156 …the point to a location outside the shape is drawn. The intersections of the line with the path se…
157 …the point to a location outside the shape is drawn and its intersections with the path segments of…
162 …* @brief Enumeration indicating the method used in the composition of two objects - the target and…
171 …The intersection of the source and the target is determined and only the resulting pixels from the…
172 AlphaMask, ///< Alpha Masking using the compositing target's pixels as an alpha value.
173 …InvAlphaMask, ///< Alpha Masking using the complement to the compositing target's pixels as …
174 …LumaMask, ///< Alpha Masking using the grayscale (0.2125R + 0.7154G + 0.0721*B) of the c…
175 …LumaMask, ///< Alpha Masking using the grayscale (0.2125R + 0.7154G + 0.0721*B) of the comp…
176 …AddMask, ///< Combines the target and source objects pixels using target alpha. (T * TA…
177 …SubtractMask, ///< Subtracts the source color from the target color while considering their …
178 …, ///< Computes the result by taking the minimum value between the target alpha and the sourc…
179 …sk, ///< Calculates the absolute difference between the target color and the source color mult…
180 …LightenMask, ///< Where multiple masks intersect, the highest transparency value is used. (…
181 …DarkenMask ///< Where multiple masks intersect, the lowest transparency value is used. (E…
186 …* @brief Enumeration indicates the method used for blending paint. Please refer to the respective …
188 …* Notation: S(source paint as the top layer), D(destination as the bottom layer), Sa(source paint …
196 …Normal = 0, ///< Perform the alpha blending(default). S if (Sa == 255), otherwise (Sa * S) …
197 … Takes the RGB channel values from 0 to 255 of each pixel in the top layer and multiples them with…
198 …Screen, ///< The values of the pixels in the two layers are inverted, multiplied, and t…
200 SrcOver, ///< Replace the bottom layer with the top layer.
201 …Darken, ///< Creates a pixel that retains the smallest components of the top and bottom…
202 Lighten, ///< Only has the opposite action of Darken Only. max(S, D)
203 ColorDodge, ///< Divides the bottom layer by the inverted top layer. D / (255 - S)
204 …ColorBurn, ///< Divides the inverted bottom layer by the top layer, and then inverts the r…
205 …HardLight, ///< The same as Overlay but with the color roles reversed. (2 * S * D) if (S <…
206 …SoftLight, ///< The same as Overlay but with applying pure black or white does not result …
207 …Difference, ///< Subtracts the bottom layer from the top layer or the other way around, to …
208 …Exclusion, ///< The result is twice the product of the top and bottom layers, subtracted f…
213 Add, ///< Simply adds pixel values of one layer with the other. (S + D)
222 …* Scene effects are typically applied to modify the final appearance of a rendered scene, such as …
230 …ClearAll = 0, ///< Reset all previously applied scene effects, restoring the scene to its ori…
236 …* @brief Enumeration specifying the engine type used for the graphics backend. For multiple backen…
247 * @brief Enumeration specifying the ThorVG class type value.
249 …* ThorVG's drawing objects can return class type values, allowing you to identify the specific cla…
280 * The elements e11, e12, e21 and e22 represent the rotation matrix, including the scaling factor.
281 …* The elements e13 and e23 determine the translation of the object along the x and y-axis, respect…
282 * The elements e31 and e32 are set to 0, e33 is set to 1.
299 …* TVG recommends the user to regard a paint as a set of volatile commands. They can prepare a Pain…
307 * @brief Sets the angle by which the object is rotated.
309 * The angle in measured clockwise from the horizontal axis.
310 * The rotational axis passes through the point on the object with zero coordinates.
312 * @param[in] degree The value of the angle in degrees.
320 * @brief Sets the scale value of the object.
322 * @param[in] factor The value of the scaling factor. The default value is 1.
330 * @brief Sets the values by which the object is moved in a two-dimensional space.
332 * The origin of the coordinate system is in the upper-left corner of the canvas.
333 * The horizontal and vertical axes point to the right and down, respectively.
335 * @param[in] x The value of the horizontal shift.
336 * @param[in] y The value of the vertical shift.
344 * @brief Sets the matrix of the affine transformation for the object.
346 * The augmented matrix of the transformation is expected to be given.
348 * @param[in] m The 3x3 augmented matrix.
353 * @brief Gets the matrix of the affine transformation of the object.
355 * The values of the matrix can be set by the transform() API, as well by the translate(),
356 * scale() and rotate(). In case no transformation was applied, the identity matrix is returned.
358 * @return The augmented transformation matrix.
365 * @brief Sets the opacity of the object.
367 …* @param[in] o The opacity value in the range [0 ~ 255], where 0 is completely transparent and 255…
369 …* @note Setting the opacity with this API may require multiple render pass for composition. It is …
374 * @brief Sets the composition target object and the composition method.
376 * @param[in] target The paint of the target object.
377 * @param[in] method The method used to composite the source object with the target.
382 * @brief Clip the drawing region of the paint object.
384 * This function restricts the drawing area of the paint object to the specified shape's paths.
386 * @param[in] clipper The shape object as the clipper.
388 * @retval Result::NonSupport If the @p clipper type is not Shape.
390 * @note @p clipper only supports the Shape type.
396 * @brief Sets the blending method for the paint object.
398 …* The blending feature allows you to combine colors to create visually appealing effects, includin…
399 …* its process involves the combination of colors or images from the source paint object with the d…
400 …* The blending operation is determined by the chosen @p BlendMethod, which specifies how the color…
402 * @param[in] method The blending method to be set.
414 * @brief Gets the axis-aligned bounding box of the paint object.
416 * @param[out] x The x-coordinate of the upper-left corner of the object.
417 * @param[out] y The y-coordinate of the upper-left corner of the object.
418 * @param[out] w The width of the object.
419 * @param[out] h The height of the object.
420 …* @param[in] transformed If @c true, the paint's transformations are taken into account in the sce…
422 …* @note This is useful when you need to figure out the bounding box of the paint in the canvas spa…
423 …* @note The bounding box doesn't indicate the actual drawing region. It's the smallest rectangle t…
424 …* @note If @p transformed is @c true, the paint needs to be pushed into a canvas and updated befor…
430 * @brief Duplicates the object.
432 * Creates a new object and sets its all properties as in the original object.
434 * @return The created object when succeed, @c nullptr otherwise.
439 * @brief Gets the opacity value of the object.
441 …* @return The opacity value in the range [0 ~ 255], where 0 is completely transparent and 255 is o…
446 * @brief Gets the composition target object and the composition method.
448 * @param[out] target The paint of the target object.
450 * @return The method used to composite the source object with the target.
457 * @brief Returns the ID value of this class.
459 * This method can be used to check the current concrete instance type.
461 * @return The class type ID of the Paint instance.
488 * @brief An abstract class representing the gradient fill of the Shape object.
490 * It contains the information about the gradient colors and their arrangement
491 * inside the gradient bounds. The gradients bounds are defined in the LinearGradient
492 * or RadialGradient class, depending on the type of the gradient to be used.
493 * It specifies the gradient behavior in case the area defined by the gradient bounds
494 * is smaller than the area to be filled.
500 …* @brief A data structure storing the information about the color and its relative position inside…
504 float offset; /**< The relative position of the color. */
505 uint8_t r; /**< The red color channel value in the range [0 ~ 255]. */
506 uint8_t g; /**< The green color channel value in the range [0 ~ 255]. */
507 uint8_t b; /**< The blue color channel value in the range [0 ~ 255]. */
508 …uint8_t a; /**< The alpha channel value in the range [0 ~ 255], where 0 is completely transpare…
514 * @brief Sets the parameters of the colors of the gradient and their position.
517 …* @param[in] cnt The count of the @p colorStops array equal to the colors number used in the gradi…
522 …* @brief Sets the FillSpread value, which specifies how to fill the area outside the gradient boun…
524 * @param[in] s The FillSpread value.
529 * @brief Sets the matrix of the affine transformation for the gradient fill.
531 * The augmented matrix of the transformation is expected to be given.
533 * @param[in] m The 3x3 augmented matrix.
538 * @brief Gets the parameters of the colors of the gradient, their position and number.
540 …* @param[out] colorStops A pointer to the memory location, where the array of the gradient's Color…
542 …* @return The number of colors used in the gradient. This value corresponds to the length of the @…
547 * @brief Gets the FillSpread value of the fill.
549 * @return The FillSpread value of this Fill.
554 * @brief Gets the matrix of the affine transformation of the gradient fill.
556 * In case no transformation was applied, the identity matrix is returned.
558 * @return The augmented transformation matrix.
563 * @brief Creates a copy of the Fill object.
565 * Return a newly created Fill object with the properties copied from the original.
572 * @brief Returns the ID value of this class.
574 * This method can be used to check the current concrete instance type.
576 * @return The class type ID of the Fill instance.
596 … an entity responsible for drawing the target. It sets up the drawing engine and the buffer, which…
598 …* @note A Canvas behavior depends on the raster engine though the final content of the buffer is e…
599 * @warning The Paint objects belonging to one Canvas can't be shared among multiple Canvases.
610 * @brief Returns the list of the paints that currently held by the Canvas.
612 …* This function provides the list of paint nodes, allowing users a direct opportunity to modify th…
614 …* @warning Please avoid accessing the paints during Canvas update/draw. You can access them after …
622 * @brief Passes drawing elements to the Canvas using Paint objects.
624 * Only pushed paints in the canvas will be drawing targets.
625 * They are retained by the canvas until you call Canvas::clear().
629 * @retval Result::MemoryCorruption In case a @c nullptr is passed as the argument.
631 …* @note The rendering order of the paints is the same as the order as they were pushed into the ca…
638 * @brief Clear the internal canvas resources that used for the drawing.
640 * This API sets the total number of paints pushed into the canvas to zero.
641 * Depending on the value of the @p free argument, the paints are either freed or retained.
642 …* So if you need to update paint properties while maintaining the existing scene structure, you ca…
644 … * @param[in] free If @c true, the memory occupied by paints is deallocated, otherwise it is not.
653 * @brief Request the canvas to update the paint objects.
655 * If a @c nullptr is passed all paint objects retained by the Canvas are updated,
656 * otherwise only the paint to which the given @p paint points.
658 * @param[in] paint A pointer to the Paint object or @c nullptr.
660 …* @note The Update behavior can be asynchronous if the assigned thread number is greater than zero.
665 * @brief Requests the canvas to draw the Paint objects.
667 …* @note Drawing can be asynchronous if the assigned thread number is greater than zero. To guarant…
673 * @brief Sets the drawing region in the canvas.
675 …* This function defines the rectangular area of the canvas that will be used for drawing operation…
676 … * The specified viewport is used to clip the rendering output to the boundaries of the rectangle.
678 * @param[in] x The x-coordinate of the upper-left corner of the rectangle.
679 * @param[in] y The y-coordinate of the upper-left corner of the rectangle.
680 * @param[in] w The width of the rectangle.
681 * @param[in] h The height of the rectangle.
687 …* @warning It's not allowed to change the viewport during Canvas::push() - Canvas::sync() or Canva…
689 * @note When resetting the target, the viewport will also be reset to the target size.
697 … * The Canvas rendering can be performed asynchronously. To make sure that rendering is finished,
698 * the sync() must be called after the draw() regardless of threading.
700 …* @retval Result::InsufficientCondition: The canvas is either already in sync condition or in a da…
713 * @brief A class representing the linear gradient fill of the Shape object.
715 …* Besides the APIs inherited from the Fill class, it enables setting and getting the linear gradie…
716 * The behavior outside the gradient bounds depends on the value specified in the spread API.
724 * @brief Sets the linear gradient bounds.
726 …* The bounds of the linear gradient are defined as a surface constrained by two parallel lines cro…
727 …* the given points (@p x1, @p y1) and (@p x2, @p y2), respectively. Both lines are perpendicular t…
730 …* @param[in] x1 The horizontal coordinate of the first point used to determine the gradient bounds.
731 … * @param[in] y1 The vertical coordinate of the first point used to determine the gradient bounds.
732 …* @param[in] x2 The horizontal coordinate of the second point used to determine the gradient bound…
733 … * @param[in] y2 The vertical coordinate of the second point used to determine the gradient bounds.
735 …* @note In case the first and the second points are equal, an object is filled with a single color…
741 * @brief Gets the linear gradient bounds.
743 …* The bounds of the linear gradient are defined as a surface constrained by two parallel lines cro…
744 …* the given points (@p x1, @p y1) and (@p x2, @p y2), respectively. Both lines are perpendicular t…
747 …* @param[out] x1 The horizontal coordinate of the first point used to determine the gradient bound…
748 … * @param[out] y1 The vertical coordinate of the first point used to determine the gradient bounds.
749 …* @param[out] x2 The horizontal coordinate of the second point used to determine the gradient boun…
750 …* @param[out] y2 The vertical coordinate of the second point used to determine the gradient bounds.
762 * @brief Returns the ID value of this class.
764 * This method can be used to check the current concrete instance type.
766 * @return The class type ID of the LinearGradient instance.
784 * @brief A class representing the radial gradient fill of the Shape object.
793 * @brief Sets the radial gradient bounds.
795 …* The radial gradient bounds are defined as a circle centered in a given point (@p cx, @p cy) of a…
797 * @param[in] cx The horizontal coordinate of the center of the bounding circle.
798 * @param[in] cy The vertical coordinate of the center of the bounding circle.
799 * @param[in] radius The radius of the bounding circle.
801 * @retval Result::InvalidArguments in case the @p radius value is zero or less.
803 …* @note In case the @p radius is zero, an object is filled with a single color using the last colo…
808 * @brief Gets the radial gradient bounds.
810 …* The radial gradient bounds are defined as a circle centered in a given point (@p cx, @p cy) of a…
812 * @param[out] cx The horizontal coordinate of the center of the bounding circle.
813 * @param[out] cy The vertical coordinate of the center of the bounding circle.
814 * @param[out] radius The radius of the bounding circle.
827 * @brief Returns the ID value of this class.
829 * This method can be used to check the current concrete instance type.
831 * @return The class type ID of the LinearGradient instance.
851 …ee major properties: shape outline, stroking, filling. The outline in the Shape is retained as the…
855 …* The stroke of Shape is an optional property in case the Shape needs to be represented with/witho…
856 …* It's efficient since the shape path and the stroking path can be shared with each other. It's al…
864 * @brief Resets the shape path.
866 * The transformation matrix, color, fill, and stroke properties are retained.
868 …* @note The memory where the path data is stored is not deallocated at this stage to allow for cac…
873 * @brief Sets the initial point of the sub-path.
875 * The value of the current point is set to the given point.
877 * @param[in] x The horizontal coordinate of the initial point of the sub-path.
878 * @param[in] y The vertical coordinate of the initial point of the sub-path.
883 …* @brief Adds a new point to the sub-path, which results in drawing a line from the current point …
885 * The value of the current point is set to the given end-point.
887 * @param[in] x The horizontal coordinate of the end-point of the line.
888 * @param[in] y The vertical coordinate of the end-point of the line.
890 * @note In case this is the first command in the path, it corresponds to the moveTo() call.
895 … * @brief Adds new points to the sub-path, which results in drawing a cubic Bezier curve starting
896 …* at the current point and ending at the given end-point (@p x, @p y) using the control points (@p…
898 * The value of the current point is set to the given end-point.
900 * @param[in] cx1 The horizontal coordinate of the 1st control point.
901 * @param[in] cy1 The vertical coordinate of the 1st control point.
902 * @param[in] cx2 The horizontal coordinate of the 2nd control point.
903 * @param[in] cy2 The vertical coordinate of the 2nd control point.
904 * @param[in] x The horizontal coordinate of the end-point of the curve.
905 * @param[in] y The vertical coordinate of the end-point of the curve.
907 * @note In case this is the first command in the path, no data from the path are rendered.
912 …* @brief Closes the current sub-path by drawing a line from the current point to the initial point…
914 * The value of the current point is set to the initial point of the closed sub-path.
916 * @note In case the sub-path does not contain any points, this function has no effect.
921 * @brief Appends a rectangle to the path.
923 …* The rectangle with rounded corners can be achieved by setting non-zero values to @p rx and @p ry…
924 …* The @p rx and @p ry values specify the radii of the ellipse defining the rounding of the corners.
926 …* The position of the rectangle is specified by the coordinates of its upper-left corner - @p x an…
928 * The rectangle is treated as a new sub-path - it is not connected with the previous sub-path.
930 * The value of the current point is set to (@p x + @p rx, @p y) - in case @p rx is greater
931 * than @p w/2 the current point is set to (@p x + @p w/2, @p y)
933 * @param[in] x The horizontal coordinate of the upper-left corner of the rectangle.
934 * @param[in] y The vertical coordinate of the upper-left corner of the rectangle.
935 * @param[in] w The width of the rectangle.
936 * @param[in] h The height of the rectangle.
937 * @param[in] rx The x-axis radius of the ellipse defining the rounded corners of the rectangle.
938 * @param[in] ry The y-axis radius of the ellipse defining the rounded corners of the rectangle.
940 …te For @p rx and @p ry greater than or equal to the half of @p w and the half of @p h, respectivel…
945 * @brief Appends an ellipse to the path.
947 …* The position of the ellipse is specified by the coordinates of its center - @p cx and @p cy argu…
949 * The ellipse is treated as a new sub-path - it is not connected with the previous sub-path.
951 * The value of the current point is set to (@p cx, @p cy - @p ry).
953 * @param[in] cx The horizontal coordinate of the center of the ellipse.
954 * @param[in] cy The vertical coordinate of the center of the ellipse.
955 * @param[in] rx The x-axis radius of the ellipse.
956 * @param[in] ry The y-axis radius of the ellipse.
962 * @brief Appends a circular arc to the path.
964 * The arc is treated as a new sub-path - it is not connected with the previous sub-path.
965 …* The current point value is set to the end-point of the arc in case @p pie is @c false, and to th…
967 * @param[in] cx The horizontal coordinate of the center of the arc.
968 * @param[in] cy The vertical coordinate of the center of the arc.
969 * @param[in] radius The radius of the arc.
970 …* @param[in] startAngle The start angle of the arc given in degrees, measured counter-clockwise fr…
971 …* @param[in] sweep The central angle of the arc given in degrees, measured counter-clockwise from …
972 …* @param[in] pie Specifies whether to draw radii from the arc's center to both of its end-point - …
979 * @brief Appends a given sub-path to the path.
981 * The current point value is set to the last point from the sub-path.
982 …* For each command from the @p cmds array, an appropriate number of points in @p pts array should …
983 …the number of points in the @p pts array is different than the number required by the @p cmds arra…
985 * @param[in] cmds The array of the commands in the sub-path.
986 * @param[in] cmdCnt The number of the sub-path's commands.
987 * @param[in] pts The array of the two-dimensional points.
988 * @param[in] ptsCnt The number of the points in the @p pts array.
990 …* @note The interface is designed for optimal path setting if the caller has a completed path comm…
995 * @brief Sets the stroke width for all of the figures from the path.
997 * @param[in] width The width of the stroke. The default value is 0.
1003 * @brief Sets the color of the stroke for all of the figures from the path.
1005 * @param[in] r The red color channel value in the range [0 ~ 255]. The default value is 0.
1006 * @param[in] g The green color channel value in the range [0 ~ 255]. The default value is 0.
1007 * @param[in] b The blue color channel value in the range [0 ~ 255]. The default value is 0.
1008 …* @param[in] a The alpha channel value in the range [0 ~ 255], where 0 is completely transparent a…
1014 * @brief Sets the gradient fill of the stroke for all of the figures from the path.
1016 * @param[in] f The gradient fill.
1018 * @retval Result::MemoryCorruption In case a @c nullptr is passed as the argument.
1023 * @brief Sets the dash pattern of the stroke.
1025 …* @param[in] dashPattern The array of consecutive pair values of the dash length and the gap lengt…
1026 * @param[in] cnt The length of the @p dashPattern array.
1028 …n case @p dashPattern is @c nullptr and @p cnt > 0, @p cnt is zero, any of the dash pattern values…
1030 * @note To reset the stroke dash pattern, pass @c nullptr to @p dashPattern and zero to @p cnt.
1031 * @warning @p cnt must be greater than 1 if the dash pattern is valid.
1036 * @brief Sets the cap style of the stroke in the open sub-paths.
1038 * @param[in] cap The cap style value. The default value is @c StrokeCap::Square.
1044 * @brief Sets the join style for stroked path segments.
1046 * The join style is used for joining the two line segment while stroking the path.
1048 * @param[in] join The join style value. The default value is @c StrokeJoin::Bevel.
1054 * @brief Sets the stroke miterlimit.
1056 …am[in] miterlimit The miterlimit imposes a limit on the extent of the stroke join, when the @c Str…
1065 …* @brief Sets the trim of the stroke along the defined path segment, allowing control over which p…
1067 …the values of the arguments @p begin and @p end exceed the 0-1 range, they are wrapped around in a…
1069 * @param[in] begin Specifies the start of the segment to display along the path.
1070 * @param[in] end Specifies the end of the segment to display along the path.
1072 …* Otherwise, all paths are treated as a single entity with a combined length equal to the sum of t…
1079 * @brief Sets the solid color for all of the figures from the path.
1081 * The parts of the shape defined as inner are colored.
1083 * @param[in] r The red color channel value in the range [0 ~ 255]. The default value is 0.
1084 * @param[in] g The green color channel value in the range [0 ~ 255]. The default value is 0.
1085 * @param[in] b The blue color channel value in the range [0 ~ 255]. The default value is 0.
1086 …* @param[in] a The alpha channel value in the range [0 ~ 255], where 0 is completely transparent a…
1093 * @brief Sets the gradient fill for all of the figures from the path.
1095 * The parts of the shape defined as inner are filled.
1097 * @param[in] f The unique pointer to the gradient fill.
1104 * @brief Sets the fill rule for the Shape object.
1106 * @param[in] r The fill rule value. The default value is @c FillRule::Winding.
1111 * @brief Sets the rendering order of the stroke and the fill.
1113 …m[in] strokeFirst If @c true the stroke is rendered before the fill, otherwise the stroke is rende…
1120 * @brief Gets the commands data of the path.
1122 * @param[out] cmds The pointer to the array of the commands from the path.
1124 * @return The length of the @p cmds array when succeed, zero otherwise.
1129 * @brief Gets the points values of the path.
1131 * @param[out] pts The pointer to the array of the two-dimensional points from the path.
1133 * @return The length of the @p pts array when succeed, zero otherwise.
1138 * @brief Gets the pointer to the gradient fill of the shape.
1140 …* @return The pointer to the gradient fill of the stroke when succeed, @c nullptr in case no fill …
1145 * @brief Gets the solid color of the shape.
1147 * @param[out] r The red color channel value in the range [0 ~ 255].
1148 * @param[out] g The green color channel value in the range [0 ~ 255].
1149 * @param[out] b The blue color channel value in the range [0 ~ 255].
1150 …* @param[out] a The alpha channel value in the range [0 ~ 255], where 0 is completely transparent …
1156 * @brief Gets the fill rule value.
1158 * @return The fill rule value of the shape.
1163 * @brief Gets the stroke width.
1165 * @return The stroke width value when succeed, zero if no stroke was set.
1170 * @brief Gets the color of the shape's stroke.
1172 * @param[out] r The red color channel value in the range [0 ~ 255].
1173 * @param[out] g The green color channel value in the range [0 ~ 255].
1174 * @param[out] b The blue color channel value in the range [0 ~ 255].
1175 …* @param[out] a The alpha channel value in the range [0 ~ 255], where 0 is completely transparent …
1181 * @brief Gets the pointer to the gradient fill of the stroke.
1183 * @return The pointer to the gradient fill of the stroke when succeed, @c nullptr otherwise.
1188 * @brief Gets the dash pattern of the stroke.
1190 * @param[out] dashPattern The pointer to the memory, where the dash pattern array is stored.
1192 * @return The length of the @p dashPattern array.
1197 * @brief Gets the cap style used for stroking the path.
1199 * @return The cap style value of the stroke.
1204 * @brief Gets the join style value used for stroking the path.
1206 * @return The join style value of the stroke.
1211 * @brief Gets the stroke miterlimit.
1213 * @return The stroke miterlimit value when succeed, 4 if no stroke was set.
1227 * @brief Returns the ID value of this class.
1229 * This method can be used to check the current concrete instance type.
1231 * @return The class type ID of the Shape instance.
1249 …* @brief A class representing an image read in one of the supported formats: raw, svg, png, jpg, l…
1250 …* Besides the methods inherited from the Paint, it provides methods to load & draw images on the c…
1252 * @note Supported formats are depended on the available TVG loaders.
1253 * @note See Animation class if the picture data is animatable.
1263 * ThorVG efficiently caches the loaded data using the specified @p path as a key.
1264 * This means that loading the same file again will not result in duplicate operations;
1265 * instead, ThorVG will reuse the previously loaded picture data.
1267 * @param[in] path A path to the picture file.
1269 * @retval Result::InvalidArguments In case the @p path is invalid.
1272 … * @note The Load behavior can be asynchronous if the assigned thread number is greater than zero.
1285 * ThorVG efficiently caches the loaded data using the specified @p data address as a key
1286 …* when the @p copy has @c false. This means that loading the same data again will not result in du…
1287 * for the sharable @p data. Instead, ThorVG will reuse the previously loaded picture data.
1289 …* @param[in] data A pointer to a memory location where the content of the picture file is stored. …
1290 * @param[in] size The size in bytes of the memory occupied by the @p data.
1291 …+xml", "png", etc. In case an empty string or an unknown type is provided, the loaders will be tri…
1292 …* @param[in] copy If @c true the data are copied into the engine local buffer, otherwise they are …
1294 * @retval Result::InvalidArguments In case no data are provided or the @p size is zero or less.
1297 * @warning It's the user responsibility to release the @p data memory.
1299 …* @note If you are unsure about the MIME type, you can provide an empty value like @c "", and thor…
1305 * @brief Resizes the picture content to the given width and height.
1307 * The picture content is resized while keeping the default size aspect ratio.
1308 …* The scaling factor is established for each of dimensions and the smaller value is applied to bot…
1310 * @param[in] w A new width of the image in pixels.
1311 * @param[in] h A new height of the image in pixels.
1317 * @brief Gets the size of the image.
1319 * @param[out] w The width of the image in pixels.
1320 * @param[out] h The height of the image in pixels.
1326 * @brief Loads raw data in ARGB8888 format from a memory block of the given size.
1328 * ThorVG efficiently caches the loaded data using the specified @p data address as a key
1329 …* when the @p copy has @c false. This means that loading the same data again will not result in du…
1330 * for the sharable @p data. Instead, ThorVG will reuse the previously loaded picture data.
1332 …* @param[in] data A pointer to a memory location where the content of the picture raw data is stor…
1333 * @param[in] w The width of the image @p data in pixels.
1334 * @param[in] h The height of the image @p data in pixels.
1335 * @param[in] premultiplied If @c true, the given image data is alpha-premultiplied.
1336 …* @param[in] copy If @c true the data are copied into the engine local buffer, otherwise they are …
1343 * @brief Retrieve a paint object from the Picture scene by its Unique ID.
1345 …* This function searches for a paint object within the Picture scene that matches the provided @p …
1347 * @param[in] id The Unique ID of the paint object.
1349 …* @return A pointer to the paint object that matches the given identifier, or @c nullptr if no mat…
1365 * @brief Returns the ID value of this class.
1367 * This method can be used to check the current concrete instance type.
1369 * @return The class type ID of the Picture instance.
1390 * As the traditional graphics rendering method, TVG also enables scene-graph mechanism.
1391 * This feature supports an array function for managing the multiple paints as one group paint.
1393 …* As a group, the scene can be transformed, made translucent and composited with other target pain…
1394 * its children will be affected by the scene world.
1402 * @brief Passes drawing elements to the Scene using Paint objects.
1404 * Only the paints pushed into the scene will be the drawn targets.
1405 * The paints are retained by the scene until Scene::clear() is called.
1409 …* @note The rendering order of the paints is the same as the order as they were pushed. Consider s…
1418 * @brief Returns the list of the paints that currently held by the Scene.
1420 …* This function provides the list of paint nodes, allowing users a direct opportunity to modify th…
1422 …* @warning Please avoid accessing the paints during Scene update/draw. You can access them after c…
1432 * @brief Sets the total number of the paints pushed into the scene to be zero.
1433 * Depending on the value of the @p free argument, the paints are freed or not.
1435 … * @param[in] free If @c true, the memory occupied by paints is deallocated, otherwise it is not.
1437 …don't free the paints they become dangled. They are supposed to be reused, otherwise you are respo…
1444 * @brief Apply a post-processing effect to the scene.
1447 * to the scene after it has been rendered. Multiple effects can be applied in sequence.
1449 * @param[in] effect The scene effect to apply. Options are defined in the SceneEffect enum.
1465 * @brief Returns the ID value of this class.
1467 * This method can be used to check the current concrete instance type.
1469 * @return The class type ID of the Scene instance.
1497 * @brief Sets the font properties for the text.
1499 * This function allows you to define the font characteristics used for text rendering.
1500 * It sets the font name, size and optionally the style.
1502 … * @param[in] name The name of the font. This should correspond to a font available in the canvas.
1503 … * @param[in] size The size of the font in points. This determines how large the text will appear.
1504 * @param[in] style The style of the font. It can be used to set the font to 'italic'.
1505 …* If not specified, the default style is used. Only 'italic' style is supported c…
1507 * @retval Result::InsufficientCondition when the specified @p name cannot be found.
1514 * @brief Assigns the given unicode text to be rendered.
1516 * This function sets the unicode string that will be displayed by the rendering system.
1517 * The text is set according to the specified UTF encoding method, which defaults to UTF-8.
1519 * @param[in] text The multi-byte text encoded with utf8 string to be rendered.
1526 * @brief Sets the text color.
1528 * @param[in] r The red color channel value in the range [0 ~ 255]. The default value is 0.
1529 * @param[in] g The green color channel value in the range [0 ~ 255]. The default value is 0.
1530 * @param[in] b The blue color channel value in the range [0 ~ 255]. The default value is 0.
1539 * @brief Sets the gradient fill for all of the figures from the text.
1541 * The parts of the text defined as inner are filled.
1543 * @param[in] f The unique pointer to the gradient fill.
1555 * ThorVG efficiently caches the loaded data using the specified @p path as a key.
1556 * This means that loading the same file again will not result in duplicate operations;
1557 * instead, ThorVG will reuse the previously loaded font data.
1559 * @param[in] path The path to the font file.
1561 * @retval Result::InvalidArguments In case the @p path is invalid.
1573 * ThorVG efficiently caches the loaded font data using the specified @p name as a key.
1574 * This means that loading the same fonts again will not result in duplicate operations.
1575 * Instead, ThorVG will reuse the previously loaded font data.
1577 …* @param[in] name The name under which the font will be stored and accessible (e.x. in a @p font()…
1578 * @param[in] data A pointer to a memory location where the content of the font data is stored.
1579 * @param[in] size The size in bytes of the memory occupied by the @p data.
1580 …pe Mimetype or extension of font data. In case an empty string is provided the loader will be dete…
1581 …* @param[in] copy If @c true the data are copied into the engine local buffer, otherwise they are …
1585 …* @retval Result::InsufficientCondition If attempting to unload the font data that has not been pr…
1587 * @warning It's the user responsibility to release the @p data memory.
1589 …* @note To unload the font data loaded using this API, pass the proper @p name and @c nullptr as @…
1590 …* @note If you are unsure about the MIME type, you can provide an empty value like @c "", and thor…
1598 * @brief Unloads the specified scalable font data (TTF) that was previously loaded.
1602 * @param[in] path The file path of the loaded font.
1604 * @retval Result::InsufficientCondition Fails if the loader is not initialized.
1606 * @note If the font data is currently in use, it will not be immediately unloaded.
1623 * @brief Returns the ID value of this class.
1625 * This method can be used to check the current concrete instance type.
1627 * @return The class type ID of the Text instance.
1640 * @brief A class for the rendering graphical elements with a software raster engine.
1648 …* @brief Enumeration specifying the methods of combining the 8-bit color channels into 32-bit colo…
1652 …ABGR8888 = 0, ///< The channels are joined in the order: alpha, blue, green, red. Colors are …
1653 …ARGB8888, ///< The channels are joined in the order: alpha, red, green, blue. Colors are …
1654 …ABGR8888S, ///< The channels are joined in the order: alpha, blue, green, red. Colors are …
1655 …ARGB8888S, ///< The channels are joined in the order: alpha, red, green, blue. Colors are …
1659 * @brief Enumeration specifying the methods of Memory Pool behavior policy.
1665 Shareable, ///< Memory Pool is shared among the SwCanvases.
1670 * @brief Sets the drawing target for the rasterization.
1672 * The buffer of a desirable size should be allocated and owned by the caller.
1674 …* @param[in] buffer A pointer to a memory block of the size @p stride x @p h, where the raster dat…
1675 * @param[in] stride The stride of the raster image - greater than or equal to @p w.
1676 * @param[in] w The width of the raster image.
1677 * @param[in] h The height of the raster image.
1678 * @param[in] cs The value specifying the way the 32-bits colors should be read/written.
1680 …lt::InvalidArguments In case no valid pointer is provided or the width, or the height or the strid…
1681 …* @retval Result::InsufficientCondition if the canvas is performing rendering. Please ensure the c…
1682 * @retval Result::NonSupport In case the software engine is not supported.
1684 …er during Canvas::push() - Canvas::sync(). It should not be accessed while the engine is writing o…
1696 * which can be reused among the canvases in order to avoid memory overhead.
1699 * if it needs to guarantee the thread-safety of the internal data access.
1701 …* @param[in] policy The method specifying the Memory Pool behavior. The default value is @c Mempoo…
1703 * @retval Result::InsufficientCondition If the canvas contains some paints already.
1704 * @retval Result::NonSupport In case the software engine is not supported.
1706 …* @note When @c policy is set as @c MempoolPolicy::Individual, the current instance of canvas uses…
1707 …* memory data, which is not shared with others. This is necessary when the canvas is accesse…
1728 * @brief A class for the rendering graphic elements with a GL raster engine.
1738 * @brief Sets the drawing target for rasterization.
1740 * This function specifies the drawing target where the rasterization will occur. It can target
1741 * a specific framebuffer object (FBO) or the main surface.
1743 …* @param[in] id The GL target ID, usually indicating the FBO ID. A value of @c 0 specifies the mai…
1744 * @param[in] w The width (in pixels) of the raster image.
1745 * @param[in] h The height (in pixels) of the raster image.
1747 …* @retval Result::InsufficientCondition if the canvas is performing rendering. Please ensure the c…
1748 * @retval Result::NonSupport In case the gl engine is not supported.
1753 * @note Currently, this only allows the GL_RGBA8 color space format.
1774 * @brief A class for the rendering graphic elements with a WebGPU raster engine.
1786 * @brief Sets the drawing target for the rasterization.
1790 * @param[in] w The width of the surface.
1791 * @param[in] h The height of the surface.
1792 …* @param[in] device WGPUDevice, a desired handle for the wgpu device. If it is @c nullptr, ThorVG …
1794 …* @retval Result::InsufficientCondition if the canvas is performing rendering. Please ensure the c…
1795 * @retval Result::NonSupport In case the wg engine is not supported.
1820 * @brief A class that enables initialization and termination of the TVG engines.
1828 * TVG requires the running-engine environment.
1830 * You can indicate the number of threads, the count of which is designated @p threads.
1831 * In the initialization step, TVG will generate/spawn the threads as set by @p threads count.
1833 …* @param[in] engine The engine types to initialize. This is relative to the Canvas types, in which…
1834 …* @param[in] threads The number of additional threads. Zero indicates only the main thread is to b…
1836 * @retval Result::NonSupport In case the engine type is not supported on the system.
1838 …* @note The Initializer keeps track of the number of times it was called. Threads count is fixed a…
1846 …* @param[in] engine The engine types to terminate. This is relative to the Canvas types, in which …
1849 * @retval Result::NonSupport In case the engine type is not supported on the system.
1857 * @brief Retrieves the version of the TVG engine.
1863 …* @return The version of the engine in the format major.minor.micro, or a @p nullptr in case of an…
1876 * @brief The Animation class enables manipulation of animatable images.
1878 * This class supports the display and control of animation frames.
1889 * @brief Specifies the current frame in the animation.
1891 …* @param[in] no The index of the animation frame to be displayed. The index should be less than th…
1893 … * @retval Result::InsufficientCondition if the given @p no is the same as the current frame value.
1894 * @retval Result::NonSupport The current Picture data does not support animations.
1896 …* @note For efficiency, ThorVG ignores updates to the new frame value if the difference from the c…
1898 …* Values less than 0.001 may be disregarded and may not be accurately retained by the Animat…
1908 …* This function provides access to the picture instance that can be used to load animation formats…
1909 …* After setting up the picture, it can be pushed to the designated canvas, enabling control over a…
1914 * @warning The picture instance is owned by Animation. It should not be deleted manually.
1920 * @brief Retrieves the current frame number of the animation.
1922 * @return The current frame number of the animation, between 0 and totalFrame() - 1.
1924 * @note If the Picture is not properly configured, this function will return 0.
1933 * @brief Retrieves the total number of frames in the animation.
1935 * @return The total number of frames in the animation.
1938 * @note If the Picture is not properly configured, this function will return 0.
1944 * @brief Retrieves the duration of the animation in seconds.
1946 * @return The duration of the animation in seconds.
1948 * @note If the Picture is not properly configured, this function will return 0.
1954 * @brief Specifies the playback segment of the animation.
1956 * The set segment is designated as the play area of the animation.
1957 * This is useful for playing a specific segment within the entire animation.
1958 * After setting, the number of animation frames and the playback time are calculated
1959 * by mapping the playback segment as the entire range.
1964 * @retval Result::InsufficientCondition In case the animation is not loaded.
1976 * @brief Gets the current segment.
1981 * @retval Result::InsufficientCondition In case the animation is not loaded.
2003 …* @brief A class for exporting a paint object into a specified file, from which to recover the pai…
2005 …* ThorVG provides a feature for exporting & importing paint data. The Saver role is to export the …
2006 …* It's useful when you need to save the composed scene or image from a paint object and recreate i…
2008 …* The file format is decided by the extension name(i.e. "*.tvg") while the supported formats depen…
2009 …* If it doesn't support the file format, the save() method returns the @c Result::NonSupport resul…
2011 * Once you export a paint to the file successfully, you can recreate it using the Picture class.
2023 * @brief Sets the base background content for the saved image.
2025 * @param[in] paint The paint to be drawn as the background image for the saving paint.
2032 * @brief Exports the given @p paint data to the given @p path
2034 * If the saver module supports any compression mechanism, it will optimize the data size.
2035 * This might affect the encoding/decoding time in some cases. You can turn off the compression
2038 * @param[in] paint The paint to be saved with all its associated properties.
2039 * @param[in] path A path to the file, in which the paint data is to be saved.
2046 …* @note Saving can be asynchronous if the assigned thread number is greater than zero. To guarante…
2054 * @brief Export the provided animation data to the specified file path.
2056 …xports the given animation data to the provided file path. You can also specify the desired frame …
2058 * @param[in] animation The animation to be saved, including all associated properties.
2059 * @param[in] path The path to the file where the animation will be saved.
2060 …* @param[in] quality The encoded quality level. @c 0 is the minimum, @c 100 is the maximum value(r…
2061 …* @param[in] fps The desired frames per second (FPS). For example, to encode data at 60 FPS, pass …
2064 …* @retval Result::NonSupport if an attempt is made to save the file with an unknown extension or i…
2067 …es per second (FPS) would result in a larger file size. It is recommended to use the default value.
2068 …* @note Saving can be asynchronous if the assigned thread number is greater than zero. To guarante…
2077 * @brief Guarantees that the saving task is finished.
2079 …* The behavior of the Saver works on a sync/async basis, depending on the threading setting of the…
2080 …* Thus, if you wish to have a benefit of it, you must call sync() after the save() in the proper d…
2083 * @note The asynchronous tasking is dependent on the Saver module implementation.
2106 * @brief The Accessor is a utility class to debug the Scene structure by traversing the scene-tree.
2108 …* The Accessor helps you search specific nodes to read the property information, figure out the st…
2110 …* @warning We strongly warn you not to change the paints of a scene unless you really know the des…
2122 * @brief Set the access function for traversing the Picture scene tree nodes.
2124 * @param[in] picture The picture node to traverse the internal scene-tree.
2125 * @param[in] func The callback function calling for every paint nodes of the Picture.
2126 * @param[in] data Data passed to the @p func as its argument.
2128 * @note The bitmap based picture might not have the scene-tree.
2137 * This function computes a unique identifier value based on the provided string.
2138 * You can use this to assign a unique ID to the Paint object.
2140 * @param[in] name The input string to generate the unique identifier from.
2142 * @return The generated unique identifier value.
2162 * @brief The cast() function is a utility function used to cast a 'Paint' to type 'T'.
2173 * @brief The cast() function is a utility function used to cast a 'Fill' to type 'T'.