mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 13:43:43 +00:00
common picture: return bounding box size with the current image size.
if the picture has a bitmap-based image, it can return the bounding box size with the current image size.
This commit is contained in:
parent
cc81f8ef99
commit
8844bdd1e9
1 changed files with 4 additions and 2 deletions
|
@ -147,8 +147,10 @@ struct Picture::Impl
|
|||
|
||||
bool bounds(float* x, float* y, float* w, float* h) const
|
||||
{
|
||||
if (!paint) return false;
|
||||
return paint->pImpl->bounds(x, y, w, h);
|
||||
if (paint) return paint->pImpl->bounds(x, y, w, h);
|
||||
if (w) *w = this->w;
|
||||
if (h) *h = this->h;
|
||||
return true;
|
||||
}
|
||||
|
||||
RenderRegion bounds(RenderMethod& renderer)
|
||||
|
|
Loading…
Add table
Reference in a new issue