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:
Hermet Park 2021-08-05 14:57:18 +09:00 committed by Hermet Park
parent cc81f8ef99
commit 8844bdd1e9

View file

@ -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)