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

use top-left heuristic for vectorio.Polygon #3221

Merged
merged 1 commit into from
Jul 29, 2020

Conversation

kvc0
Copy link

@kvc0 kvc0 commented Jul 29, 2020

this flips the bottom-right style to top-left which is at least
kind of normal. A 2x2 square at (0,0) would be defined like
(0,0), (3,0), (3,3), (0,3)
Which seems kind of surprising but at least less bonkers than
that square being defined at (1,1), which is the current behavior.

[
  (0,0),
  (5,0),
  (5,10),
  (0,10)
]

points as above create the interior pixels below
image

this flips the bottom-right style to top-left which is at least
kind of normal.  A 2x2 square at (0,0) would be defined like
(0,0), (3,0), (3,3), (0,3)
Which seems kind of surprising but at least less bonkers than
that square being defined at (1,1), which is the current behavior.
Copy link
Member

@jepler jepler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 We discussed this on Discord. Assuming I understand what I'm seeing in the attached image, it's the result I was looking for. This is the usual definition used in 90s pixel graphics pipelines like OpenGL, so while no choice is 100% intuitive to a new user, this rule is backed up by practice.

@jepler jepler merged commit 5cb7e64 into adafruit:main Jul 29, 2020
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