mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-13 19:44:28 +00:00
wasm: remove empty space
This commit is contained in:
parent
91a6cdb9dc
commit
b7eb1f80f0
1 changed files with 3 additions and 3 deletions
|
@ -181,14 +181,14 @@ public:
|
|||
const Paint* paint = findPaintById(mPicture, paintId, &parents);
|
||||
if (!paint) return val(typed_memory_view<float>(0, nullptr));
|
||||
paint->bounds(&mBounds[0], &mBounds[1], &mBounds[2], &mBounds[3]);
|
||||
|
||||
|
||||
float points[8] = { //clockwise points
|
||||
mBounds[0], mBounds[1], //(x1, y1)
|
||||
mBounds[0] + mBounds[2], mBounds[1], //(x2, y1)
|
||||
mBounds[0] + mBounds[2], mBounds[1] + mBounds[3], //(x2, y2)
|
||||
mBounds[0], mBounds[1] + mBounds[3], //(x1, y2)
|
||||
};
|
||||
|
||||
|
||||
for (auto paint = parents.data; paint < (parents.data + parents.count); ++paint) {
|
||||
auto m = const_cast<Paint*>(*paint)->transform();
|
||||
for (int i = 0; i<8; i += 2) {
|
||||
|
@ -197,7 +197,7 @@ public:
|
|||
points[i] = x;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
mBounds[0] = points[0];//x(p1)
|
||||
mBounds[1] = points[3];//y(p2)
|
||||
mBounds[2] = points[4] - mBounds[0];//x(p3)
|
||||
|
|
Loading…
Add table
Reference in a new issue