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 a typo #1214

Merged
merged 1 commit into from
Feb 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions egui/src/introspection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,13 @@ impl Widget for &mut epaint::TessellationOptions {
debug_paint_clip_rects,
debug_paint_text_rects,
debug_ignore_clip_rects,
bezier_tolerence,
bezier_tolerance,
epsilon: _,
} = self;
ui.checkbox(anti_alias, "Antialias")
.on_hover_text("Turn off for small performance gain.");
ui.add(
crate::widgets::Slider::new(bezier_tolerence, 0.0001..=10.0)
crate::widgets::Slider::new(bezier_tolerance, 0.0001..=10.0)
.logarithmic(true)
.show_value(true)
.text("Spline Tolerance"),
Expand Down
8 changes: 4 additions & 4 deletions epaint/src/tessellator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ pub struct TessellationOptions {
pub debug_ignore_clip_rects: bool,

/// The maximum distance between the original curve and the flattened curve.
pub bezier_tolerence: f32,
pub bezier_tolerance: f32,

/// The default value will be 1.0e-5, it will be used during float compare.
pub epsilon: f32,
Expand All @@ -319,7 +319,7 @@ impl Default for TessellationOptions {
debug_paint_text_rects: false,
debug_paint_clip_rects: false,
debug_ignore_clip_rects: false,
bezier_tolerence: 0.1,
bezier_tolerance: 0.1,
epsilon: 1.0e-5,
}
}
Expand Down Expand Up @@ -753,7 +753,7 @@ impl Tessellator {
return;
}

let points = quadratic_shape.flatten(Some(options.bezier_tolerence));
let points = quadratic_shape.flatten(Some(options.bezier_tolerance));

self.tessellate_bezier_complete(
&points,
Expand All @@ -777,7 +777,7 @@ impl Tessellator {
}

let points_vec =
cubic_shape.flatten_closed(Some(options.bezier_tolerence), Some(options.epsilon));
cubic_shape.flatten_closed(Some(options.bezier_tolerance), Some(options.epsilon));

for points in points_vec {
self.tessellate_bezier_complete(
Expand Down