diff --git a/inc/thorvg.h b/inc/thorvg.h index e84c9c3f..0b30f7f9 100644 --- a/inc/thorvg.h +++ b/inc/thorvg.h @@ -631,6 +631,8 @@ public: * 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. * + * @retval Result::InsufficientCondition: The canvas is either already in sync condition or in a damaged condition (a draw is required before syncing). + * * @see Canvas::draw() */ virtual Result sync() noexcept; diff --git a/src/bindings/capi/thorvg_capi.h b/src/bindings/capi/thorvg_capi.h index b316c651..05b57ee3 100644 --- a/src/bindings/capi/thorvg_capi.h +++ b/src/bindings/capi/thorvg_capi.h @@ -719,6 +719,7 @@ TVG_API Tvg_Result tvg_canvas_draw(Tvg_Canvas* canvas); * * \return Tvg_Result enumeration. * \retval TVG_RESULT_INVALID_ARGUMENT An invalid Tvg_Canvas pointer. +* \retval TVG_RESULT_INSUFFICIENT_CONDITION @p canvas is either already in sync condition or in a damaged condition (a draw is required before syncing). * * \see tvg_canvas_draw() */ diff --git a/src/renderer/tvgCanvas.h b/src/renderer/tvgCanvas.h index 02b431d4..a3dfb160 100644 --- a/src/renderer/tvgCanvas.h +++ b/src/renderer/tvgCanvas.h @@ -129,7 +129,7 @@ struct Canvas::Impl return Result::Success; } - return Result::InsufficientCondition; + return Result::Unknown; } Result viewport(int32_t x, int32_t y, int32_t w, int32_t h)