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:
Hermet Park 2021-09-23 16:50:08 +09:00 committed by Hermet Park
parent 56d31775ff
commit e784143ff8
3 changed files with 2 additions and 23 deletions

View file

@ -1076,12 +1076,6 @@ public:
*/ */
const uint32_t* data(uint32_t* w, uint32_t* h) const noexcept; 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. * @brief Loads a raw data from a memory block with a given size.
* *

View file

@ -111,13 +111,3 @@ const uint32_t* Picture::data(uint32_t* w, uint32_t* h) const noexcept
} }
return pImpl->pixels; 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;
}

View file

@ -347,12 +347,7 @@ static bool _parsePicture(TvgBinBlock block, Paint* paint)
//Case2: Base Paint Properties //Case2: Base Paint Properties
if (_parsePaintProperty(block, picture)) return true; if (_parsePaintProperty(block, picture)) return true;
//Case3: Vector Picture //Vector Picture won't be requested since Saver replaces it with the Scene
if (auto paint = _parsePaint(block)) {
picture->paint(unique_ptr<Paint>(paint));
return true;
}
return false; return false;
} }