Skip to content

Commit

Permalink
Zero out scissor dimensions, instead of skipping the push operation a…
Browse files Browse the repository at this point in the history
…nd incurring a scissor-stack push/pop mismatch (#64)
  • Loading branch information
AbeGellis authored Sep 17, 2023
1 parent 70e81a4 commit 98e3086
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions haxe/ui/backend/ComponentImpl.hx
Original file line number Diff line number Diff line change
Expand Up @@ -378,9 +378,7 @@ class ComponentImpl extends ComponentBase {
for (op in operations) {
switch (op) {
case ApplyScissor(sx, sy, sw, sh):
if (sw >= 0 && sh >= 0) {
ScissorHelper.pushScissor(g, sx, sy, sw, sh);
}
ScissorHelper.pushScissor(g, sx, sy, sw > 0 ? sw : 0, sh > 0 ? sh : 0);
case DrawStyle(c):
renderStyleTo(g, c);
case DrawImage(c):
Expand Down

0 comments on commit 98e3086

Please sign in to comment.