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

Bezier curve #1155

Closed
wants to merge 3 commits into from
Closed

Bezier curve #1155

wants to merge 3 commits into from

Conversation

xudesheng
Copy link
Contributor

@xudesheng xudesheng commented Jan 24, 2022

Closes #1120.

  1. Added Shape::CubicBezier(CubicBezierShape) and Shape::QuadraticBezier(QuadraticBezierShape)
  2. Added tessellator for cubic and quadratic
  3. Added bezier_flattern_tolerence in TessellationOptions
  4. Added paint_bezier in demo app.

image

Copy link
Owner

@emilk emilk left a comment

Choose a reason for hiding this comment

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

Thank you - this looks really good! But needs some polish :)

egui_demo_lib/src/apps/demo/paint_bezier.rs Outdated Show resolved Hide resolved
egui_demo_lib/src/apps/demo/paint_bezier.rs Show resolved Hide resolved
egui/src/introspection.rs Show resolved Hide resolved
egui_demo_lib/src/apps/demo/demo_app_windows.rs Outdated Show resolved Hide resolved
egui_demo_lib/src/apps/demo/paint_bezier.rs Outdated Show resolved Hide resolved
epaint/src/shape.rs Outdated Show resolved Hide resolved
epaint/src/stats.rs Outdated Show resolved Hide resolved
epaint/src/tessellator.rs Show resolved Hide resolved
epaint/src/tessellator.rs Show resolved Hide resolved
epaint/src/tessellator.rs Show resolved Hide resolved
Copy link
Owner

@emilk emilk left a comment

Choose a reason for hiding this comment

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

You need to run cargo fmt and then silence a few clippy warnings, then LGTM! Awesome work!

egui/src/context.rs Show resolved Hide resolved
egui/src/introspection.rs Show resolved Hide resolved
}
painter.extend(shapes);

if self.points.len()>0{
Copy link
Owner

Choose a reason for hiding this comment

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

Hot tip: configure your editor to run cargo fmt on each save. It is a life-changer :)

epaint/src/tessellator.rs Show resolved Hide resolved
@xudesheng
Copy link
Contributor Author

I will close this PR request. PR #1178 will be the replacement since I don't know how to quickly merge the single PR #1175 into my current branch.

@xudesheng xudesheng closed this Jan 29, 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.

Bézier Curve Support as a new Plot item
2 participants