projects
/
platform
/
core
/
graphics
/
tizenvg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0fc0d37
)
common picture: return bounding box size with the current image size.
author
Hermet Park
<chuneon.park@samsung.com>
Thu, 5 Aug 2021 05:57:18 +0000
(14:57 +0900)
committer
JunsuChoi
<jsuya.choi@samsung.com>
Fri, 6 Aug 2021 01:04:08 +0000
(10:04 +0900)
if the picture has a bitmap-based image,
it can return the bounding box size with the current image size.
src/lib/tvgPictureImpl.h
patch
|
blob
|
history
diff --git
a/src/lib/tvgPictureImpl.h
b/src/lib/tvgPictureImpl.h
index
eb0edd9
..
4d329d3
100644
(file)
--- a/
src/lib/tvgPictureImpl.h
+++ b/
src/lib/tvgPictureImpl.h
@@
-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)