Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always set debug rect/circle size to at least 1 #36

Closed
wants to merge 1 commit into from
Closed

Always set debug rect/circle size to at least 1 #36

wants to merge 1 commit into from

Conversation

DaVince
Copy link

@DaVince DaVince commented Oct 6, 2015

HaxePunk doesn't allow zero size rectangle and circle drawing, so this ensures that the size is always at least 1 pixel.

Pull request is to fix the bug in issue #35 where the game crashes in debug mode with zero size objects.
Let me know if using the ? : shorthand isn't clean/allowed. I just went for the shortest solution here.

HaxePunk doesn't allow zero size rectangle and circle drawing, so this ensures that the size is always at least 1 pixel.
@MattTuttle
Copy link
Member

Why not skip creating a mask altogether if the width/height are zero?

@DaVince
Copy link
Author

DaVince commented Oct 7, 2015

Because I figured it was required to have a mask. But you're right. In that case, let me amend it.

@DaVince DaVince closed this Oct 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants