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

Fix ellipse rotation to work correctly #126

Merged
merged 2 commits into from
Mar 12, 2024

Conversation

punchagan
Copy link
Contributor

Previously, we only rotated the center of the ellipse, similar to the circle.
This commit adds a rotation field to the ellipse shape type which stores the
rotation of the ellipse in radians. And we use Cairo's rotate function when
rendering the ellipse.

Fixes #116 (in combination with #121, which has been merged)

This PR also adds an example for ellipse rotation.

rotate_ellipse

The rectangle at the top right corner has been added to show that these rotations don't affect anything that's already been rendered.

Previously, we only rotated the center of the ellipse, similar to the circle.
This commit adds a rotation field to the ellipse shape type which stores the
rotation of the ellipse in radians. And we use Cairo's rotate function when
rendering the ellipse.

Fixes Sudha247#116 along with Sudha247#121.
@nikochiko nikochiko merged commit 48e067e into Sudha247:main Mar 12, 2024
2 checks passed
@punchagan punchagan deleted the fix-ellipse branch March 12, 2024 06:47
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.

Ellipse rendering is imperfect
2 participants