Skip to content

Commit

Permalink
Merge pull request #54 from Jarod42/clip_negative
Browse files Browse the repository at this point in the history
Clip negative
  • Loading branch information
Jarod42 authored Aug 27, 2024
2 parents 081b759 + 14ca2e6 commit 69e01cf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion TODO
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
* Continue rebasing from e3b13a3923cbe3e46c231b4f2817d2f0cabb58f9
* Continue rebasing from 98d94808f26240a1e7af77513a146cc9c2a870fd
* Add a focus listener interface.
* Make focus apply synchronously.
* Graphics and input objects for DirectX.
Expand Down
8 changes: 8 additions & 0 deletions src/graphics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,14 @@ namespace gcn

bool Graphics::pushClipArea(Rectangle area)
{
// Ignore area with a negative width or height
// by simple pushing an empty clip area to the stack.
if (area.width < 0 || area.height < 0)
{
ClipRectangle carea;
mClipStack.push(carea);
return true;
}
if (mClipStack.empty())
{
ClipRectangle carea;
Expand Down

0 comments on commit 69e01cf

Please sign in to comment.