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 022f9fc897
commit c75311d239
4 changed files with 7 additions and 7 deletions

View file

@ -358,7 +358,7 @@ public:
* *
* @note Experimental API * @note Experimental API
*/ */
Result blend(BlendMethod method) const noexcept; Result blend(BlendMethod method) noexcept;
/** /**
* @brief Gets the axis-aligned bounding box of the paint object. * @brief Gets the axis-aligned bounding box of the paint object.
@ -404,9 +404,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

@ -1029,7 +1029,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

@ -482,7 +482,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;