diff --git a/inc/thorvg.h b/inc/thorvg.h index 6c721f8d..14f97816 100644 --- a/inc/thorvg.h +++ b/inc/thorvg.h @@ -1274,12 +1274,19 @@ public: /** * @brief Loads a raw data from a memory block with a given size. * + * @param[in] paint A Tvg_Paint pointer to the picture object. + * @param[in] data A pointer to a memory location where the content of the picture raw data is stored. + * @param[in] w The width of the image @p data in pixels. + * @param[in] h The height of the image @p data in pixels. + * @param[in] premultiplied If @c true, the given image data is alpha-premultiplied. + * @param[in] copy If @c true the data are copied into the engine local buffer, otherwise they are not. + * * @retval Result::Success When succeed, Result::InsufficientCondition otherwise. * @retval Result::FailedAllocation An internal error possibly with memory allocation. * * @since 0.9 */ - Result load(uint32_t* data, uint32_t w, uint32_t h, bool premultiplied, bool copy) noexcept; + Result load(uint32_t* data, uint32_t w, uint32_t h, bool premultiplied, bool copy = false) noexcept; /** * @brief Sets or removes the triangle mesh to deform the image. diff --git a/src/bindings/capi/thorvg_capi.h b/src/bindings/capi/thorvg_capi.h index a19c68c7..079bcb3a 100644 --- a/src/bindings/capi/thorvg_capi.h +++ b/src/bindings/capi/thorvg_capi.h @@ -1968,6 +1968,13 @@ TVG_API Tvg_Result tvg_picture_load(Tvg_Paint* paint, const char* path); /*! * \brief Loads a picture data from a memory block of a given size. * +* \param[in] paint A Tvg_Paint pointer to the picture object. +* \param[in] data A pointer to a memory location where the content of the picture raw data is stored. +* \param[in] w The width of the image @p data in pixels. +* \param[in] h The height of the image @p data in pixels. +* \param[in] premultiplied If @c true, the given image data is alpha-premultiplied. +* \param[in] copy If @c true the data are copied into the engine local buffer, otherwise they are not. +* * \return Tvg_Result enumeration. * \retval TVG_RESULT_SUCCESS Succeed. * \retval TVG_RESULT_INVALID_ARGUMENT An invalid Tvg_Paint pointer or no data are provided or the @p width or @p height value is zero or less.