mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-17 09:36:45 +00:00
Arc: Arc Segment Tool Options shows a picture of the arc as its options change
Double-clicking the Arc tool opens Arc Segment Tool Options, which now shows the arc below Fill Arc and redraws it as the lengths, Reference Point, Type, Base Along, Slope and Fill Arc change, ui.dialog.set included. The picture is the arc shape.arc draws from the options OK sets, fitted into a 160 x 120 frame with its proportions kept, in the current stroke (black when there is none), filled with the current fill when Fill Arc is on, turned by General > Constrain Angle, with a mark on the reference point. A gradient or pattern stroke or fill shows as gray. OK still only sets the options and draws nothing; the click dialog has no picture.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
//! Star, Line Segment, Arc and Spiral tool options, and the two grids (size, divider counts and skews, switches).
|
||||
//! The Line Segment, Arc and grid dialogs are also their tools' Tool Options (a double-click on the
|
||||
//! tool, [`open_options`]): OK then sets the options the tool's next drag and click use, and draws
|
||||
//! nothing.
|
||||
//! nothing. Arc Segment Tool Options also shows a picture of the arc its fields describe.
|
||||
|
||||
use serde_json::{Value, json};
|
||||
use vectorcraft_doc::Unit;
|
||||
@@ -181,6 +181,10 @@ fn body(app: &mut VectorcraftApp, ui: &mut egui::Ui, d: &mut Dialog) -> bool {
|
||||
});
|
||||
} else if d.kind == "arc" {
|
||||
arc_form(ui, d, unit);
|
||||
if d.bool(TOOL_OPTIONS) {
|
||||
ui.add_space(8.0);
|
||||
arc_preview(ui, d, &app.session);
|
||||
}
|
||||
} else if LINKED.contains(&d.kind.as_str()) {
|
||||
linked_size_form(ui, d, unit);
|
||||
} else {
|
||||
@@ -262,6 +266,110 @@ fn arc_form(ui: &mut egui::Ui, d: &mut Dialog, unit: Unit) {
|
||||
form::check(ui, d, "fillArc", tl!("Fill Arc"));
|
||||
}
|
||||
|
||||
/// The size of the arc picture in Arc Segment Tool Options, and its margin around the arc.
|
||||
const ARC_PREVIEW: egui::Vec2 = egui::vec2(160.0, 120.0);
|
||||
const ARC_PREVIEW_MARGIN: f32 = 12.0;
|
||||
|
||||
/// The arc the Arc tool draws with the options OK sets from `d` ([`arc_options`], kept as the tool
|
||||
/// keeps them: a slope from -100 to 100, a Base Along of Y or else X), as `shape.arc` draws it
|
||||
/// with its reference point at the origin and General › Constrain Angle `constrain` (degrees)
|
||||
/// turning it about that point. `None` when a length or the slope is not finite.
|
||||
fn arc_preview_path(d: &Dialog, constrain: f64) -> Option<vectorcraft_geom::path::PathData> {
|
||||
let o = arc_options(d);
|
||||
let num = |key: &str| o[key].as_f64().filter(|v| v.is_finite());
|
||||
let (lx, ly, slope) = (num("lengthX")?, num("lengthY")?, num("slope")?.clamp(-100.0, 100.0));
|
||||
let base_x = !o["baseAlong"].as_str().is_some_and(|b| b.eq_ignore_ascii_case("y"));
|
||||
let closed = o["closed"].as_bool().unwrap_or(false);
|
||||
let path = vectorcraft_geom::shapes::arc_segment(Point::ZERO, arc_reference(d), lx, ly, base_x, slope, closed);
|
||||
Some(match vectorcraft_geom::constrain_rotation(constrain) {
|
||||
Some(rotation) => path.transformed(vectorcraft_geom::rotate_deg(rotation)),
|
||||
None => path,
|
||||
})
|
||||
}
|
||||
|
||||
/// The arc in the dialog's picture, in screen points: its outline's points, whether it is closed,
|
||||
/// and where its reference point sits.
|
||||
struct ArcPreview {
|
||||
outline: Vec<egui::Pos2>,
|
||||
closed: bool,
|
||||
reference: egui::Pos2,
|
||||
}
|
||||
|
||||
/// The arc of [`arc_preview_path`] fitted into `rect` with [`ARC_PREVIEW_MARGIN`] around it,
|
||||
/// keeping its proportions. `None` when the fields describe no arc or the fitted points are not
|
||||
/// finite.
|
||||
fn arc_preview_shape(d: &Dialog, constrain: f64, rect: egui::Rect) -> Option<ArcPreview> {
|
||||
let path = arc_preview_path(d, constrain)?;
|
||||
let b = path.bounds()?.union_pt(Point::ZERO);
|
||||
let (room_w, room_h) = (f64::from(rect.width() - 2.0 * ARC_PREVIEW_MARGIN), f64::from(rect.height() - 2.0 * ARC_PREVIEW_MARGIN));
|
||||
// A side far thinner than the other (a length of 0) does not limit the scale.
|
||||
let extent = b.width().max(b.height());
|
||||
let fit = |side: f64, room: f64| if side > extent * 1e-6 { room / side } else { f64::INFINITY };
|
||||
let scale = fit(b.width(), room_w).min(fit(b.height(), room_h));
|
||||
if !(scale.is_finite() && scale > 0.0 && room_w > 0.0 && room_h > 0.0) {
|
||||
return None;
|
||||
}
|
||||
let c = rect.center();
|
||||
let to_screen = vectorcraft_geom::Affine::translate((f64::from(c.x), f64::from(c.y)))
|
||||
* vectorcraft_geom::Affine::scale(scale)
|
||||
* vectorcraft_geom::Affine::translate(-b.center().to_vec2());
|
||||
let pos = |p: Point| egui::pos2(p.x as f32, p.y as f32);
|
||||
let mut outline = Vec::new();
|
||||
vectorcraft_geom::flatten(path.transformed(to_screen).to_bezpath(), 0.25, |el| match el {
|
||||
vectorcraft_geom::PathEl::MoveTo(p) | vectorcraft_geom::PathEl::LineTo(p) => outline.push(pos(p)),
|
||||
_ => {}
|
||||
});
|
||||
// A closed arc's last segment ends where it starts; the outline keeps its corner as the last point.
|
||||
let closed = path.is_closed();
|
||||
if closed && outline.len() > 2 && outline.first() == outline.last() {
|
||||
outline.pop();
|
||||
}
|
||||
let reference = pos(to_screen * Point::ZERO);
|
||||
let finite = |p: &egui::Pos2| p.x.is_finite() && p.y.is_finite();
|
||||
(outline.len() >= 2 && outline.iter().all(finite) && finite(&reference)).then_some(ArcPreview { outline, closed, reference })
|
||||
}
|
||||
|
||||
/// A paint as one color for the arc picture: a solid color as it is, a gradient or pattern gray.
|
||||
fn arc_preview_color(paint: &vectorcraft_color::Paint) -> Option<egui::Color32> {
|
||||
match paint {
|
||||
vectorcraft_color::Paint::None => None,
|
||||
vectorcraft_color::Paint::Solid { color, tint, .. } => Some(crate::panels::c32(&color.tinted(*tint))),
|
||||
_ => Some(egui::Color32::from_gray(160)),
|
||||
}
|
||||
}
|
||||
|
||||
/// The arc Arc Segment Tool Options sets, drawn below its fields on white and redrawn on every
|
||||
/// frame from the fields as they are then: in the current stroke (black when there is none, as
|
||||
/// `shape.arc` draws it), filled with the current fill when Fill Arc is on, turned by General ›
|
||||
/// Constrain Angle, with a mark on its reference point.
|
||||
fn arc_preview(ui: &mut egui::Ui, d: &Dialog, session: &vectorcraft_engine::Session) {
|
||||
let t = crate::theme::Tokens::get(ui.ctx());
|
||||
let (rect, resp) = ui.allocate_exact_size(ARC_PREVIEW, egui::Sense::hover());
|
||||
resp.widget_info(|| egui::WidgetInfo::labeled(egui::Role::Image, true, tl!("Preview")));
|
||||
let painter = ui.painter_at(rect);
|
||||
painter.rect_filled(rect, 0.0, egui::Color32::WHITE);
|
||||
painter.rect_stroke(rect, 0.0, egui::Stroke::new(1.0, t.input_border), egui::StrokeKind::Inside);
|
||||
let Some(arc) = arc_preview_shape(d, session.prefs.constrain_angle, rect) else { return };
|
||||
let fill = if d.bool("fillArc") { arc_preview_color(&session.paint.fill) } else { None };
|
||||
if let Some(fill) = fill {
|
||||
// A closed arc is seen whole from its corner (its last point), and an open arc closed by
|
||||
// its chord from its end: each fills as a fan of triangles from there.
|
||||
let mut mesh = egui::Mesh::default();
|
||||
for p in &arc.outline {
|
||||
mesh.colored_vertex(*p, fill);
|
||||
}
|
||||
let last = arc.outline.len() as u32 - 1;
|
||||
for i in 0..last.saturating_sub(1) {
|
||||
mesh.add_triangle(last, i, i + 1);
|
||||
}
|
||||
painter.add(egui::Shape::mesh(mesh));
|
||||
}
|
||||
let stroke = arc_preview_color(&session.paint.stroke).unwrap_or(egui::Color32::BLACK);
|
||||
let stroke = egui::Stroke::new(1.5, stroke);
|
||||
painter.add(if arc.closed { egui::Shape::closed_line(arc.outline, stroke) } else { egui::Shape::line(arc.outline, stroke) });
|
||||
painter.circle(arc.reference, 3.0, egui::Color32::WHITE, egui::Stroke::new(1.5, t.accent));
|
||||
}
|
||||
|
||||
/// The click dialogs whose Width and Height share a Constrain Width and Height Proportions link
|
||||
/// (<https://krankykids.com/cheatsheets/illustrator_cs6/shape_tool_rectangle.html>,
|
||||
/// <https://www.krankykids.com/cheatsheets/illustrator_cs6/shape_tool_ellipse.html>): the same
|
||||
@@ -543,6 +651,167 @@ mod tests {
|
||||
assert_eq!(box_origin(&fields(true)), (80.0, 40.0));
|
||||
}
|
||||
|
||||
fn arc_dialog(fields: Value) -> Dialog {
|
||||
let mut d =
|
||||
Dialog::new("arc", json!({"lengthX": 100.0, "lengthY": 60.0, "reference": 0, "baseAlong": "x", "slope": 50.0, "arcType": "open"}));
|
||||
for (k, v) in fields.as_object().into_iter().flatten() {
|
||||
d.fields.insert(k.clone(), v.clone());
|
||||
}
|
||||
d.fields.insert(TOOL_OPTIONS.into(), json!(true));
|
||||
d
|
||||
}
|
||||
|
||||
fn anchor_points(p: &vectorcraft_geom::path::PathData) -> Vec<(f64, f64, f64, f64, f64, f64)> {
|
||||
p.anchors().map(|(_, _, a)| (a.p.x, a.p.y, a.h_in.x, a.h_in.y, a.h_out.x, a.h_out.y)).collect()
|
||||
}
|
||||
|
||||
/// The preview is the arc `shape.arc` draws from the same values at a click on the origin, for
|
||||
/// each Type, Base Along, reference point and slope, and turned by General › Constrain Angle.
|
||||
#[test]
|
||||
fn the_arc_preview_is_the_arc_shape_arc_draws() {
|
||||
let mut app = VectorcraftApp::new(Session::new(), Default::default());
|
||||
app.run("file.new", json!({"width": 300, "height": 300})).unwrap();
|
||||
for constrain in [0.0, 30.0] {
|
||||
app.run("prefs.set", json!({"key": "constrainAngle", "value": constrain})).unwrap();
|
||||
for (closed, base, reference, slope) in
|
||||
[(false, "x", 0, 50.0), (true, "x", 4, 100.0), (false, "y", 8, -100.0), (true, "y", 2, 0.0), (false, "x", 6, -40.0)]
|
||||
{
|
||||
let d =
|
||||
arc_dialog(json!({"arcType": if closed { "closed" } else { "open" }, "baseAlong": base, "reference": reference, "slope": slope}));
|
||||
let preview = arc_preview_path(&d, app.session.prefs.constrain_angle).expect("an arc");
|
||||
let params = json!({"x": 0.0, "y": 0.0, "lengthX": 100.0, "lengthY": 60.0, "reference": reference, "baseAlong": base, "slope": slope, "closed": closed});
|
||||
let params = vectorcraft_engine::constrain_click(&app.session, "shape.arc", params, Point::ZERO);
|
||||
app.run("shape.arc", params).unwrap();
|
||||
let doc = &app.session.doc().unwrap().doc;
|
||||
let drawn = doc.layers[0].children().unwrap().last().unwrap().path_data().unwrap().clone();
|
||||
let (a, b) = (anchor_points(&preview), anchor_points(&drawn));
|
||||
assert_eq!(a.len(), b.len(), "{constrain} {closed} {base} {reference} {slope}");
|
||||
for (p, q) in a.iter().zip(&b) {
|
||||
let close = [(p.0, q.0), (p.1, q.1), (p.2, q.2), (p.3, q.3), (p.4, q.4), (p.5, q.5)].iter().all(|(u, v)| (u - v).abs() < 1e-6);
|
||||
assert!(close, "{constrain} {closed} {base} {reference} {slope}: {a:?} {b:?}");
|
||||
}
|
||||
assert_eq!(preview.is_closed(), closed);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// The picture follows Slope, Type, Base Along and the reference point, keeps the arc inside
|
||||
/// the frame, and stays finite for a length of 0 or a huge one.
|
||||
#[test]
|
||||
fn the_arc_preview_follows_the_fields_and_fits_its_frame() {
|
||||
let rect = egui::Rect::from_min_size(egui::pos2(10.0, 20.0), ARC_PREVIEW);
|
||||
let shape = |fields: Value| arc_preview_shape(&arc_dialog(fields), 0.0, rect).expect("an arc");
|
||||
let inside = |s: &ArcPreview| {
|
||||
let room = rect.shrink(ARC_PREVIEW_MARGIN - 0.01);
|
||||
s.outline.iter().chain([&s.reference]).all(|p| room.contains(*p))
|
||||
};
|
||||
let base = shape(json!({}));
|
||||
assert!(inside(&base), "{:?}", base.outline);
|
||||
// Slope 0 is a straight line: two points.
|
||||
assert_eq!(shape(json!({"slope": 0.0})).outline.len(), 2);
|
||||
for changed in [json!({"slope": -50.0}), json!({"arcType": "closed"}), json!({"baseAlong": "y"}), json!({"lengthY": "30 pt"})] {
|
||||
let s = shape(changed.clone());
|
||||
assert!(inside(&s), "{changed}");
|
||||
assert_ne!(s.outline, base.outline, "{changed}");
|
||||
}
|
||||
assert!(shape(json!({"arcType": "closed"})).closed && !base.closed);
|
||||
// The reference mark sits on each of the nine points of the arc's box.
|
||||
let marks: Vec<egui::Pos2> = (0..9).map(|i| shape(json!({"reference": i})).reference).collect();
|
||||
assert!((marks[4] - rect.center()).length() < 1e-3, "{marks:?}");
|
||||
for row in 0..3 {
|
||||
assert!(marks[row * 3].x < marks[row * 3 + 1].x && marks[row * 3 + 1].x < marks[row * 3 + 2].x, "{marks:?}");
|
||||
assert!(marks[row].y < marks[row + 3].y && marks[row + 3].y < marks[row + 6].y, "{marks:?}");
|
||||
}
|
||||
for lengths in [json!({"lengthX": 0.0}), json!({"lengthY": 0.0}), json!({"lengthX": 1e300, "lengthY": 1e-300}), json!({"lengthX": -80.0})] {
|
||||
assert!(inside(&shape(lengths.clone())), "{lengths}");
|
||||
}
|
||||
}
|
||||
|
||||
/// For values the Arc tool does not keep as typed, the picture shows the arc of the options OK
|
||||
/// sets: the same picture as a dialog holding those options.
|
||||
#[test]
|
||||
fn the_arc_preview_shows_the_options_ok_sets() {
|
||||
let mut app = VectorcraftApp::new(Session::new(), Default::default());
|
||||
app.run("file.new", json!({"width": 300, "height": 300})).unwrap();
|
||||
for typed in [
|
||||
json!({"slope": 140.0}),
|
||||
json!({"slope": -250.0}),
|
||||
json!({"slope": "steep"}),
|
||||
json!({"lengthX": "wide"}),
|
||||
json!({"lengthY": null}),
|
||||
json!({"baseAlong": "z"}),
|
||||
json!({"reference": 12}),
|
||||
] {
|
||||
let d = arc_dialog(typed.clone());
|
||||
let shown = arc_preview_path(&d, 0.0).expect("an arc");
|
||||
app.ui.dialog = Some(d);
|
||||
super::super::confirm(&mut app).unwrap();
|
||||
let kept = app.session.tool_options_of("arc");
|
||||
let arc_type = if kept["closed"].as_bool() == Some(true) { "closed" } else { "open" };
|
||||
let keys = ["lengthX", "lengthY", "slope", "baseAlong", "reference"];
|
||||
let mut fields: serde_json::Map<String, Value> = keys.iter().map(|k| (k.to_string(), kept[*k].clone())).collect();
|
||||
fields.insert("arcType".into(), json!(arc_type));
|
||||
let want = arc_preview_path(&arc_dialog(Value::Object(fields)), 0.0).expect("an arc");
|
||||
assert_eq!(anchor_points(&shown), anchor_points(&want), "{typed}: kept {kept}");
|
||||
}
|
||||
}
|
||||
|
||||
/// Double-clicking the Arc tool shows the picture in Arc Segment Tool Options; a click on the
|
||||
/// canvas does not. Changing the options and pressing OK draws nothing and adds no undo step.
|
||||
#[test]
|
||||
fn arc_tool_options_show_a_preview_and_ok_draws_nothing() {
|
||||
use egui::accesskit::Role;
|
||||
use egui_kittest::kittest::Queryable;
|
||||
let mut app = VectorcraftApp::new(Session::new(), Default::default());
|
||||
app.run("file.new", json!({"width": 300, "height": 300})).unwrap();
|
||||
app.run("tool.select", json!({"tool": "arc"})).unwrap();
|
||||
let undo = app.session.doc().unwrap().history.undo.len();
|
||||
open_options(&mut app, "arc").unwrap();
|
||||
let mut fonts = false;
|
||||
let mut h = egui_kittest::Harness::builder().with_size(egui::vec2(1100.0, 900.0)).build_ui_state(
|
||||
move |ui, app: &mut VectorcraftApp| {
|
||||
if !std::mem::replace(&mut fonts, true) {
|
||||
crate::theme::install_fonts(ui.ctx());
|
||||
return;
|
||||
}
|
||||
super::super::show(app, ui.ctx());
|
||||
},
|
||||
app,
|
||||
);
|
||||
h.run_steps(5);
|
||||
h.check_accessibility();
|
||||
let picture = h.get_by_role_and_label(Role::Image, "Preview").rect();
|
||||
let fill_arc = h.get_by_label("Fill Arc").rect();
|
||||
assert!(picture.top() > fill_arc.center().y, "the picture is below Fill Arc: {picture:?} {fill_arc:?}");
|
||||
h.state_mut().ui.dialog.as_mut().unwrap().fields.insert("slope".into(), json!(-30.0));
|
||||
h.run_steps(2);
|
||||
super::super::confirm(h.state_mut()).unwrap();
|
||||
h.run_steps(2);
|
||||
let app = h.state();
|
||||
assert!(app.ui.dialog.is_none());
|
||||
assert!(app.session.doc().unwrap().doc.layers[0].children().unwrap().is_empty());
|
||||
assert_eq!(app.session.doc().unwrap().history.undo.len(), undo);
|
||||
assert_eq!(app.session.tool_options_of("arc")["slope"], json!(-30.0));
|
||||
drop(h);
|
||||
|
||||
let mut app = VectorcraftApp::new(Session::new(), Default::default());
|
||||
app.run("file.new", json!({"width": 300, "height": 300})).unwrap();
|
||||
super::super::open_tool_dialog(&mut app, "arc", json!({"x": 40.0, "y": 60.0}));
|
||||
let mut fonts = false;
|
||||
let mut h = egui_kittest::Harness::builder().with_size(egui::vec2(1100.0, 900.0)).build_ui_state(
|
||||
move |ui, app: &mut VectorcraftApp| {
|
||||
if !std::mem::replace(&mut fonts, true) {
|
||||
crate::theme::install_fonts(ui.ctx());
|
||||
return;
|
||||
}
|
||||
super::super::show(app, ui.ctx());
|
||||
},
|
||||
app,
|
||||
);
|
||||
h.run_steps(5);
|
||||
assert!(h.query_by_role_and_label(Role::Image, "Preview").is_none());
|
||||
}
|
||||
|
||||
/// The Rounded Rectangle click dialog opens on General › Corner Radius, and OK makes the radius
|
||||
/// typed (in any unit) that preference: the next dialog and the tool's next drag use it.
|
||||
#[test]
|
||||
|
||||
@@ -1297,6 +1297,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur
|
||||
- **Tool double-clicks:** double-clicking a tool's button opens its options: Hand fits the artboard in the window, Zoom shows 100 %, Rotate, Scale, Reflect and Shear open their Object › Transform dialogs, the Selection, Direct Selection and Group Selection tools the Move dialog (Enter opens these seven tools' dialogs too; Move opens on the offset of the last drag or Move and with the checkboxes it was last confirmed with, so Enter, Enter repeats a move or a copy at the same spacing, as [an Adobe Community thread](https://community.adobe.com/questions-652/move-tool-771221) describes), Gradient, Eyedropper, Blend and the Liquify tools their panels or options, the Pencil, Paintbrush, Smooth, Blob Brush and Eraser tools their Tool Options (Fidelity, fill, Keep selected, the tolerances, the brush size), and (#812) the Flare tool its Flare Tool Options, the Artboard tool the active artboard's Artboard Options, the graph tools Graph Type for the selected graph, the Symbolism tools the Symbolism Tools Options (Diameter, Intensity, Symbol Set Density) and the Magic Wand tool its panel.
|
||||
Double-clicking the Line Segment, Arc, Rectangular Grid or Polar Grid tool opens its Tool Options, as step 3 of the [Rectangular Grid tool](https://helpx.adobe.com/illustrator/using/tool-techniques/rectangular-grid-tool.html) and [Arc tool](https://helpx.adobe.com/illustrator/using/tool-techniques/arc-tool.html) pages and the [Tools](https://helpx.adobe.com/illustrator/using/tools.html) page describe (#2691): the dialog a click with the tool opens, without a place to draw. Line Segment Tool Options has Length, Angle and Fill Line (a new line takes the current fill, `shape.line` `fill`); Arc Segment Tool Options its lengths, Reference Point, Type, Base Along, Slope and Fill Arc; the grids' Tool Options the Reference Point, Default Size, dividers, skews and switches. OK draws nothing: the next drag draws with the options and a click's dialog opens at them, the Length, Angle and Default Size included; Cancel changes nothing. Tests: `toolbar::tests::double_clicking_the_line_arc_and_grid_tools_opens_their_tool_options`, `line_segment_options_and_fill_line`, `grid_default_size_is_an_option_the_drag_leaves_out`, `fill_line_gives_a_new_line_the_current_fill`.
|
||||
A closed arc from Arc Segment Tool Options or `shape.arc` with `lengthX` and `lengthY` closes through the corner of its box across from the one a convex arc bulges toward, with either Base Along, so a closed arc at Slope 100 is a quarter-ellipse sector and the Y Axis arc is the X Axis arc mirrored top to bottom. The [Draw arcs](https://web.archive.org/web/20251025042220/https://helpx.adobe.com/illustrator/using/drawing-simple-lines-shapes.html) section's Type option chooses whether the arc is open or closed; the corner it closes through is VectorCraft's own rule. Tests: `shapes::tests::a_y_base_arc_is_the_x_base_arc_mirrored_top_to_bottom`, `a_closed_convex_arc_is_a_quarter_ellipse_sector_with_either_base`, `tests::draw2::shape_arc_closed_along_y_closes_through_the_top_left_corner`.
|
||||
Arc Segment Tool Options, opened by a double-click on the Arc tool, shows a picture of the arc below Fill Arc that is redrawn as its fields change, `ui.dialog.set` included. The help page (<https://web.archive.org/web/20210601162814/https://helpx.adobe.com/pdf/illustrator_reference.pdf#page=135>) says this dialog previews the arc while its options are set. The picture is VectorCraft's own: 160 × 120 points on white, the arc that `shape.arc` would draw with the same values fitted inside with its proportions kept, in the current stroke (black when there is none), filled with the current fill when Fill Arc is on, turned by General › Constrain Angle, with a mark on the reference point; a gradient or pattern stroke or fill shows as gray. A value the Arc tool does not keep as typed, such as a slope outside −100…100, shows as the value OK sets. The dialog a click with the tool opens has no picture. OK still only sets the options, and neither OK nor the picture draws on the canvas or adds an undo step. Tests: `dialogs::shapes::tests::the_arc_preview_is_the_arc_shape_arc_draws`, `the_arc_preview_follows_the_fields_and_fits_its_frame`, `the_arc_preview_shows_the_options_ok_sets`, `arc_tool_options_show_a_preview_and_ok_draws_nothing`. Scores and hours unchanged.
|
||||
Live curve fitting in the Pencil Tool Options is on by default; while it is off, the path shown while a stroke is drawn joins the stroke's points with straight segments, and the release fits the curve, as [Pencil Tool Options](https://web.archive.org/web/20261002104400/https://helpx.adobe.com/illustrator/desktop/draw-shapes-and-paths/draw-shapes/pencil-tool-options.html) describes (`path.freehand` `fit`).
|
||||
In the Pencil and Paintbrush Tool Options, Edit selected paths within 0 px turns editing off, so a stroke that starts exactly on an end of a selected open path draws a new path; Close paths when ends are within 0 px turns closing off, so a stroke that ends exactly where it started stays open.
|
||||
The Pencil's and the Paintbrush's Fidelity is in screen pixels, the same at any zoom: their Tool Options give it in px, from 0.01 px on the logarithmic slider to 20 px and up to 100 px in the field, and the tool sends `path.freehand` the value in points at the current zoom (#5729). The Smooth tool's and the Blob Brush's Fidelity stays in points.
|
||||
|
||||
Reference in New Issue
Block a user