mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 05:33:36 +00:00
api: remove the redundant api, Picture::paint().
tvg::Picture is replaced to tvg::Scene if the picture has the vector tree, Thus it's useless since it won't be reached logically.
This commit is contained in:
parent
56d31775ff
commit
e784143ff8
3 changed files with 2 additions and 23 deletions
|
@ -1076,12 +1076,6 @@ public:
|
|||
*/
|
||||
const uint32_t* data(uint32_t* w, uint32_t* h) const noexcept;
|
||||
|
||||
/**
|
||||
* Must remove it!
|
||||
* @BETA_API
|
||||
*/
|
||||
Result paint(std::unique_ptr<Paint> paint) noexcept;
|
||||
|
||||
/**
|
||||
* @brief Loads a raw data from a memory block with a given size.
|
||||
*
|
||||
|
|
|
@ -111,13 +111,3 @@ const uint32_t* Picture::data(uint32_t* w, uint32_t* h) const noexcept
|
|||
}
|
||||
return pImpl->pixels;
|
||||
}
|
||||
|
||||
|
||||
Result Picture::paint(unique_ptr<Paint> paint) noexcept
|
||||
{
|
||||
if (pImpl->paint) return Result::InsufficientCondition;
|
||||
auto p = paint.release();
|
||||
if (!p) return Result::MemoryCorruption;
|
||||
pImpl->paint = p;
|
||||
return Result::Success;
|
||||
}
|
||||
|
|
|
@ -347,12 +347,7 @@ static bool _parsePicture(TvgBinBlock block, Paint* paint)
|
|||
//Case2: Base Paint Properties
|
||||
if (_parsePaintProperty(block, picture)) return true;
|
||||
|
||||
//Case3: Vector Picture
|
||||
if (auto paint = _parsePaint(block)) {
|
||||
picture->paint(unique_ptr<Paint>(paint));
|
||||
return true;
|
||||
}
|
||||
|
||||
//Vector Picture won't be requested since Saver replaces it with the Scene
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue