Skip to content

Commit

Permalink
Fix the rendering issue when applying Layer::scrollRect() (#317)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hparty authored Nov 6, 2024
1 parent f0ef93e commit 4283c48
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/layers/Layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,7 @@ void Layer::drawContents(const DrawArgs& args, Canvas* canvas, float alpha) {
canvas->save();
canvas->concat(child->getMatrixWithScrollRect());
if (child->_scrollRect) {
canvas->clipRect(Rect::MakeWH(child->_scrollRect->width(), child->_scrollRect->height()));
canvas->clipRect(*child->_scrollRect);
}
child->drawLayer(args, canvas, child->_alpha * alpha, child->_blendMode);
canvas->restore();
Expand Down
4 changes: 2 additions & 2 deletions test/baseline/version.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,12 @@
"dropShadow": "43cd416",
"filterClip": "43cd416",
"filterTest": "43cd416",
"getBounds": "50c58e6",
"getBounds": "af2e3ff",
"getLayersUnderPoint": "50c58e6",
"greyColorMatrix": "a1605b2",
"identityMatrix": "a1605b2",
"imageLayer": "99a5cd9",
"imageMask": "ba6aa7d",
"imageMask": "af2e3ff",
"shapeMask": "612c09e",
"textMask": "50c58e6"
},
Expand Down

0 comments on commit 4283c48

Please sign in to comment.