mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-10 06:34:01 +00:00
api: remove deprecated apis
- Result Paint::bounds(float* x, float* y, float* w, float* h) const noexcept; - Result Picture::load(const char* data, uint32_t size, bool copy = false) noexcept; @Issue: https://github.com/thorvg/thorvg/issues/1372
This commit is contained in:
parent
07cb8fd55b
commit
aa000f7c56
3 changed files with 0 additions and 45 deletions
33
inc/thorvg.h
33
inc/thorvg.h
|
@ -321,21 +321,6 @@ public:
|
|||
*/
|
||||
Result composite(std::unique_ptr<Paint> target, CompositeMethod method) noexcept;
|
||||
|
||||
/**
|
||||
* @brief Gets the bounding box of the paint object before any transformation.
|
||||
*
|
||||
* @param[out] x The x coordinate of the upper left corner of the object.
|
||||
* @param[out] y The y coordinate of the upper left corner of the object.
|
||||
* @param[out] w The width of the object.
|
||||
* @param[out] h The height of the object.
|
||||
*
|
||||
* @return Result::Success when succeed, Result::InsufficientCondition otherwise.
|
||||
*
|
||||
* @note The bounding box doesn't indicate the final rendered region. It's the smallest rectangle that encloses the object.
|
||||
* @see Paint::bounds(float* x, float* y, float* w, float* h, bool transformed);
|
||||
*/
|
||||
TVG_DEPRECATED Result bounds(float* x, float* y, float* w, float* h) const noexcept;
|
||||
|
||||
/**
|
||||
* @brief Gets the axis-aligned bounding box of the paint object.
|
||||
*
|
||||
|
@ -1145,24 +1130,6 @@ public:
|
|||
*/
|
||||
Result load(const std::string& path) noexcept;
|
||||
|
||||
/**
|
||||
* @brief Loads a picture data from a memory block of a given size.
|
||||
*
|
||||
* @param[in] data A pointer to a memory location where the content of the picture file is stored.
|
||||
* @param[in] size The size in bytes of the memory occupied by the @p data.
|
||||
* @param[in] copy Decides whether the data should be copied into the engine local buffer.
|
||||
*
|
||||
* @retval Result::Success When succeed.
|
||||
* @retval Result::InvalidArguments In case no data are provided or the @p size is zero or less.
|
||||
* @retval Result::NonSupport When trying to load a file with an unknown extension.
|
||||
* @retval Result::Unknown If an error occurs at a later stage.
|
||||
*
|
||||
* @warning: you have responsibility to release the @p data memory if the @p copy is true
|
||||
* @deprecated Use load(const char* data, uint32_t size, const std::string& mimeType, bool copy) instead.
|
||||
* @see Result load(const char* data, uint32_t size, const std::string& mimeType, bool copy = false) noexcept
|
||||
*/
|
||||
TVG_DEPRECATED Result load(const char* data, uint32_t size, bool copy = false) noexcept;
|
||||
|
||||
/**
|
||||
* @brief Loads a picture data from a memory block of a given size.
|
||||
*
|
||||
|
|
|
@ -348,12 +348,6 @@ Matrix Paint::transform() noexcept
|
|||
}
|
||||
|
||||
|
||||
TVG_DEPRECATED Result Paint::bounds(float* x, float* y, float* w, float* h) const noexcept
|
||||
{
|
||||
return this->bounds(x, y, w, h, false);
|
||||
}
|
||||
|
||||
|
||||
Result Paint::bounds(float* x, float* y, float* w, float* h, bool transform) const noexcept
|
||||
{
|
||||
if (pImpl->bounds(x, y, w, h, transform)) return Result::Success;
|
||||
|
|
|
@ -67,12 +67,6 @@ Result Picture::load(const char* data, uint32_t size, const string& mimeType, bo
|
|||
}
|
||||
|
||||
|
||||
TVG_DEPRECATED Result Picture::load(const char* data, uint32_t size, bool copy) noexcept
|
||||
{
|
||||
return load(data, size, "", copy);
|
||||
}
|
||||
|
||||
|
||||
Result Picture::load(uint32_t* data, uint32_t w, uint32_t h, bool copy) noexcept
|
||||
{
|
||||
if (!data || w <= 0 || h <= 0) return Result::InvalidArguments;
|
||||
|
|
Loading…
Add table
Reference in a new issue