api: corrected wrong const specifier

Setter obvisouly modifies the instance.
This commit is contained in:
Hermet Park 2024-08-20 16:15:55 +09:00
parent e0203a2fa2
commit 0a59e02a21
4 changed files with 7 additions and 7 deletions

View file

@ -357,7 +357,7 @@ public:
* *
* @note Experimental API * @note Experimental API
*/ */
Result blend(BlendMethod method) const noexcept; Result blend(BlendMethod method) noexcept;
/** /**
* @deprecated Use bounds(float* x, float* y, float* w, float* h, bool transformed) instead * @deprecated Use bounds(float* x, float* y, float* w, float* h, bool transformed) instead
@ -408,9 +408,9 @@ public:
CompositeMethod composite(const Paint** target) const noexcept; CompositeMethod composite(const Paint** target) const noexcept;
/** /**
* @brief Gets the blending method of the object. * @brief Retrieves the current blending method applied to the paint object.
* *
* @return The blending method * @return The currently set blending method.
* *
* @note Experimental API * @note Experimental API
*/ */

View file

@ -1028,7 +1028,7 @@ TVG_DEPRECATED TVG_API Tvg_Result tvg_paint_get_identifier(const Tvg_Paint* pain
* *
* @note Experimental API * @note Experimental API
*/ */
TVG_API Tvg_Result tvg_paint_set_blend_method(const Tvg_Paint* paint, Tvg_Blend_Method method); TVG_API Tvg_Result tvg_paint_set_blend_method(Tvg_Paint* paint, Tvg_Blend_Method method);
/** /**

View file

@ -237,10 +237,10 @@ TVG_API Tvg_Result tvg_paint_get_composite_method(const Tvg_Paint* paint, const
} }
TVG_API Tvg_Result tvg_paint_set_blend_method(const Tvg_Paint* paint, Tvg_Blend_Method method) TVG_API Tvg_Result tvg_paint_set_blend_method(Tvg_Paint* paint, Tvg_Blend_Method method)
{ {
if (!paint) return TVG_RESULT_INVALID_ARGUMENT; if (!paint) return TVG_RESULT_INVALID_ARGUMENT;
return (Tvg_Result) reinterpret_cast<const Paint*>(paint)->blend((BlendMethod)method); return (Tvg_Result) reinterpret_cast<Paint*>(paint)->blend((BlendMethod)method);
} }

View file

@ -488,7 +488,7 @@ TVG_DEPRECATED uint32_t Paint::identifier() const noexcept
} }
Result Paint::blend(BlendMethod method) const noexcept Result Paint::blend(BlendMethod method) noexcept
{ {
if (pImpl->blendMethod != method) { if (pImpl->blendMethod != method) {
pImpl->blendMethod = method; pImpl->blendMethod = method;