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

Rect trace iterator #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Rect trace iterator #2

wants to merge 2 commits into from

Conversation

thomcc
Copy link

@thomcc thomcc commented Sep 21, 2014

The _RectTracer class feels like a bit of a hack, but I don't think there's a way to write this without it (and without changing the signature of trace()).

Anyway, I think this also handles negative widths and heights better, as the old version wouldn't iterate over them at all. I didn't add a test case or mention the negative width/height thing because I'm not sure I understand how they're actually supposed to work if they have a negative width/height.

@munificent
Copy link
Owner

Thanks for hacking on this!

I didn't add a test case or mention the negative width/height thing because I'm not sure I understand how they're actually supposed to work if they have a negative width/height.

I think Rect's constructors should just throw an ArgumentError if you give them negative dimensions.

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