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

Curve support for Drawables #203

Merged
merged 3 commits into from
May 9, 2022
Merged

Conversation

lucasstarsz
Copy link
Member

Curve Support for Drawable

Closes #109, related to #10

Additions

  • Created Pair class to handle returning 2 values at once, for generating point meshes with curves.
  • Support for converting Path2D objects with curves and multiple subpaths to Pointf[] arrays (with optional alternateIndexes stored in paired Point[])
  • DrawUtil#pointsOfPathWithAlt specifically for getting both the points of the path and indicators of where curves/other path related functions are
  • Support for writing/reading polygons with curves with .psdf files.

Breaking Changes

  • Removed RenderStyle from Polygon2DBuilder constructors, as well as other Polygon2D static methods. Instead, it is configured from Polygon2DBuilder#withRenderStyle(RenderStyle).
  • DrawUtil#pointsOfPath and variants no longer throw exceptions on unclosed paths.

Other Changes

  • Optimized usages of Polygon2D#getPoints to be less taxing for standard tasks

New Additions:
- Created Pair class to handle returning 2 values at once, for generating point meshes with curves.
Breaking Changes:
- Removed RenderStyle from Polygon2DBuilder constructors, as well as other Polygon2D static methods. Instead, it is configured from `Polygon2DBuilder#withRenderStyle(RenderStyle)`.
New Additions:
- Support for converting Path2D objects with curves and multiple subpaths to Pointf[] arrays (with optional `alternateIndexes` stored in paired `Point[]`)
- `DrawUtil#pointsOfPathWithAlt` specifically for getting both the points of the path and indicators of where curves/other path related functions are
- Support for writing/reading polygons with curves with .psdf files

Breaking Changes:
- `DrawUtil#pointsOfPath` and variants no longer throw exceptions on unclosed paths.

Bug Fixes:
- (minor) Fixed issue in `DrawUtil#createPath` where `altIndexes` was not checked for emptiness

Other Changes:
- Optimized usages of `Polygon2D#getPoints` to be less taxing for standard tasks
@sonarcloud
Copy link

sonarcloud bot commented May 9, 2022

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

32.8% 32.8% Coverage
0.0% 0.0% Duplication

@lucasstarsz lucasstarsz merged commit 949d3af into fastjengine:main May 9, 2022
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.

Add Drawable support for curves
1 participant