summaryrefslogtreecommitdiffstats
path: root/thirdparty/thorvg/inc/thorvg.h
diff options
context:
space:
mode:
authorMartin Capitanio <capnm@capitanio.org>2023-09-29 14:58:36 +0200
committerMartin Capitanio <capnm@capitanio.org>2023-09-29 19:50:19 +0200
commitaab650f2ef97915e22312e5da543e01989bbfd76 (patch)
tree847d2e5c6033ab1d06122c57beefa6dc6c019aad /thirdparty/thorvg/inc/thorvg.h
parent19890614c6a78ec36030ce65c7da05f07fcdb9ed (diff)
downloadredot-engine-aab650f2ef97915e22312e5da543e01989bbfd76.tar.gz
ThorVG: update to v0.11.0 release.
See https://github.com/thorvg/thorvg/releases/tag/v0.11.0 + Infrastructure Repository folder structure was make it more intuitive and coherent. "thorvg/src/lib" -> "thorvg/src/common" (providing essential common functionalities used internally among the renderer and sub-modules) "thorvg/src/lib" -> "thorvg/src/renderer" (for vector drawing features) + SVG related Fix stroke regression https://github.com/thorvg/thorvg/issues/1670 Support stroke dash offset function https://github.com/thorvg/thorvg/issues/1591#issuecomment-1681319321 Support Focal property in Radial Gradient https://github.com/thorvg/thorvg/issues/1558
Diffstat (limited to 'thirdparty/thorvg/inc/thorvg.h')
-rw-r--r--thirdparty/thorvg/inc/thorvg.h34
1 files changed, 12 insertions, 22 deletions
diff --git a/thirdparty/thorvg/inc/thorvg.h b/thirdparty/thorvg/inc/thorvg.h
index a5efc5ec17..1b9c2d70d3 100644
--- a/thirdparty/thorvg/inc/thorvg.h
+++ b/thirdparty/thorvg/inc/thorvg.h
@@ -171,7 +171,7 @@ enum class CompositeMethod
AlphaMask, ///< Alpha Masking using the compositing target's pixels as an alpha value.
InvAlphaMask, ///< Alpha Masking using the complement to the compositing target's pixels as an alpha value.
LumaMask, ///< Alpha Masking using the grayscale (0.2125R + 0.7154G + 0.0721*B) of the compositing target's pixels. @since 0.9
- InvLumaMask, ///< Alpha Masking using the grayscale (0.2125R + 0.7154G + 0.0721*B) of the complement to the compositing target's pixels. @BETA_API
+ InvLumaMask, ///< Alpha Masking using the grayscale (0.2125R + 0.7154G + 0.0721*B) of the complement to the compositing target's pixels.
AddMask, ///< Combines the target and source objects pixels using target alpha. (T * TA) + (S * (255 - TA)) @BETA_API
SubtractMask, ///< Subtracts the source color from the target color while considering their respective target alpha. (T * TA) - (S * (255 - TA)) @BETA_API
IntersectMask, ///< Computes the result by taking the minimum value between the target alpha and the source alpha and multiplies it with the target color. (T * min(TA, SA)) @BETA_API
@@ -240,6 +240,7 @@ struct Matrix
float e31, e32, e33;
};
+
/**
* @brief A data structure representing a texture mesh vertex
*
@@ -622,14 +623,16 @@ public:
virtual Result push(std::unique_ptr<Paint> paint) noexcept;
/**
- * @brief Sets the total number of the paints pushed into the canvas to be zero.
- * Depending on the value of the @p free argument, the paints are freed or not.
+ * @brief Clear the internal canvas resources that used for the drawing.
+ *
+ * This API sets the total number of paints pushed into the canvas to zero.
+ * Depending on the value of the @p free argument, the paints are either freed or retained.
+ * So if you need to update paint properties while maintaining the existing scene structure, you can set @p free = false.
*
* @param[in] free If @c true, the memory occupied by paints is deallocated, otherwise it is not.
*
* @return Result::Success when succeed, Result::InsufficientCondition otherwise.
*
- * @warning If you don't free the paints they become dangled. They are supposed to be reused, otherwise you are responsible for their lives. Thus please use the @p free argument only when you know how it works, otherwise it's not recommended.
* @see Canvas::push()
* @see Canvas::paints()
*/
@@ -818,7 +821,7 @@ public:
/**
* @brief Resets the properties of the shape path.
*
- * The color, the fill and the stroke properties are retained.
+ * The transformation matrix, the color, the fill and the stroke properties are retained.
*
* @return Result::Success when succeed.
*
@@ -1038,7 +1041,7 @@ public:
*
* @return Result::Success when succeed, Result::NonSupport unsupported value, Result::FailedAllocation otherwise.
*
- * @BETA_API
+ * @since 0.11
*/
Result strokeMiterlimit(float miterlimit) noexcept;
@@ -1192,7 +1195,7 @@ public:
*
* @return The stroke miterlimit value when succeed, 4 if no stroke was set.
*
- * @BETA_API
+ * @since 0.11
*/
float strokeMiterlimit() const noexcept;
@@ -1307,17 +1310,6 @@ public:
Result size(float* w, float* h) const noexcept;
/**
- * @brief Gets the pixels information of the picture.
- *
- * @note The data must be pre-multiplied by the alpha channels.
- *
- * @warning Please do not use it, this API is not official one. It could be modified in the next version.
- *
- * @BETA_API
- */
- const uint32_t* data(uint32_t* w, uint32_t* h) const noexcept;
-
- /**
* @brief Loads a raw data from a memory block with a given size.
*
* @retval Result::Success When succeed, Result::InsufficientCondition otherwise.
@@ -1863,8 +1855,7 @@ public:
/**
* @brief The cast() function is a utility function used to cast a 'Paint' to type 'T'.
- *
- * @BETA_API
+ * @since 0.11
*/
template<typename T>
std::unique_ptr<T> cast(Paint* paint)
@@ -1875,8 +1866,7 @@ std::unique_ptr<T> cast(Paint* paint)
/**
* @brief The cast() function is a utility function used to cast a 'Fill' to type 'T'.
- *
- * @BETA_API
+ * @since 0.11
*/
template<typename T>
std::unique_ptr<T> cast(Fill* fill)