mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-12-01 02:35:37 +01:00
Dimension: Alt whole-path measure takes the outside of the stroke with Use Preview Bounds off too
With Alt held, the Dimension tool's box over a path and the dimension of the whole path it places now reach the outside of the path's strokes whether Use Preview Bounds is on or off. Before, they did so only with Use Preview Bounds on, and with it off they went through the outermost points of the path. Every dimension of a whole path the tool places now records `"preview": true` in its extent source. Dimensions saved without it keep measuring between the outermost points, and `dimension.create` still defaults `preview` to false.
This commit is contained in:
1 parent
582fa21727
commit
7310a8eb4f
4 files changed
+58
-54
No files matched your search
@@ -394,9 +394,11 @@ pub enum DimensionSource {
|
||||
/// it is vertical. Versions without this source do not open the file.
|
||||
Extent {
|
||||
node: NodeId,
|
||||
/// Placed with Use Preview Bounds on: the points are moved out to the outside of the
|
||||
/// strokes the path paints ([`preview_extents`]), the width or height that W and H show.
|
||||
/// Versions without it measure between the outermost points themselves.
|
||||
/// The points are moved out to the outside of the strokes the path paints
|
||||
/// ([`preview_extents`]), the width or height that W and H show with Use Preview Bounds on.
|
||||
/// The Dimension tool sets it on every dimension of a whole path it places. Without it,
|
||||
/// as in files saved before the tool set it and in versions without it, the dimension
|
||||
/// measures between the outermost points themselves.
|
||||
#[serde(default, skip_serializing_if = "std::ops::Not::not")]
|
||||
preview: bool,
|
||||
},
|
||||
@@ -431,9 +433,9 @@ impl DimensionSource {
|
||||
}
|
||||
/// Whether a path it measures differs between `before` and `after`, or is in only one of them.
|
||||
/// A node without a path, or missing from both, counts as changed. For a dimension of a whole
|
||||
/// path placed with Use Preview Bounds on, so does a change to the strokes the path paints
|
||||
/// ([`stroked_by`]): their appearance, the node they come from, or which arrowheads they draw
|
||||
/// on it, and the path being made into a guide or released from one.
|
||||
/// path measured to the outside of its strokes (`preview`), so does a change to the strokes the
|
||||
/// path paints ([`stroked_by`]): their appearance, the node they come from, or which arrowheads
|
||||
/// they draw on it, and the path being made into a guide or released from one.
|
||||
pub fn art_changed(&self, before: &Document, after: &Document) -> bool {
|
||||
let strokes = matches!(self, Self::Extent { preview: true, .. });
|
||||
self.nodes().into_iter().any(|id| match (before.node(id), after.node(id)) {
|
||||
|
||||
@@ -42,35 +42,37 @@ impl Kind {
|
||||
}
|
||||
|
||||
/// What the pointer is over. `Extent` is a path hovered with Alt held: its overall width or height,
|
||||
/// with `preview` (Use Preview Bounds on) to the outside of its strokes.
|
||||
/// to the outside of its strokes.
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
enum Target {
|
||||
Segment(SegmentRef),
|
||||
Corner { first: SegmentRef, second: SegmentRef, at: Point },
|
||||
Radial { source: DimensionSource, center: Point, radius: f64 },
|
||||
Extent { node: NodeId, preview: bool },
|
||||
Extent { node: NodeId },
|
||||
}
|
||||
|
||||
/// A path, whether its points are moved out to its strokes, and the document its outermost points
|
||||
/// ([`whole_ends`]) were read from ([`whole_box_source`]).
|
||||
type WholeBoxKey = (NodeId, bool, (u64, u64, usize));
|
||||
/// A path and the document its outermost points ([`whole_ends`]) were read from
|
||||
/// ([`whole_box_source`]).
|
||||
type WholeBoxKey = (NodeId, (u64, u64, usize));
|
||||
|
||||
/// The key of a path's outermost points ([`WholeBoxKey`]), with the points.
|
||||
type WholeBox = (WholeBoxKey, Option<[(Point, Point); 2]>);
|
||||
|
||||
/// The document a path's box is read from, with what identifies it: while an interaction is in
|
||||
/// progress, the document as it began; otherwise the document `cx` shows, at its revision.
|
||||
fn whole_box_source<'a>(cx: &ToolContext<'a>, node: NodeId, preview: bool) -> (&'a vectorcraft_doc::Document, WholeBoxKey) {
|
||||
fn whole_box_source<'a>(cx: &ToolContext<'a>, node: NodeId) -> (&'a vectorcraft_doc::Document, WholeBoxKey) {
|
||||
match cx.interaction_doc {
|
||||
Some(began) => (began, (node, preview, (cx.revision.0, 0, std::ptr::from_ref(began).addr()))),
|
||||
None => (cx.doc, (node, preview, (cx.revision.0, cx.revision.1, 0))),
|
||||
Some(began) => (began, (node, (cx.revision.0, 0, std::ptr::from_ref(began).addr()))),
|
||||
None => (cx.doc, (node, (cx.revision.0, cx.revision.1, 0))),
|
||||
}
|
||||
}
|
||||
|
||||
/// The outermost points a dimension of the whole path `node` measures: [`dimension::extents`], or
|
||||
/// with `preview` [`dimension::preview_extents`], moved out to the outside of the path's strokes.
|
||||
fn whole_ends(doc: &vectorcraft_doc::Document, node: NodeId, preview: bool) -> Option<[(Point, Point); 2]> {
|
||||
if preview { dimension::preview_extents(doc, node) } else { dimension::extents(doc, node) }
|
||||
/// The outermost points a dimension the tool places on the whole path `node` measures
|
||||
/// ([`dimension::preview_extents`]): moved out to the outside of the path's strokes, whether Use
|
||||
/// Preview Bounds is on or off. The dimension records `"preview": true`, so it measures to there
|
||||
/// after later edits too.
|
||||
fn whole_ends(doc: &vectorcraft_doc::Document, node: NodeId) -> Option<[(Point, Point); 2]> {
|
||||
dimension::preview_extents(doc, node)
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
@@ -1045,23 +1047,23 @@ impl DimensionTool {
|
||||
/// document changes. While an interaction is in progress they are read from the document as
|
||||
/// the interaction began, which each preview starts again from (as the levels in
|
||||
/// [`Self::preview`] are), so the previews themselves do not make the tool read the path again.
|
||||
fn whole_box(&mut self, cx: &ToolContext, node: NodeId, preview: bool) -> Option<[(Point, Point); 2]> {
|
||||
let (from, key) = whole_box_source(cx, node, preview);
|
||||
fn whole_box(&mut self, cx: &ToolContext, node: NodeId) -> Option<[(Point, Point); 2]> {
|
||||
let (from, key) = whole_box_source(cx, node);
|
||||
if let Some((kept, ends)) = self.whole_box
|
||||
&& kept == key
|
||||
{
|
||||
return ends;
|
||||
}
|
||||
let ends = whole_ends(from, node, preview);
|
||||
let ends = whole_ends(from, node);
|
||||
self.whole_box = Some((key, ends));
|
||||
ends
|
||||
}
|
||||
/// What the pointer at `p` is over. A Linear path hovered with `alt` held, before any point
|
||||
/// is picked, is the whole path: with Use Preview Bounds on, to the outside of its strokes.
|
||||
/// is picked, is the whole path, to the outside of its strokes.
|
||||
fn target(&self, cx: &ToolContext, p: Point, alt: bool) -> Option<Target> {
|
||||
let edge = pick(cx, p)?;
|
||||
match self.kind {
|
||||
Kind::Linear if alt && self.points.is_empty() => Some(Target::Extent { node: edge.node, preview: cx.preview_bounds }),
|
||||
Kind::Linear if alt && self.points.is_empty() => Some(Target::Extent { node: edge.node }),
|
||||
Kind::Linear => Some(Target::Segment(edge)),
|
||||
Kind::Angular => {
|
||||
let (anchor, at) = anchor_near(cx, &edge, p)?;
|
||||
@@ -1113,8 +1115,8 @@ impl DimensionTool {
|
||||
let mode = if p.distance(*center) >= *radius { DimensionMode::Radius } else { DimensionMode::Diameter };
|
||||
self.recipe(mode, *center, p, Point::ZERO, Some(source.clone()))
|
||||
}
|
||||
Target::Extent { node, preview } => {
|
||||
let source = DimensionSource::Extent { node: *node, preview: *preview };
|
||||
Target::Extent { node } => {
|
||||
let source = DimensionSource::Extent { node: *node, preview: true };
|
||||
let mut d = self.recipe(DimensionMode::Linear, Point::ZERO, Point::new(1.0, 0.0), Point::ZERO, Some(source));
|
||||
d.orientation = Orientation::Horizontal;
|
||||
d
|
||||
@@ -1139,7 +1141,7 @@ impl DimensionTool {
|
||||
}
|
||||
self.level_guide = None;
|
||||
let whole = match self.pending.as_ref().and_then(|d| d.source.as_ref()) {
|
||||
Some(DimensionSource::Extent { node, preview }) => Some(self.whole_box(cx, *node, *preview)),
|
||||
Some(DimensionSource::Extent { node, .. }) => Some(self.whole_box(cx, *node)),
|
||||
_ => None,
|
||||
};
|
||||
let Some(d) = &mut self.pending else { return vec![] };
|
||||
@@ -1408,8 +1410,8 @@ impl Tool for DimensionTool {
|
||||
}
|
||||
self.hover = self.target(cx, ev.pos, ev.mods.alt);
|
||||
let whole = match self.hover {
|
||||
Some(Target::Extent { node, preview }) => {
|
||||
self.whole_box(cx, node, preview);
|
||||
Some(Target::Extent { node }) => {
|
||||
self.whole_box(cx, node);
|
||||
true
|
||||
}
|
||||
_ => false,
|
||||
@@ -1562,15 +1564,14 @@ impl Tool for DimensionTool {
|
||||
out.push(Overlay::Line { a: *center, b: *center + toward / toward.hypot() * *radius, color, dashed: true });
|
||||
}
|
||||
}
|
||||
Some(Target::Extent { node, preview }) => {
|
||||
// The box through the path's outermost points (with Use Preview Bounds on, out
|
||||
// to its strokes): a Smart Guide, or with Smart Guides off a line in the
|
||||
// tool's own color. Read again when the path changed since the pointer last
|
||||
// moved.
|
||||
let (from, at) = whole_box_source(cx, *node, *preview);
|
||||
Some(Target::Extent { node }) => {
|
||||
// The box through the path's outermost points, out to its strokes: a Smart
|
||||
// Guide, or with Smart Guides off a line in the tool's own color. Read again
|
||||
// when the path changed since the pointer last moved.
|
||||
let (from, at) = whole_box_source(cx, *node);
|
||||
let b = match self.whole_box {
|
||||
Some((key, ends)) if key == at => ends,
|
||||
_ => whole_ends(from, *node, *preview),
|
||||
_ => whole_ends(from, *node),
|
||||
}
|
||||
.map(extent_box);
|
||||
if let Some(b) = b {
|
||||
@@ -2890,7 +2891,7 @@ mod tests {
|
||||
};
|
||||
let mut t = DimensionTool::default();
|
||||
t.pointer(&c, &held(PointerKind::Move, 150.0, 100.0));
|
||||
assert_eq!(t.hover, Some(Target::Extent { node: id, preview: false }));
|
||||
assert_eq!(t.hover, Some(Target::Extent { node: id }));
|
||||
assert!(t.overlays(&c).iter().any(|o| matches!(o, Overlay::Line { color, .. } if *color == c.smart_guide_color)));
|
||||
// With Smart Guides off the box is not a Smart Guide, and at a high zoom the size stays by
|
||||
// the pointer.
|
||||
@@ -2907,7 +2908,7 @@ mod tests {
|
||||
t.pointer(&c, &held(PointerKind::Up, 150.0, 100.0));
|
||||
assert!(t.pending.is_some() && t.points.is_empty());
|
||||
let above = preview(t.pointer(&c, &PointerEvent::new(PointerKind::Move, 150.0, 60.0)));
|
||||
assert_eq!(above["source"], json!({"kind":"extent","node":id}));
|
||||
assert_eq!(above["source"], json!({"kind":"extent","node":id,"preview":true}));
|
||||
assert_eq!(above["orientation"], json!("horizontal"));
|
||||
// Past a corner, the side the pointer is farther out on decides.
|
||||
let corner = preview(t.pointer(&c, &PointerEvent::new(PointerKind::Move, 280.0, 70.0)));
|
||||
@@ -2954,29 +2955,28 @@ mod tests {
|
||||
assert!(o.iter().any(near), "{o:?}");
|
||||
}
|
||||
|
||||
/// With Use Preview Bounds on, the box Alt shows over a stroked path reaches the outside of its
|
||||
/// stroke, and the dimension of the whole path it places measures to there, as W and H do; it
|
||||
/// keeps doing so after the art changes (`"preview": true`). With the preference off, the box
|
||||
/// and the dimension go through the outermost points.
|
||||
/// With Use Preview Bounds on or off, the box Alt shows over a stroked path reaches the outside
|
||||
/// of its stroke, and the dimension of the whole path it places measures to there; it keeps
|
||||
/// doing so after the art changes (`"preview": true`).
|
||||
#[test]
|
||||
fn with_preview_bounds_an_alt_placed_dimension_measures_the_outside_of_the_stroke() {
|
||||
fn an_alt_placed_dimension_measures_the_outside_of_the_stroke_with_preview_bounds_on_or_off() {
|
||||
let (d, id) = doc_with_rect();
|
||||
let (s, p) = (Selection::default(), paint());
|
||||
let held = |kind, x: f64, y: f64| PointerEvent::new(kind, x, y).with_mods(Mods { alt: true, ..Mods::default() });
|
||||
let near = |a: f64, b: f64| (a - b).abs() < 1e-9;
|
||||
for (preview, (left, right)) in [(true, (99.5, 200.5)), (false, (100.0, 200.0))] {
|
||||
let (left, right) = (99.5, 200.5);
|
||||
for preview in [true, false] {
|
||||
let c = ToolContext { preview_bounds: preview, ..cx(&d, &s, &p) };
|
||||
let mut t = DimensionTool::default();
|
||||
t.pointer(&c, &held(PointerKind::Move, 150.0, 100.0));
|
||||
assert_eq!(t.hover, Some(Target::Extent { node: id, preview }));
|
||||
assert_eq!(t.hover, Some(Target::Extent { node: id }));
|
||||
let xs: Vec<f64> = t.overlays(&c).iter().filter_map(|o| if let Overlay::Line { a, .. } = o { Some(a.x) } else { None }).collect();
|
||||
assert!(xs.iter().any(|x| near(*x, left)) && xs.iter().any(|x| near(*x, right)), "preview {preview}: {xs:?}");
|
||||
t.pointer(&c, &held(PointerKind::Down, 150.0, 100.0));
|
||||
t.pointer(&c, &held(PointerKind::Up, 150.0, 100.0));
|
||||
let acts = t.pointer(&c, &PointerEvent::new(PointerKind::Move, 150.0, 60.0));
|
||||
let Some(Action::Preview(_, params)) = acts.last() else { panic!("{acts:?}") };
|
||||
let source = if preview { json!({"kind":"extent","node":id,"preview":true}) } else { json!({"kind":"extent","node":id}) };
|
||||
assert_eq!(params["source"], source);
|
||||
assert_eq!(params["source"], json!({"kind":"extent","node":id,"preview":true}), "preview {preview}");
|
||||
let (a, b) = (params["a"][0].as_f64().unwrap_or(f64::NAN), params["b"][0].as_f64().unwrap_or(f64::NAN));
|
||||
assert!(near(a, left) && near(b, right), "preview {preview}: {a} to {b}");
|
||||
}
|
||||
|
||||
+9
-7
@@ -105,12 +105,14 @@ The **Dimension Tool** is in the Modify section of the toolbar. Its strip offers
|
||||
that starts no segment is left out. They are read again whenever the path changes, so a turned
|
||||
path shows its new overall width or height rather than that of its bounding box before the
|
||||
turn. The line keeps its distance from the whole path when the path changes or the dimension
|
||||
changes orientation. With Use Preview Bounds on, the box and the dimension reach the outside of
|
||||
the path's strokes, the width or height that W and H show: each outermost point moves out to the
|
||||
edge of the box the strokes paint (a member of a compound path takes the compound path's
|
||||
strokes, with an arrowhead only where the compound path draws one on that member), and a dimension placed that way measures to there again when the path or its strokes
|
||||
change. Geometry effects are not included. Alt has this effect only before the first point is
|
||||
clicked.
|
||||
changes orientation. With Use Preview Bounds on or off, the box and the dimension reach the
|
||||
outside of the path's strokes, the width or height that W and H show with Use Preview Bounds
|
||||
on: each outermost point moves out to the edge of the box the strokes paint (a member of a
|
||||
compound path takes the compound path's strokes, with an arrowhead only where the compound path
|
||||
draws one on that member), and a dimension placed that way measures to there again when the
|
||||
path or its strokes change. Geometry effects are not included. A dimension of a whole path saved
|
||||
without `"preview":true` keeps measuring between the outermost points. Alt has this effect only
|
||||
before the first point is clicked.
|
||||
- **Angular:** hover a corner where two straight segments meet and drag outwards. Or click two
|
||||
straight lines that meet (or would, extended), then click to place.
|
||||
- **Radial:** hover a circle, or a segment that is a perfect arc, and drag: outwards gives its
|
||||
@@ -205,7 +207,7 @@ another document.
|
||||
`vertical`), offset and style; returns the group id and label. `{"kind":"extent","node":<id>}`
|
||||
measures a whole path, linear only: between its leftmost and rightmost points when horizontal
|
||||
or aligned, and its topmost and bottommost points when vertical. With `"preview":true` (what
|
||||
the tool records with Use Preview Bounds on; `false` when omitted, and any value other than
|
||||
the tool records for an Alt-placed dimension; `false` when omitted, and any value other than
|
||||
`true` or `false` is an error) those points move out to the outside of the path's strokes. A
|
||||
version without the extent source does not open a file that holds one, and a version without
|
||||
`preview` measures such a dimension between the points themselves. `offset` is the distance of
|
||||
|
||||
@@ -757,7 +757,7 @@ since 2026-10-01.
|
||||
**Drawing tools, Ellipse tool circle from its center sized to touch a path:** By VectorCraft's own rule, with Smart Guides and Snap to Tangent on, a circle drawn from its center (Alt and Shift) snaps its radius so that the circle touches a nearby path whenever the radius comes within the snapping tolerance of that size. The touch point is where the line from the center meets a straight segment or a curve square, inside a segment or at an anchor where the path runs smoothly, also where a curve's handle lies on that anchor. A circle can touch another circle from outside or touch it from inside, and a center inside a closed path gives a circle that touches the path from within. A corner or an open path's end is not offered, nor a curve around the same center. The touch point shows the "tangent" label and the line from the center as guides; the radius is measured along the Constrain Angle's axes, as the drawn box is, and Space moves the circle at the size it snapped to, which it keeps when Space is let go. The snap does not apply to an ellipse (no Shift). When an anchor, center or crossing is within the snapping tolerance of the pointer, or the dragged corner snapped onto one, the circle is not resized to touch a path. Snap to Grid and pixel snapping place the drawn point instead, also when turned on during the drag, and turning Snap to Tangent off during the drag stops the snap. A press with a small jitter is still a click rather than a drag. At most 256 segments near that radius are measured per pointer move, the ones nearest the pointer. `a_circle_from_its_center_snaps_its_radius_to_touch_a_line`, `a_circle_from_its_center_snaps_to_touch_another_circle_from_outside_and_inside`, `a_circle_from_its_center_snaps_to_touch_a_curve`, `a_circle_from_its_center_keeps_its_radius_without_the_snap_or_a_smooth_touch`, `a_circle_from_its_center_prefers_an_anchor_and_measures_the_segments_nearest_the_pointer`, `a_circle_snapped_to_touch_keeps_to_the_constrain_angle`, `a_circle_from_its_center_does_not_snap_to_touch_with_the_grid_or_pixels`, `a_jittered_alt_shift_press_beside_a_path_is_a_click`, `a_circle_from_its_center_prefers_an_anchor_or_a_crossing_at_the_pointer` and `a_circle_from_its_center_touches_a_path_at_an_anchor_with_retracted_handles` cover it.
|
||||
**Drawing tools, selected Dimension extension-line style (#7078):** Properties › Dimension exposes the selected editable dimension's existing extension-line color and weight. Both extension lines share that style, independently of the main dimension line and label. Apply to All keeps its full-style behavior for editable dimensions, leaving a protected dimension unchanged; Set as Default keeps the whole style for a new dimension created without explicit options, without changing existing dimensions. The dimension remains editable. Four cases in `crates/ui-egui/tests/dimension_extension_properties.rs` verify actual Properties input, both canvas extension lines, independent main-line/label styling, full-style Apply to All, locked and unselected controls, defaults/new dimensions, Undo/Redo, and native save/reopen with further editing. Existing document-color conversion is unchanged. The measured geometry and existing snapping behavior are unchanged; no whole-Dimension completion or score/hour change is claimed.
|
||||
**Drawing tools, Dimension tool horizontal and vertical linear dimensions:** A linear dimension between two clicked points or dragged out from a segment is aligned, horizontal or vertical, chosen by where the pointer moves while it is placed, and a click again by the second point gives aligned; `dimension.create` and `dimension.update` take `orientation`, and the dimension stays linked to the anchors it measures, keeps its orientation when it or the art turns, with a line that lay outside the points kept outside them; an unlinked horizontal or vertical dimension that is reflected has its line on the reflected side. `the_pointer_chooses_aligned_horizontal_or_vertical`, `two_points_measure_horizontally_vertically_or_aligned`, `clicking_again_by_the_second_point_places_an_aligned_dimension`, `a_segment_drag_measures_horizontally_vertically_or_aligned`, `points_on_a_vertical_line_measure_aligned`, `horizontal_and_vertical_dimensions_draw_lines_along_their_axis`, `turned_horizontal_dimensions_stay_horizontal`, `a_linked_horizontal_dimension_keeps_its_gap_from_turned_art`, `a_linked_horizontal_dimension_below_or_between_its_points_follows_turned_art`, `a_reflected_horizontal_dimension_keeps_its_line_on_the_reflected_side`, `a_dimension_without_an_orientation_reads_as_aligned`, `dimension_orientation_is_checked` and `a_turned_dimension_keeps_its_line_on_its_side` cover it.
|
||||
**Drawing tools, Dimension tool overall width and height of a path:** The [linear dimensions help](https://helpx.adobe.com/illustrator/desktop/measure-and-align/plot-and-measure/plot-linear-dimensions-of-objects.html) describes plotting an object's horizontal and vertical dimensions with Alt (Option on macOS) held over its path. By VectorCraft's own rule, hovering a path with Alt held shows a box through its outermost points (a Smart Guide when Smart Guides are on); a click then a placing click, or a drag out from the path, places a linear dimension of the whole path, and the pointer above or below the path gives its width and beside it its height. `dimension.create` takes the `extent` source, whose points are the outermost points of the path's curves, read again after every edit, so a turned path shows its new overall size, and the line keeps its distance from the whole path. With Use Preview Bounds on, the box and the dimension reach the outside of the path's strokes, which is the size W and H show when the path is not rotated and has no geometry effect (geometry effects such as Offset Path are not included), and the source records `"preview":true` so the dimension measures to there after later edits, a new stroke weight included. `an_alt_click_or_drag_on_a_path_places_its_overall_width_or_height`, `with_preview_bounds_an_alt_placed_dimension_measures_the_outside_of_the_stroke`, `a_dimension_of_a_whole_path_measures_its_overall_width_and_height`, `a_dimension_of_a_whole_path_with_preview_bounds_measures_the_outside_of_the_stroke`, `a_dimension_of_a_whole_path_stays_clear_of_the_path_it_draws` and `a_dimension_of_a_whole_path_survives_a_native_file` cover it.
|
||||
**Drawing tools, Dimension tool overall width and height of a path:** The [linear dimensions help](https://helpx.adobe.com/illustrator/desktop/measure-and-align/plot-and-measure/plot-linear-dimensions-of-objects.html) describes plotting an object's horizontal and vertical dimensions with Alt (Option on macOS) held over its path. By VectorCraft's own rule, hovering a path with Alt held shows a box through its outermost points (a Smart Guide when Smart Guides are on); a click then a placing click, or a drag out from the path, places a linear dimension of the whole path, and the pointer above or below the path gives its width and beside it its height. `dimension.create` takes the `extent` source, whose points are the outermost points of the path's curves, read again after every edit, so a turned path shows its new overall size, and the line keeps its distance from the whole path. With Use Preview Bounds on or off, the box and the dimension reach the outside of the path's strokes, which is the size W and H show with Use Preview Bounds on when the path is not rotated and has no geometry effect (geometry effects such as Offset Path are not included), and the source records `"preview":true` so the dimension measures to there after later edits, a new stroke weight included; a dimension saved without it keeps measuring between the outermost points. `an_alt_click_or_drag_on_a_path_places_its_overall_width_or_height`, `an_alt_placed_dimension_measures_the_outside_of_the_stroke_with_preview_bounds_on_or_off`, `a_dimension_of_a_whole_path_measures_its_overall_width_and_height`, `a_dimension_of_a_whole_path_with_preview_bounds_measures_the_outside_of_the_stroke`, `a_dimension_of_a_whole_path_stays_clear_of_the_path_it_draws` and `a_dimension_of_a_whole_path_survives_a_native_file` cover it.
|
||||
**Drawing tools, Dimension tool points that are not anchors follow the art:** A clicked point on a segment stays at its place along the segment, also when the segment curves, and a point off the art is linked to anchors (or, when the anchors lie on one line, anchors and handles) of the path, so both ends of the dimension follow when the art is moved, scaled, turned or reflected, also when the point was placed by a Smart Guide and when the dimension is saved and opened again; a linked linear dimension of reflected art (other than art on one line) has its line on the reflected side; deleting the art, changing its anchor count or whether it is closed, turning an angle's arm into a curve, or making a measured circle or arc no longer circular leaves the dimension where it was, no longer linked, instead of removing it. `a_dimension_to_a_point_on_a_segment_follows_the_art_at_both_ends`, `a_dimension_to_a_point_off_the_art_moves_with_the_art`, `a_dimension_whose_art_changes_its_anchors_stays_where_it_was`, `a_dimension_whose_art_is_opened_stays_where_it_was`, `angle_and_arc_dimensions_whose_art_no_longer_fits_stay_where_they_were`, `a_dimension_that_cannot_be_drawn_again_keeps_its_art`, `a_linked_dimension_of_reflected_art_has_its_line_on_the_reflected_side`, `a_dimension_to_a_point_off_a_line_follows_the_line`, `a_point_off_an_arch_is_reflected_with_the_arch`, `a_point_beside_an_almost_straight_curve_follows_it`, `a_point_off_a_loop_with_its_anchors_in_one_place_follows_it`, `a_point_beside_a_reflected_line_moves_as_a_half_turn_would`, `a_point_on_a_segment_stays_on_it_when_the_segment_curves`, `a_linked_dimension_of_a_reflected_curve_has_its_line_on_the_reflected_side`, `a_dimension_of_art_reflected_across_its_points_changes_sides`, `a_dimension_between_paths_reflected_each_in_its_own_way_keeps_its_offset`, `free_points_survive_a_native_file`, `dimension_free_points_are_checked`, `points_off_anchors_are_held_against_the_path` and `a_point_smart_guides_place_is_held_against_the_path` cover it.
|
||||
**Drawing tools, Dimension tool points on a Smart Guide stay on the guide:** By VectorCraft's own rule, a clicked point that lies on a Smart Guide already, such as one in line with an object's center, stays where the pointer is when no anchor is within 8 pixels and no segment is within the Smart Guides snapping tolerance, instead of moving onto a segment farther than that tolerance and within 8 pixels; with Snap to Grid or Snap to Pixel on, a point stays on the grid or the whole pixel those options give. `a_point_on_a_guide_stays_on_the_guide` covers it.
|
||||
**Drawing tools, Dimension tool second point without construction guides through a first point off the anchors:** By VectorCraft's own rule, with Smart Guides on, the second Linear point does not snap to the construction guides through a first point that is not on an anchor, so a click beside a segment straight below such a first point lands on the segment; after a first point picked on an anchor, the construction guides through it still apply. The second point still snaps to anchors, centers and alignment lines, and with Snap to Perpendicular or Snap to Tangent on, it lands where the line from the first point meets a segment square or grazes a curve. `a_point_on_a_guide_stays_on_the_guide`, `the_second_point_after_an_anchor_lands_on_construction_guides`, `the_second_point_lands_square_to_a_segment_or_grazing_a_curve` and `linear_picks_show_and_snap_to_smart_guides` cover it.
|
||||
|
||||
Reference in new issue
Block a user