From 35d64a18a6c4866792b13012128c649f7dd5af4c Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Wed, 18 Nov 2026 17:12:04 -0800 Subject: [PATCH] Shapes: Circle tool review fixes for From Center - tool.setOption accepts fromCenter again: the Circle tool implements check_option, which the shared option check now calls for every tool. - A drag from the first point that comes back within 2 screen points of the press draws the circle the tool shows. A drag to no circle draws nothing and leaves no point pending. - shape.circleThroughPoints refuses a circle whose opposite edges round to the same number at its coordinates, and the tool no longer shows such a circle. The error is translated in every complete-message catalog. - An option set during a press (tool.setOption, the Control bar) is kept when the press is dropped, with the options that write reset. --- crates/engine/src/cmd/create.rs | 6 ++++- crates/engine/src/tests/circle_through.rs | 14 +++++++++++ crates/engine/src/tests/toolsettings.rs | 26 ++++++++++++++++++++ crates/engine/src/tooling.rs | 29 +++++++++++++++++++++- crates/tools/src/circle.rs | 22 ++++++++++++++--- crates/tools/src/circle/tests.rs | 30 +++++++++++++++++++++++ crates/ui-egui/src/i18n/ca.tsv | 1 + crates/ui-egui/src/i18n/cs.tsv | 1 + crates/ui-egui/src/i18n/da.tsv | 1 + crates/ui-egui/src/i18n/de.tsv | 1 + crates/ui-egui/src/i18n/el.tsv | 1 + crates/ui-egui/src/i18n/es.tsv | 1 + crates/ui-egui/src/i18n/fi.tsv | 1 + crates/ui-egui/src/i18n/fr.tsv | 1 + crates/ui-egui/src/i18n/hi.tsv | 1 + crates/ui-egui/src/i18n/hu.tsv | 1 + crates/ui-egui/src/i18n/it.tsv | 1 + crates/ui-egui/src/i18n/ja.tsv | 1 + crates/ui-egui/src/i18n/ka.tsv | 1 + crates/ui-egui/src/i18n/ko.tsv | 1 + crates/ui-egui/src/i18n/nl.tsv | 1 + crates/ui-egui/src/i18n/pl.tsv | 1 + crates/ui-egui/src/i18n/pt-br.tsv | 1 + crates/ui-egui/src/i18n/ru.tsv | 1 + crates/ui-egui/src/i18n/sv.tsv | 1 + crates/ui-egui/src/i18n/tr.tsv | 1 + crates/ui-egui/src/i18n/uk.tsv | 1 + crates/ui-egui/src/i18n/vi.tsv | 1 + crates/ui-egui/src/i18n/zh-hans.tsv | 1 + crates/ui-egui/src/i18n/zh-hant.tsv | 1 + docs/mcp.md | 4 ++- 31 files changed, 148 insertions(+), 7 deletions(-) diff --git a/crates/engine/src/cmd/create.rs b/crates/engine/src/cmd/create.rs index b7d84d28b2..7d0a8db3ba 100644 --- a/crates/engine/src/cmd/create.rs +++ b/crates/engine/src/cmd/create.rs @@ -71,7 +71,7 @@ pub fn specs() -> Vec { "Circle Through Points", [], None, - "{points?: [[x, y], [x, y]] or [[x, y], [x, y], [x, y]] (two: the ends of a diameter; left out: the two or three selected anchor points, where a path selected whole counts all its anchors and selected segments' ends do not count), center?: [x, y] (the circle's center; `points` then holds the one point its edge passes through, [[x, y]])} → {id, cx, cy, radius}: a circle with the current paint whose edge passes through the points, not pixel-aligned even while Align New Objects to Pixel Grid is on; two points that are the same, a point on `center`, three on one line, or a circle reaching past the canvas are an error, and nothing is drawn", + "{points?: [[x, y], [x, y]] or [[x, y], [x, y], [x, y]] (two: the ends of a diameter; left out: the two or three selected anchor points, where a path selected whole counts all its anchors and selected segments' ends do not count), center?: [x, y] (the circle's center; `points` then holds the one point its edge passes through, [[x, y]])} → {id, cx, cy, radius}: a circle with the current paint whose edge passes through the points, not pixel-aligned even while Align New Objects to Pixel Grid is on; two points that are the same, a point on `center`, three on one line, a circle reaching past the canvas, or one too small for its edges to differ at its coordinates are an error, and nothing is drawn", has_doc, circle_through_points ), @@ -455,6 +455,10 @@ fn circle_through_points(s: &mut Session, p: &Value) -> Result { } }; let r = Rect::new(center.x - radius, center.y - radius, center.x + radius, center.y + radius); + // A radius below the step between doubles at the center leaves opposite edges on one number. + if !(r.width() > 0.0 && r.height() > 0.0) { + return Err(bad(C, "the circle is too small to draw at these coordinates")); + } let live = LiveShape::Ellipse { w: r.width(), h: r.height(), pie: (0.0, 360.0), xf: Affine::translate(r.origin().to_vec2()) }; // Not pixel-aligned: the circle stays through the points. let mut out = add_art_unaligned(s, "Ellipse", path_kind(live.to_path(), Some(live)))?; diff --git a/crates/engine/src/tests/circle_through.rs b/crates/engine/src/tests/circle_through.rs index ef504538db..f841b56a61 100644 --- a/crates/engine/src/tests/circle_through.rs +++ b/crates/engine/src/tests/circle_through.rs @@ -166,6 +166,20 @@ fn a_center_and_a_point_on_the_edge_give_the_circle() { assert_eq!((undo_len(&s), object_count(&s)), (undo, count)); } +/// A circle so small beside its coordinates that its left and right edges round to the same +/// number (radius 10⁻¹¹ pt at x = 1,048,576, where doubles step by about 2.3 × 10⁻¹⁰) is refused, +/// from a center and on a diameter alike; nothing is drawn and no undo step is recorded. +#[test] +fn a_circle_with_no_width_at_document_precision_is_refused() { + let mut s = session(); + let (undo, count) = (undo_len(&s), object_count(&s)); + for p in [json!({"center": [1_048_576, 0], "points": [[1_048_576, 1e-11]]}), json!({"points": [[1_048_576, 0], [1_048_576, 2e-11]]})] { + let e = s.execute(C, &p).unwrap_err().to_string(); + assert!(e.contains("the circle is too small to draw at these coordinates"), "{p}: {e}"); + } + assert_eq!((undo_len(&s), object_count(&s)), (undo, count)); +} + /// Points that are not two or three pairs of finite numbers are an error, not a fallback. #[test] fn malformed_points_are_refused() { diff --git a/crates/engine/src/tests/toolsettings.rs b/crates/engine/src/tests/toolsettings.rs index 7afdb80aef..42209b6ab1 100644 --- a/crates/engine/src/tests/toolsettings.rs +++ b/crates/engine/src/tests/toolsettings.rs @@ -48,6 +48,32 @@ fn circle_from_center_persists() { assert_eq!(next.tool_options(), json!({"fromCenter": true})); } +/// An option set during a press (`tool.setOption`, or a Control bar change) is kept when the press +/// is dropped: the drop gives back only what the press itself changed. +#[test] +fn an_option_set_during_a_dropped_press_is_kept() { + let v = ViewInfo::default(); + let mut s = session(); + select(&mut s, "circle"); + s.set_tool_option("fromCenter", &json!(true)); + s.pointer(&PointerEvent::new(PointerKind::Down, 100.0, 100.0), v).unwrap(); + s.set_tool_option_cmd(&json!({"key": "fromCenter", "value": false})).unwrap(); + s.drop_tool_press(v).unwrap(); + assert_eq!(s.tool_options(), json!({"fromCenter": false})); + assert_eq!(s.prefs.tool_settings["circle"]["fromCenter"], json!(false)); + s.pointer(&PointerEvent::new(PointerKind::Down, 100.0, 100.0), v).unwrap(); + s.set_tool_option("fromCenter", &json!(true)); + s.drop_tool_press(v).unwrap(); + assert_eq!(s.tool_options(), json!({"fromCenter": true})); + assert_eq!(s.prefs.tool_settings["circle"]["fromCenter"], json!(true)); + // Setting a Parametric Shape's kind also puts its numbers back to that kind's: those are kept too. + select(&mut s, "parametricShape"); + s.pointer(&PointerEvent::new(PointerKind::Down, 100.0, 100.0), v).unwrap(); + let set = s.set_tool_option_cmd(&json!({"key": "kind", "value": "star"})).unwrap(); + s.drop_tool_press(v).unwrap(); + assert_eq!(s.tool_options(), set); +} + #[test] fn options_survive_a_tool_switch() { let mut s = session(); diff --git a/crates/engine/src/tooling.rs b/crates/engine/src/tooling.rs index b144087b6f..19d262117f 100644 --- a/crates/engine/src/tooling.rs +++ b/crates/engine/src/tooling.rs @@ -605,7 +605,8 @@ impl Session { /// Escape, as during a drag, for most tools), and a release returns the tool to rest. Of what /// the tool asks for along the way, only a cancel and a notify run, so a marquee selects /// nothing and a click opens no size dialog. The tool gets back the persistent options it had - /// when the press began, and none of the press's changes to them are stored. A dropped Type + /// when the press began, and none of the press's changes to them are stored; an option set on + /// it during the press (`tool.setOption`, the Control bar) is kept. A dropped Type /// press restores the prior selection. The freeform gradient point selected once the tool /// took the press is selected again. A press held while the tool computes an edit on another /// thread has not reached the tool: it is removed from the held input with the pointer events @@ -1303,9 +1304,31 @@ impl Session { if key == "queue" && self.tool.id() == "place" { self.note_place_queue_roots(); } + let was = self.tool.options(); self.tool.set_option(key, v); self.tool_set_since_reset = true; self.keep_tool_settings(); + self.keep_option_writes_past_a_dropped_press(&was, [key]); + } + + /// Options set on the active tool during a press are written into the options the press began + /// with, so a dropped press ([`Self::drop_tool_press`]) gives back only what the press changed: + /// the options `keys` names, and every other option the write changed from `was` (setting a + /// Parametric Shape's `kind` resets its numbers). + fn keep_option_writes_past_a_dropped_press<'a>(&mut self, was: &Value, keys: impl IntoIterator) { + let now = self.tool.options(); + if let Some((id, before)) = self.press_options.as_mut() + && id == self.tool.id() + { + let keys: Vec<&str> = keys.into_iter().collect(); + for (key, slot) in before.iter_mut() { + if let Some(v) = now.get(key) + && (keys.contains(&key.as_str()) || was.get(key) != Some(v)) + { + *slot = v.clone(); + } + } + } } /// Keep the automation roots in force now as those the place cursor's queue, being loaded, @@ -1359,6 +1382,7 @@ impl Session { // kind puts the shape's other numbers back to that kind's, and those given with it are its. let first = |k: &str| k == "queue" || k == "kind"; let ordered = || values.iter().filter(|(k, _)| first(k)).chain(values.iter().filter(|(k, _)| !first(k))); + let was = self.tool.options(); let mut other = (!active).then(|| self.make_tool(id.unwrap_or_default())); let t = other.as_deref_mut().unwrap_or(self.tool.as_mut()); for (k, v) in ordered() { @@ -1387,6 +1411,9 @@ impl Session { let set = other.id(); Self::restore_stores(&self.prefs, self.tool.as_mut(), |store| settings::stores(set).any(|(s, _)| s == store)); } + if active { + self.keep_option_writes_past_a_dropped_press(&was, values.keys().map(String::as_str)); + } out } diff --git a/crates/tools/src/circle.rs b/crates/tools/src/circle.rs index 99ec88f6e7..388cdab4fb 100644 --- a/crates/tools/src/circle.rs +++ b/crates/tools/src/circle.rs @@ -82,9 +82,10 @@ fn command(points: &[Point], centered: bool) -> (String, Value) { } } -/// Is the circle at `c` with radius `r` inside the canvas? +/// Is the circle at `c` with radius `r` inside the canvas, with its opposite edges on different +/// numbers (as `shape.circleThroughPoints` requires)? fn on_canvas(c: Point, r: f64) -> bool { - [c.x - r, c.y - r, c.x + r, c.y + r].iter().all(|v| v.abs() <= MAX_COORD) + [c.x - r, c.y - r, c.x + r, c.y + r].iter().all(|v| v.abs() <= MAX_COORD) && c.x - r < c.x + r && c.y - r < c.y + r } /// The circle through two points (the ends of a diameter) or three, as `shape.circleThroughPoints` @@ -275,8 +276,16 @@ impl Tool for CircleTool { vec![] } PointerKind::Up => match (self.press.take(), self.first, self.pointer) { - (Some(Press::First { at, dragged: true, .. }), _, Some(b)) if b.distance(at) >= cx.tol(DRAG_PX) => self.draw(&[at, b]), - // A click places the first point; the guides of the press go. + // Once the press has moved DRAG_PX, the release draws the circle the tool shows, also + // where the pointer came back nearer the press; where it shows none, the release + // draws nothing and starts afresh. + (Some(Press::First { at, dragged: true, .. }), _, Some(b)) + if b.distance(at) >= cx.tol(DRAG_PX) || circle_for(&[at, b], self.centered).is_some() => + { + self.draw(&[at, b]) + } + // A click, or a drag back onto the press, places the first point; the guides of the + // press go. (Some(Press::First { .. }), ..) => { self.snap.clear(); vec![] @@ -310,6 +319,11 @@ impl Tool for CircleTool { } } + /// [`check_options`] for one option. + fn check_option(&self, key: &str, value: &Value) -> Result<(), String> { + check_options(&Map::from_iter([(key.to_string(), value.clone())])) + } + fn key(&mut self, _cx: &ToolContext, key: ToolKey, _mods: Mods) -> Vec { if key == ToolKey::Escape { self.clear(); diff --git a/crates/tools/src/circle/tests.rs b/crates/tools/src/circle/tests.rs index 32875b186d..e8377dc478 100644 --- a/crates/tools/src/circle/tests.rs +++ b/crates/tools/src/circle/tests.rs @@ -430,6 +430,28 @@ fn from_center_the_release_draws_the_circle_shown() { assert_eq!(t.pointer(&cx, &ev(PointerKind::Up, (331.0, 340.0), Mods::default())), centered((300.0, 300.0), (331.0, 340.0))); } +/// Once a press has moved 2 screen points, its release draws the circle the tool shows, also when +/// the pointer comes back nearer than that: from a center and on a diameter. A drag back onto the +/// press itself shows no circle and places the first point, as a click does. +#[test] +fn a_drag_brought_back_near_its_press_draws_the_circle_shown() { + let (d, _) = doc_with_rect(); + let (s, p) = (Selection::default(), paint()); + let cx = ToolContext { smart_guides: false, ..cx(&d, &s, &p) }; + let mut t = from_center(); + assert_eq!(drag(&mut t, &cx, (300.0, 300.0), &[(320.0, 300.0), (301.0, 300.0)], Mods::default()), centered((300.0, 300.0), (301.0, 300.0))); + assert!(!t.ends_on_escape(&cx), "no center is left pending"); + let mut t = CircleTool::default(); + assert_eq!(drag(&mut t, &cx, (300.0, 300.0), &[(320.0, 300.0), (301.0, 300.0)], Mods::default()), circle(&[(300.0, 300.0), (301.0, 300.0)])); + assert!(!t.ends_on_escape(&cx)); + assert_eq!(drag(&mut t, &cx, (300.0, 300.0), &[(320.0, 300.0), (300.0, 300.0)], Mods::default()), vec![]); + assert!(t.ends_on_escape(&cx), "the first point is placed"); + t.key(&cx, ToolKey::Escape, Mods::default()); + // A drag to a circle past the canvas draws nothing and leaves no point behind. + assert_eq!(drag(&mut t, &cx, (300.0, 300.0), &[(4.1e6, 300.0)], Mods::default()), vec![]); + assert!(!t.ends_on_escape(&cx), "nothing is left pending"); +} + /// With From Center, Shift keeps the point at 45° steps from the center, and Alt rounds the /// diameter, twice the radius, to the rulers' ticks (every 5 pt at 100% in points). #[test] @@ -467,6 +489,10 @@ fn from_center_holds_for_the_circle_being_drawn() { assert_eq!(drag(&mut t, &cx, (300.0, 300.0), &[(380.0, 360.0)], Mods::default()), circle(&[(300.0, 300.0), (380.0, 360.0)])); assert_eq!(circle_for(&[Point::new(1.0, 1.0), Point::new(1.0, 1.0)], true), None); assert!(too_large(&[Point::new(0.0, 0.0), Point::new(4.1e6, 0.0)], true)); + // Edges that round to one number at document precision, as `shape.circleThroughPoints` refuses. + let x = 1_048_576.0; + assert_eq!(circle_for(&[Point::new(x, 0.0), Point::new(x, 1e-11)], true), None); + assert_eq!(circle_of(&[Point::new(x, 0.0), Point::new(x, 2e-11)]), None); t.set_option("fromCenter", &json!("yes")); assert_eq!(t.options(), json!({ "fromCenter": false }), "a value that is not true or false is ignored"); } @@ -478,6 +504,10 @@ fn the_options_are_checked() { assert_eq!(check_options(&map(json!({ "fromCenter": true }))), Ok(())); assert_eq!(check_options(&map(json!({ "fromCenter": 1 }))), Err("`fromCenter` must be true or false".into())); assert_eq!(check_options(&map(json!({ "radius": 5 }))), Err("unknown Circle tool option `radius`".into())); + let t = CircleTool::default(); + assert_eq!(t.check_option("fromCenter", &json!(false)), Ok(())); + assert_eq!(t.check_option("fromCenter", &json!(1)), Err("`fromCenter` must be true or false".into())); + assert_eq!(t.check_option("radius", &json!(5)), Err("unknown Circle tool option `radius`".into())); } /// The tool is in the Ellipse tool's group, after the Ellipse tool. diff --git a/crates/ui-egui/src/i18n/ca.tsv b/crates/ui-egui/src/i18n/ca.tsv index fdf1c5c881..bb588caef8 100644 --- a/crates/ui-egui/src/i18n/ca.tsv +++ b/crates/ui-egui/src/i18n/ca.tsv @@ -6609,6 +6609,7 @@ liquify-list-end {0}, {1} {0} i {1} @msg `points` must be two or three [x, y] pairs of numbers `points` han de ser dos o tres parells de nombres [x, y] @msg `center` must be an [x, y] pair of numbers, with one [x, y] pair in `points` `center` ha de ser un parell de nombres [x, y], amb un parell [x, y] a `points` @msg the point in `points` is on `center` el punt de `points` és a `center` +@msg the circle is too small to draw at these coordinates el cercle és massa petit per dibuixar-lo en aquestes coordenades @msg direct-select two or three anchor points, or give `points` seleccioneu directament dos o tres punts d’ancoratge o indiqueu `points` @msg no circle passes through these points: two are the same or all three lie on one line cap cercle no passa per aquests punts: dos són iguals o tots tres són en una mateixa recta @msg no app to open files here aquí no hi ha cap aplicació per obrir fitxers diff --git a/crates/ui-egui/src/i18n/cs.tsv b/crates/ui-egui/src/i18n/cs.tsv index 6b79156ede..4664964b19 100644 --- a/crates/ui-egui/src/i18n/cs.tsv +++ b/crates/ui-egui/src/i18n/cs.tsv @@ -5511,6 +5511,7 @@ liquify-list-end {0}, {1} {0} a {1} @msg `points` must be two or three [x, y] pairs of numbers `points` musí být dvě nebo tři dvojice čísel [x, y] @msg `center` must be an [x, y] pair of numbers, with one [x, y] pair in `points` `center` musí být dvojice čísel [x, y] a `points` musí obsahovat jednu dvojici [x, y] @msg the point in `points` is on `center` bod v `points` leží na `center` +@msg the circle is too small to draw at these coordinates kruh je na těchto souřadnicích příliš malý na vykreslení @msg direct-select two or three anchor points, or give `points` vyberte přímým výběrem dva nebo tři kotevní body, nebo zadejte `points` @msg no circle passes through these points: two are the same or all three lie on one line těmito body neprochází žádná kružnice: dva jsou stejné nebo všechny tři leží na jedné přímce @msg no app to open files here zde chybí aplikace pro otevírání souborů diff --git a/crates/ui-egui/src/i18n/da.tsv b/crates/ui-egui/src/i18n/da.tsv index 3b1edf35e0..9811af3cc9 100644 --- a/crates/ui-egui/src/i18n/da.tsv +++ b/crates/ui-egui/src/i18n/da.tsv @@ -7685,6 +7685,7 @@ imageTrace Outline Kontur @msg `points` must be two or three [x, y] pairs of numbers `points` skal være to eller tre talpar [x, y] @msg `center` must be an [x, y] pair of numbers, with one [x, y] pair in `points` `center` skal være et talpar [x, y], med ét talpar [x, y] i `points` @msg the point in `points` is on `center` punktet i `points` ligger på `center` +@msg the circle is too small to draw at these coordinates cirklen er for lille til at tegne ved disse koordinater @msg direct-select two or three anchor points, or give `points` direkte markér to eller tre ankerpunkter, eller angiv `points` @msg no circle passes through these points: two are the same or all three lie on one line ingen cirkel går gennem disse punkter: to er ens, eller alle tre ligger på én linje @msg no app to open files here ingen app til at åbne filer her diff --git a/crates/ui-egui/src/i18n/de.tsv b/crates/ui-egui/src/i18n/de.tsv index 97b9689e89..f924c7cae0 100644 --- a/crates/ui-egui/src/i18n/de.tsv +++ b/crates/ui-egui/src/i18n/de.tsv @@ -5106,6 +5106,7 @@ liquify-list-end {0}, {1} {0} und {1} @msg `points` must be two or three [x, y] pairs of numbers `points` muss aus zwei oder drei Zahlenpaaren [x, y] bestehen @msg `center` must be an [x, y] pair of numbers, with one [x, y] pair in `points` `center` muss ein Zahlenpaar [x, y] sein, mit einem Paar [x, y] in `points` @msg the point in `points` is on `center` der Punkt in `points` liegt auf `center` +@msg the circle is too small to draw at these coordinates der Kreis ist zu klein, um ihn an diesen Koordinaten zu zeichnen @msg direct-select two or three anchor points, or give `points` wählen Sie zwei oder drei Ankerpunkte direkt aus oder geben Sie `points` an @msg no circle passes through these points: two are the same or all three lie on one line durch diese Punkte verläuft kein Kreis: zwei sind gleich oder alle drei liegen auf einer Linie @msg no app to open files here hier gibt es keine App zum Öffnen von Dateien diff --git a/crates/ui-egui/src/i18n/el.tsv b/crates/ui-egui/src/i18n/el.tsv index 708fdbdea6..5023e79736 100644 --- a/crates/ui-egui/src/i18n/el.tsv +++ b/crates/ui-egui/src/i18n/el.tsv @@ -5163,6 +5163,7 @@ digits Malayalam Μαλαγιάλαμ @msg `points` must be two or three [x, y] pairs of numbers το `points` πρέπει να είναι δύο ή τρία ζεύγη αριθμών [x, y] @msg `center` must be an [x, y] pair of numbers, with one [x, y] pair in `points` το `center` πρέπει να είναι ένα ζεύγος αριθμών [x, y], με ένα ζεύγος [x, y] στο `points` @msg the point in `points` is on `center` το σημείο στο `points` βρίσκεται πάνω στο `center` +@msg the circle is too small to draw at these coordinates ο κύκλος είναι πολύ μικρός για να σχεδιαστεί σε αυτές τις συντεταγμένες @msg direct-select two or three anchor points, or give `points` επιλέξτε άμεσα δύο ή τρία σημεία αγκύρωσης ή δώστε `points` @msg no circle passes through these points: two are the same or all three lie on one line κανένας κύκλος δεν περνά από αυτά τα σημεία: δύο είναι ίδια ή και τα τρία βρίσκονται σε μία ευθεία @msg no app to open files here δεν υπάρχει εφαρμογή για άνοιγμα αρχείων εδώ diff --git a/crates/ui-egui/src/i18n/es.tsv b/crates/ui-egui/src/i18n/es.tsv index 5a9f2c6745..b24ca7345e 100644 --- a/crates/ui-egui/src/i18n/es.tsv +++ b/crates/ui-egui/src/i18n/es.tsv @@ -5218,6 +5218,7 @@ liquify-list-end {0}, {1} {0}, {1} @msg `points` must be two or three [x, y] pairs of numbers `points` debe ser dos o tres pares de números [x, y] @msg `center` must be an [x, y] pair of numbers, with one [x, y] pair in `points` `center` debe ser un par de números [x, y], con un par [x, y] en `points` @msg the point in `points` is on `center` el punto de `points` está en `center` +@msg the circle is too small to draw at these coordinates el círculo es demasiado pequeño para dibujarlo en estas coordenadas @msg direct-select two or three anchor points, or give `points` seleccione directamente dos o tres puntos de ancla o indique `points` @msg no circle passes through these points: two are the same or all three lie on one line ningún círculo pasa por estos puntos: dos son iguales o los tres están en una misma línea @msg no app to open files here aquí no hay ninguna aplicación para abrir archivos diff --git a/crates/ui-egui/src/i18n/fi.tsv b/crates/ui-egui/src/i18n/fi.tsv index 939fba5136..369fd5c84d 100644 --- a/crates/ui-egui/src/i18n/fi.tsv +++ b/crates/ui-egui/src/i18n/fi.tsv @@ -5429,6 +5429,7 @@ liquify-list-end {0}, {1} {0} ja {1} @msg `points` must be two or three [x, y] pairs of numbers `points` on annettava kahtena tai kolmena lukuparina [x, y] @msg `center` must be an [x, y] pair of numbers, with one [x, y] pair in `points` `center` on annettava lukuparina [x, y], ja `points` sisältää yhden lukuparin [x, y] @msg the point in `points` is on `center` `points`-kohdan piste on `center`-kohdassa +@msg the circle is too small to draw at these coordinates ympyrä on liian pieni piirrettäväksi näissä koordinaateissa @msg direct-select two or three anchor points, or give `points` valitse suoraan kaksi tai kolme ankkuripistettä tai anna `points` @msg no circle passes through these points: two are the same or all three lie on one line näiden pisteiden kautta ei kulje ympyrää: kaksi pisteistä on samoja tai kaikki kolme ovat samalla suoralla @msg no app to open files here täällä ei ole sovellusta tiedostojen avaamiseen diff --git a/crates/ui-egui/src/i18n/fr.tsv b/crates/ui-egui/src/i18n/fr.tsv index e176a346f5..54451dc567 100644 --- a/crates/ui-egui/src/i18n/fr.tsv +++ b/crates/ui-egui/src/i18n/fr.tsv @@ -5177,6 +5177,7 @@ liquify-list-end {0}, {1} {0} et {1} @msg `points` must be two or three [x, y] pairs of numbers `points` doit contenir deux ou trois paires de nombres [x, y] @msg `center` must be an [x, y] pair of numbers, with one [x, y] pair in `points` `center` doit être une paire de nombres [x, y], avec une paire [x, y] dans `points` @msg the point in `points` is on `center` le point de `points` est sur `center` +@msg the circle is too small to draw at these coordinates le cercle est trop petit pour être dessiné à ces coordonnées @msg direct-select two or three anchor points, or give `points` sélectionnez deux ou trois points d’ancrage avec l’outil Sélection directe, ou indiquez `points` @msg no circle passes through these points: two are the same or all three lie on one line aucun cercle ne passe par ces points : deux sont identiques ou les trois sont alignés @msg no app to open files here aucune application pour ouvrir des fichiers ici diff --git a/crates/ui-egui/src/i18n/hi.tsv b/crates/ui-egui/src/i18n/hi.tsv index 55a8d59b38..c153796e96 100644 --- a/crates/ui-egui/src/i18n/hi.tsv +++ b/crates/ui-egui/src/i18n/hi.tsv @@ -8113,6 +8113,7 @@ liquify-list-end {0}, {1} {0} और {1} @msg `points` must be two or three [x, y] pairs of numbers `points` में संख्याओं के दो या तीन [x, y] जोड़े होने चाहिए @msg `center` must be an [x, y] pair of numbers, with one [x, y] pair in `points` `center` संख्याओं का एक [x, y] जोड़ा होना चाहिए, और `points` में एक [x, y] जोड़ा होना चाहिए @msg the point in `points` is on `center` `points` का बिंदु `center` पर है +@msg the circle is too small to draw at these coordinates इन निर्देशांकों पर बनाने के लिए वृत्त बहुत छोटा है @msg direct-select two or three anchor points, or give `points` दो या तीन एंकर पॉइंट्स डायरेक्ट-सिलेक्ट करें, या `points` दें @msg no circle passes through these points: two are the same or all three lie on one line इन पॉइंट्स से होकर कोई वृत्त नहीं गुज़रता: दो एक जैसे हैं या तीनों एक ही रेखा पर हैं @msg no app to open files here यहां फ़ाइलों को ओपन करने के लिए कोई ऐप नहीं है diff --git a/crates/ui-egui/src/i18n/hu.tsv b/crates/ui-egui/src/i18n/hu.tsv index f4c96c7a18..cce0dd257b 100644 --- a/crates/ui-egui/src/i18n/hu.tsv +++ b/crates/ui-egui/src/i18n/hu.tsv @@ -5882,6 +5882,7 @@ liquify-list-end {0}, {1} {0} és {1} @msg `points` must be two or three [x, y] pairs of numbers a `points` két vagy három [x, y] számpár legyen @msg `center` must be an [x, y] pair of numbers, with one [x, y] pair in `points` a `center` egy [x, y] számpár legyen, a `points` pedig egy [x, y] párt tartalmazzon @msg the point in `points` is on `center` a `points` pontja a `center` helyén van +@msg the circle is too small to draw at these coordinates a kör túl kicsi ahhoz, hogy ezeken a koordinátákon megrajzolható legyen @msg direct-select two or three anchor points, or give `points` jelölj ki közvetlen kijelöléssel két vagy három horgonypontot, vagy add meg a `points` értéket @msg no circle passes through these points: two are the same or all three lie on one line ezeken a pontokon nem halad át kör: kettő egybeesik, vagy mindhárom egy egyenesen van @msg no app to open files here itt nincs fájlmegnyitó alkalmazás diff --git a/crates/ui-egui/src/i18n/it.tsv b/crates/ui-egui/src/i18n/it.tsv index e19aacb767..e9367355da 100644 --- a/crates/ui-egui/src/i18n/it.tsv +++ b/crates/ui-egui/src/i18n/it.tsv @@ -5244,6 +5244,7 @@ liquify-list-end {0}, {1} {0} e {1} @msg `points` must be two or three [x, y] pairs of numbers `points` deve essere composto da due o tre coppie di numeri [x, y] @msg `center` must be an [x, y] pair of numbers, with one [x, y] pair in `points` `center` deve essere una coppia di numeri [x, y], con una coppia [x, y] in `points` @msg the point in `points` is on `center` il punto in `points` si trova su `center` +@msg the circle is too small to draw at these coordinates il cerchio è troppo piccolo per essere disegnato a queste coordinate @msg direct-select two or three anchor points, or give `points` seleziona con Selezione diretta due o tre punti di ancoraggio oppure indica `points` @msg no circle passes through these points: two are the same or all three lie on one line nessun cerchio passa per questi punti: due coincidono oppure tutti e tre sono allineati @msg no app to open files here nessuna app per aprire file qui diff --git a/crates/ui-egui/src/i18n/ja.tsv b/crates/ui-egui/src/i18n/ja.tsv index 59566c624e..0068177ecf 100644 --- a/crates/ui-egui/src/i18n/ja.tsv +++ b/crates/ui-egui/src/i18n/ja.tsv @@ -5006,6 +5006,7 @@ variable-list-end {0}, {1} {0}、{1} @msg `points` must be two or three [x, y] pairs of numbers `points` は 2 組または 3 組の数値 [x, y] にしてください @msg `center` must be an [x, y] pair of numbers, with one [x, y] pair in `points` `center` は数値の組 [x, y] にし、`points` には [x, y] を 1 組指定してください @msg the point in `points` is on `center` `points` の点が `center` と同じ位置にあります +@msg the circle is too small to draw at these coordinates 円が小さすぎるため、この座標には描画できません @msg direct-select two or three anchor points, or give `points` アンカーポイントを 2 つまたは 3 つダイレクト選択するか、`points` を指定してください @msg no circle passes through these points: two are the same or all three lie on one line これらの点を通る円はありません: 2 つの点が同じか、3 点すべてが一直線上にあります @msg select at least two objects オブジェクトを 2 つ以上選択してください diff --git a/crates/ui-egui/src/i18n/ka.tsv b/crates/ui-egui/src/i18n/ka.tsv index 2efcf36d22..c087fe47a4 100644 --- a/crates/ui-egui/src/i18n/ka.tsv +++ b/crates/ui-egui/src/i18n/ka.tsv @@ -6970,6 +6970,7 @@ font-technology Variable ცვლადი @msg `points` must be two or three [x, y] pairs of numbers `points` უნდა იყოს რიცხვების ორი ან სამი [x, y] წყვილი @msg `center` must be an [x, y] pair of numbers, with one [x, y] pair in `points` `center` უნდა იყოს რიცხვების [x, y] წყვილი, ხოლო `points` უნდა შეიცავდეს ერთ [x, y] წყვილს @msg the point in `points` is on `center` `points`-ის წერტილი `center`-ზეა +@msg the circle is too small to draw at these coordinates წრე ძალიან პატარაა ამ კოორდინატებზე დასახატად @msg direct-select two or three anchor points, or give `points` პირდაპირი მონიშვნით მონიშნეთ ორი ან სამი საყრდენი წერტილი ან მიუთითეთ `points` @msg no circle passes through these points: two are the same or all three lie on one line ამ წერტილებზე წრეწირი არ გადის: ორი ერთნაირია ან სამივე ერთ წრფეზე მდებარეობს @msg no app to open files here აქ ფაილების გასახსნელი აპი არ არის diff --git a/crates/ui-egui/src/i18n/ko.tsv b/crates/ui-egui/src/i18n/ko.tsv index 8a842f9b71..f60b5a4eb7 100644 --- a/crates/ui-egui/src/i18n/ko.tsv +++ b/crates/ui-egui/src/i18n/ko.tsv @@ -4935,6 +4935,7 @@ variable-list-end {0}, {1} {0} 및 {1} @msg `points` must be two or three [x, y] pairs of numbers `points`는 숫자 쌍 [x, y] 두 개 또는 세 개여야 합니다 @msg `center` must be an [x, y] pair of numbers, with one [x, y] pair in `points` `center`는 숫자 쌍 [x, y]이고 `points`에는 [x, y] 쌍이 하나 있어야 합니다 @msg the point in `points` is on `center` `points`의 점이 `center`에 있습니다 +@msg the circle is too small to draw at these coordinates 원이 너무 작아 이 좌표에서 그릴 수 없습니다 @msg direct-select two or three anchor points, or give `points` 앵커 포인트 두 개 또는 세 개를 직접 선택하거나 `points`를 지정하세요 @msg no circle passes through these points: two are the same or all three lie on one line 이 점들을 지나는 원이 없습니다: 두 점이 같거나 세 점이 모두 한 직선 위에 있습니다 @msg select at least two objects 개체를 두 개 이상 선택하세요 diff --git a/crates/ui-egui/src/i18n/nl.tsv b/crates/ui-egui/src/i18n/nl.tsv index 27092ebd7d..001884c62b 100644 --- a/crates/ui-egui/src/i18n/nl.tsv +++ b/crates/ui-egui/src/i18n/nl.tsv @@ -5560,6 +5560,7 @@ imageTrace Outline Contour @msg `points` must be two or three [x, y] pairs of numbers `points` moet uit twee of drie getallenparen [x, y] bestaan @msg `center` must be an [x, y] pair of numbers, with one [x, y] pair in `points` `center` moet een getallenpaar [x, y] zijn, met één paar [x, y] in `points` @msg the point in `points` is on `center` het punt in `points` ligt op `center` +@msg the circle is too small to draw at these coordinates de cirkel is te klein om op deze coördinaten te tekenen @msg direct-select two or three anchor points, or give `points` selecteer met directe selectie twee of drie ankerpunten of geef `points` op @msg no circle passes through these points: two are the same or all three lie on one line er gaat geen cirkel door deze punten: twee zijn gelijk of alle drie liggen op één lijn @msg no app to open files here hier is geen app om bestanden mee te openen diff --git a/crates/ui-egui/src/i18n/pl.tsv b/crates/ui-egui/src/i18n/pl.tsv index c26579b579..a2e7599dc5 100644 --- a/crates/ui-egui/src/i18n/pl.tsv +++ b/crates/ui-egui/src/i18n/pl.tsv @@ -5328,6 +5328,7 @@ liquify-list-end {0}, {1} {0} i {1} @msg `points` must be two or three [x, y] pairs of numbers `points` musi zawierać dwie lub trzy pary liczb [x, y] @msg `center` must be an [x, y] pair of numbers, with one [x, y] pair in `points` `center` musi być parą liczb [x, y], a `points` musi zawierać jedną parę [x, y] @msg the point in `points` is on `center` punkt w `points` leży w `center` +@msg the circle is too small to draw at these coordinates okrąg jest zbyt mały, aby go narysować w tych współrzędnych @msg direct-select two or three anchor points, or give `points` zaznacz bezpośrednio dwa lub trzy punkty kontrolne lub podaj `points` @msg no circle passes through these points: two are the same or all three lie on one line przez te punkty nie przechodzi żaden okrąg: dwa są takie same albo wszystkie trzy leżą na jednej prostej @msg no app to open files here brak aplikacji do otwierania plików diff --git a/crates/ui-egui/src/i18n/pt-br.tsv b/crates/ui-egui/src/i18n/pt-br.tsv index 461b2b188e..9a946817dc 100644 --- a/crates/ui-egui/src/i18n/pt-br.tsv +++ b/crates/ui-egui/src/i18n/pt-br.tsv @@ -4474,6 +4474,7 @@ axis Both Ambos @msg `points` must be two or three [x, y] pairs of numbers `points` deve ter dois ou três pares de números [x, y] @msg `center` must be an [x, y] pair of numbers, with one [x, y] pair in `points` `center` deve ser um par de números [x, y], com um par [x, y] em `points` @msg the point in `points` is on `center` o ponto em `points` está em `center` +@msg the circle is too small to draw at these coordinates o círculo é pequeno demais para ser desenhado nessas coordenadas @msg direct-select two or three anchor points, or give `points` selecione diretamente dois ou três pontos de ancoragem ou informe `points` @msg no circle passes through these points: two are the same or all three lie on one line nenhum círculo passa por esses pontos: dois são iguais ou os três estão na mesma reta @msg no app to open files here nenhum aplicativo para abrir arquivos aqui diff --git a/crates/ui-egui/src/i18n/ru.tsv b/crates/ui-egui/src/i18n/ru.tsv index 3833801529..cd4b6a34ce 100644 --- a/crates/ui-egui/src/i18n/ru.tsv +++ b/crates/ui-egui/src/i18n/ru.tsv @@ -5239,6 +5239,7 @@ liquify-list-end {0}, {1} {0} и {1} @msg `points` must be two or three [x, y] pairs of numbers `points` должен содержать две или три пары чисел [x, y] @msg `center` must be an [x, y] pair of numbers, with one [x, y] pair in `points` `center` должен быть парой чисел [x, y], а `points` должен содержать одну пару [x, y] @msg the point in `points` is on `center` точка в `points` совпадает с `center` +@msg the circle is too small to draw at these coordinates круг слишком мал, чтобы нарисовать его в этих координатах @msg direct-select two or three anchor points, or give `points` выделите прямым выделением две или три опорные точки или задайте `points` @msg no circle passes through these points: two are the same or all three lie on one line через эти точки не проходит ни одна окружность: две точки совпадают или все три лежат на одной прямой @msg no app to open files here здесь нет приложения для открытия файлов diff --git a/crates/ui-egui/src/i18n/sv.tsv b/crates/ui-egui/src/i18n/sv.tsv index 486ad17e33..479b960195 100644 --- a/crates/ui-egui/src/i18n/sv.tsv +++ b/crates/ui-egui/src/i18n/sv.tsv @@ -5103,6 +5103,7 @@ liquify-list-end {0}, {1} {0} och {1} @msg `points` must be two or three [x, y] pairs of numbers `points` måste vara två eller tre talpar [x, y] @msg `center` must be an [x, y] pair of numbers, with one [x, y] pair in `points` `center` måste vara ett talpar [x, y], med ett talpar [x, y] i `points` @msg the point in `points` is on `center` punkten i `points` ligger på `center` +@msg the circle is too small to draw at these coordinates cirkeln är för liten för att ritas vid dessa koordinater @msg direct-select two or three anchor points, or give `points` direktmarkera två eller tre ankarpunkter eller ange `points` @msg no circle passes through these points: two are the same or all three lie on one line ingen cirkel går genom de här punkterna: två är samma punkt eller så ligger alla tre på en linje @msg no app to open files here det finns ingen app för att öppna filer här diff --git a/crates/ui-egui/src/i18n/tr.tsv b/crates/ui-egui/src/i18n/tr.tsv index 17f712e5e9..847aa2c502 100644 --- a/crates/ui-egui/src/i18n/tr.tsv +++ b/crates/ui-egui/src/i18n/tr.tsv @@ -4931,6 +4931,7 @@ liquify-list-end {0}, {1} {0} ve {1} @msg `points` must be two or three [x, y] pairs of numbers `points` iki veya üç [x, y] sayı çifti olmalıdır @msg `center` must be an [x, y] pair of numbers, with one [x, y] pair in `points` `center` bir [x, y] sayı çifti olmalı ve `points` bir [x, y] çifti içermelidir @msg the point in `points` is on `center` `points` içindeki nokta `center` üzerinde +@msg the circle is too small to draw at these coordinates daire bu koordinatlarda çizilemeyecek kadar küçük @msg direct-select two or three anchor points, or give `points` iki veya üç bağlantı noktasını doğrudan seçin veya `points` verin @msg no circle passes through these points: two are the same or all three lie on one line bu noktalardan geçen bir çember yok: ikisi aynı ya da üçü de aynı doğru üzerinde @msg no app to open files here burada dosyaları açacak uygulama yok diff --git a/crates/ui-egui/src/i18n/uk.tsv b/crates/ui-egui/src/i18n/uk.tsv index 0da8c07841..a9419f974e 100644 --- a/crates/ui-egui/src/i18n/uk.tsv +++ b/crates/ui-egui/src/i18n/uk.tsv @@ -5228,6 +5228,7 @@ liquify-list-end {0}, {1} {0} і {1} @msg `points` must be two or three [x, y] pairs of numbers `points` має містити дві або три пари чисел [x, y] @msg `center` must be an [x, y] pair of numbers, with one [x, y] pair in `points` `center` має бути парою чисел [x, y], а `points` має містити одну пару [x, y] @msg the point in `points` is on `center` точка в `points` збігається з `center` +@msg the circle is too small to draw at these coordinates коло занадто мале, щоб намалювати його в цих координатах @msg direct-select two or three anchor points, or give `points` виділіть дві або три опорні точки прямим виділенням або задайте `points` @msg no circle passes through these points: two are the same or all three lie on one line через ці точки не проходить жодне коло: дві точки збігаються або всі три лежать на одній прямій @msg no app to open files here тут немає програми для відкриття файлів diff --git a/crates/ui-egui/src/i18n/vi.tsv b/crates/ui-egui/src/i18n/vi.tsv index 4c77ae1c5b..d11f1f4ff0 100644 --- a/crates/ui-egui/src/i18n/vi.tsv +++ b/crates/ui-egui/src/i18n/vi.tsv @@ -5575,6 +5575,7 @@ liquify-list-end {0}, {1} {0} và {1} @msg `points` must be two or three [x, y] pairs of numbers `points` phải là hai hoặc ba cặp số [x, y] @msg `center` must be an [x, y] pair of numbers, with one [x, y] pair in `points` `center` phải là một cặp số [x, y], với một cặp [x, y] trong `points` @msg the point in `points` is on `center` điểm trong `points` nằm tại `center` +@msg the circle is too small to draw at these coordinates hình tròn quá nhỏ để vẽ tại các tọa độ này @msg direct-select two or three anchor points, or give `points` hãy chọn trực tiếp hai hoặc ba điểm neo hoặc cung cấp `points` @msg no circle passes through these points: two are the same or all three lie on one line không có đường tròn nào đi qua các điểm này: hai điểm trùng nhau hoặc cả ba điểm thẳng hàng @msg no app to open files here không có ứng dụng để mở tệp ở đây diff --git a/crates/ui-egui/src/i18n/zh-hans.tsv b/crates/ui-egui/src/i18n/zh-hans.tsv index 4602582363..7f3734ae01 100644 --- a/crates/ui-egui/src/i18n/zh-hans.tsv +++ b/crates/ui-egui/src/i18n/zh-hans.tsv @@ -4701,6 +4701,7 @@ imageTrace Outline 轮廓 @msg `points` must be two or three [x, y] pairs of numbers `points` 必须是两对或三对数字 [x, y] @msg `center` must be an [x, y] pair of numbers, with one [x, y] pair in `points` `center` 必须是一对数字 [x, y],且 `points` 中须有一对 [x, y] @msg the point in `points` is on `center` `points` 中的点与 `center` 重合 +@msg the circle is too small to draw at these coordinates 圆太小,无法在这些坐标处绘制 @msg direct-select two or three anchor points, or give `points` 请直接选择两个或三个锚点,或提供 `points` @msg no circle passes through these points: two are the same or all three lie on one line 没有圆经过这些点:有两点相同,或三点共线 @msg select at least two objects 请至少选择两个对象 diff --git a/crates/ui-egui/src/i18n/zh-hant.tsv b/crates/ui-egui/src/i18n/zh-hant.tsv index 8adc28406f..fc73a5308d 100644 --- a/crates/ui-egui/src/i18n/zh-hant.tsv +++ b/crates/ui-egui/src/i18n/zh-hant.tsv @@ -2152,6 +2152,7 @@ file-filter Templates 範本 @msg `points` must be two or three [x, y] pairs of numbers `points` 必須是兩組或三組數字 [x, y] @msg `center` must be an [x, y] pair of numbers, with one [x, y] pair in `points` `center` 必須是一組數字 [x, y],且 `points` 中須有一組 [x, y] @msg the point in `points` is on `center` `points` 中的點與 `center` 重合 +@msg the circle is too small to draw at these coordinates 圓太小,無法在這些座標處繪製 @msg direct-select two or three anchor points, or give `points` 請以直接選取方式選取兩個或三個錨點,或提供 `points` @msg no circle passes through these points: two are the same or all three lie on one line 沒有圓通過這些點:有兩點相同,或三點共線 @msg select at least two objects 請選取至少兩個物件 diff --git a/docs/mcp.md b/docs/mcp.md index eb1c620a22..8b86caa800 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -6699,7 +6699,9 @@ out and the selection does not hold two or three anchor points of paths. `shape.circleThroughPoints {center: [x, y], points: [[x, y]]}` draws the circle centered at `center` whose edge passes through the one point in `points`: its radius is the distance between them. It returns an error and draws nothing when the point is on `center`, when the circle would reach past the canvas, and when `center` is not a pair of numbers or -`points` does not hold exactly one pair. With `center`, the selected anchor points are not used. +`points` does not hold exactly one pair. With `center`, the selected anchor points are not used. With or without +`center`, a circle whose radius is so small beside its coordinates that its opposite edges round to the same number is +an error, and nothing is drawn. The Circle tool, after the Ellipse tool in its toolbar group, draws with this command. A drag from one point to another, or a click on each, draws the circle with the two points as the ends of a diameter. A click on a first point,