mirror of
https://github.com/emilk/egui.git
synced 2026-08-30 13:20:05 -04:00
Fix typos (#2866)
* Fix typos in comments * Fix typos in demo texts * Fix typos in code names * Fix typos in cargos * Fix typos in changelogs
This commit is contained in:
@@ -813,7 +813,7 @@ mod tests {
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_quadratic_dfferent_tolerance() {
|
||||
fn test_quadratic_different_tolerance() {
|
||||
let curve = QuadraticBezierShape {
|
||||
points: [
|
||||
Pos2 { x: 110.0, y: 170.0 },
|
||||
@@ -1079,7 +1079,7 @@ mod tests {
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_quadrtic_flattening() {
|
||||
fn test_quadratic_flattening() {
|
||||
let curve = QuadraticBezierShape {
|
||||
points: [pos2(0.0, 0.0), pos2(80.0, 200.0), pos2(100.0, 30.0)],
|
||||
closed: false,
|
||||
|
||||
@@ -263,7 +263,7 @@ mod rw_lock_impl {
|
||||
pub fn read(&self) -> RwLockReadGuard<'_, T> {
|
||||
let tid = std::thread::current().id();
|
||||
|
||||
// If it is write-locked, and we locked it (re-entrancy deadlock)
|
||||
// If it is write-locked, and we locked it (reentrancy deadlock)
|
||||
let would_deadlock =
|
||||
self.lock.is_locked_exclusive() && self.holders.lock().contains_key(&tid);
|
||||
assert!(
|
||||
@@ -291,7 +291,7 @@ mod rw_lock_impl {
|
||||
pub fn write(&self) -> RwLockWriteGuard<'_, T> {
|
||||
let tid = std::thread::current().id();
|
||||
|
||||
// If it is locked in any way, and we locked it (re-entrancy deadlock)
|
||||
// If it is locked in any way, and we locked it (reentrancy deadlock)
|
||||
let would_deadlock = self.lock.is_locked() && self.holders.lock().contains_key(&tid);
|
||||
assert!(
|
||||
!would_deadlock,
|
||||
|
||||
@@ -322,8 +322,8 @@ impl Shape {
|
||||
bezier_shape.points[1] += delta;
|
||||
bezier_shape.points[2] += delta;
|
||||
}
|
||||
Shape::CubicBezier(cubie_curve) => {
|
||||
for p in &mut cubie_curve.points {
|
||||
Shape::CubicBezier(cubic_curve) => {
|
||||
for p in &mut cubic_curve.points {
|
||||
*p += delta;
|
||||
}
|
||||
}
|
||||
@@ -808,7 +808,7 @@ pub struct PaintCallback {
|
||||
/// `glow` backend requires that callback be an `egui_glow::CallbackFn` while the `wgpu`
|
||||
/// backend requires a `egui_wgpu::CallbackFn`.
|
||||
///
|
||||
/// If the type cannnot be downcast to the type expected by the current backend the callback
|
||||
/// If the type cannot be downcast to the type expected by the current backend the callback
|
||||
/// will not be drawn.
|
||||
///
|
||||
/// The rendering backend is responsible for first setting the active viewport to
|
||||
|
||||
@@ -43,9 +43,9 @@ pub fn adjust_colors(shape: &mut Shape, adjust_color: &impl Fn(&mut Color32)) {
|
||||
adjust_color(&mut v.color);
|
||||
}
|
||||
}
|
||||
Shape::QuadraticBezier(quatratic) => {
|
||||
adjust_color(&mut quatratic.fill);
|
||||
adjust_color(&mut quatratic.stroke.color);
|
||||
Shape::QuadraticBezier(quadratic) => {
|
||||
adjust_color(&mut quadratic.fill);
|
||||
adjust_color(&mut quadratic.stroke.color);
|
||||
}
|
||||
Shape::CubicBezier(bezier) => {
|
||||
adjust_color(&mut bezier.fill);
|
||||
|
||||
@@ -1219,7 +1219,7 @@ impl Tessellator {
|
||||
out.append_ref(mesh);
|
||||
}
|
||||
|
||||
/// Tessellate a line segment between the two points with the given stoken into a [`Mesh`].
|
||||
/// Tessellate a line segment between the two points with the given stroke into a [`Mesh`].
|
||||
///
|
||||
/// * `shape`: the mesh to tessellate.
|
||||
/// * `out`: triangles are appended to this.
|
||||
@@ -1314,7 +1314,7 @@ impl Tessellator {
|
||||
rect.max = rect.max.at_most(pos2(1e7, 1e7));
|
||||
|
||||
if rect.width() < self.feathering {
|
||||
// Very thin - approximate by a vertial line-segment:
|
||||
// Very thin - approximate by a vertical line-segment:
|
||||
let line = [rect.center_top(), rect.center_bottom()];
|
||||
if fill != Color32::TRANSPARENT {
|
||||
self.tessellate_line(line, Stroke::new(rect.width(), fill), out);
|
||||
|
||||
@@ -22,7 +22,7 @@ impl TextureManager {
|
||||
/// The returned [`TextureId`] will be [`TextureId::Managed`], with an index
|
||||
/// starting from zero and increasing with each call to [`Self::alloc`].
|
||||
///
|
||||
/// The first texture you allocate will be `TextureId::Managed(0) == TexureId::default()` and
|
||||
/// The first texture you allocate will be `TextureId::Managed(0) == TextureId::default()` and
|
||||
/// MUST have a white pixel at (0,0) ([`crate::WHITE_UV`]).
|
||||
///
|
||||
/// The texture is given a retain-count of `1`, requiring one call to [`Self::free`] to free it.
|
||||
|
||||
Reference in New Issue
Block a user