mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-20 09:23:10 +01:00
Merge pull request #8673 from storytold/train/carry8292
#7078: edit Dimension extension-line styles in Properties (#8292)
This commit is contained in:
5 files changed
+538
-3
No files matched your search
@@ -338,6 +338,12 @@ pub fn properties_section(app: &mut VectorcraftApp, ui: &mut Ui) {
|
||||
changed |= color(ui, &mut f, "lineColor");
|
||||
});
|
||||
ui.horizontal(|ui| changed |= arrow_style(ui, &mut f, "props-arrowStyle"));
|
||||
widgets::section_header(ui, tl!("Extension Lines"));
|
||||
ui.horizontal(|ui| {
|
||||
changed |= number(ui, &mut f, "extensionWeight", "Line Weight:", (0.1, 100.0), "pt");
|
||||
changed |= color(ui, &mut f, "extensionColor");
|
||||
});
|
||||
widgets::section_header(ui, tl!("Dimension Text"));
|
||||
ui.horizontal(|ui| {
|
||||
changed |= number(ui, &mut f, "fontSize", "Font Size:", (1.0, 1000.0), "pt");
|
||||
changed |= color(ui, &mut f, "textColor");
|
||||
|
||||
@@ -0,0 +1,528 @@
|
||||
//! Selected Dimension extension-line controls through the real Properties panel.
|
||||
#![allow(clippy::unwrap_used, clippy::expect_used, clippy::panic)]
|
||||
|
||||
use egui::accesskit::{Node, NodeId as AccessId, Role};
|
||||
use egui::{Event, Modifiers, PointerButton, Pos2, RawInput, Rect, vec2};
|
||||
use serde_json::json;
|
||||
use vectorcraft_color::{Color, Paint};
|
||||
use vectorcraft_doc::{NodeId, NodeKind, dimension::Dimension};
|
||||
use vectorcraft_engine::Session;
|
||||
use vectorcraft_ui_egui::VectorcraftApp;
|
||||
|
||||
fn frame(app: &mut VectorcraftApp, ctx: &egui::Context, events: Vec<Event>) -> egui::FullOutput {
|
||||
let mut raw = RawInput { events, focused: true, screen_rect: Some(Rect::from_min_size(Pos2::ZERO, vec2(1800.0, 1500.0))), ..Default::default() };
|
||||
app.raw_input_hook(ctx, &mut raw);
|
||||
ctx.run_ui(raw, |ui| {
|
||||
app.tick(ui.ctx());
|
||||
app.ui(ui);
|
||||
})
|
||||
}
|
||||
|
||||
fn snapshot(app: &mut VectorcraftApp, ctx: &egui::Context) -> Vec<(AccessId, Node)> {
|
||||
let mut nodes = Vec::new();
|
||||
for _ in 0..4 {
|
||||
let mut output = frame(app, ctx, vec![]);
|
||||
nodes = output.platform_output.accesskit_update.map(|update| update.nodes).unwrap_or_default();
|
||||
output.textures_delta.clear();
|
||||
}
|
||||
nodes
|
||||
}
|
||||
|
||||
fn named(node: &Node, text: &str) -> bool {
|
||||
node.label() == Some(text) || node.value() == Some(text)
|
||||
}
|
||||
|
||||
fn number(node: &Node) -> Option<f64> {
|
||||
node.numeric_value().or_else(|| {
|
||||
// range_field displays the suffix without a space, for example "0.5pt".
|
||||
let text = node.value()?.trim();
|
||||
text.strip_suffix("pt").unwrap_or(text).trim().parse().ok()
|
||||
})
|
||||
}
|
||||
|
||||
fn click_named(app: &mut VectorcraftApp, ctx: &egui::Context, label: &str) {
|
||||
let nodes = snapshot(app, ctx);
|
||||
let bounds = nodes
|
||||
.iter()
|
||||
.find(|(_, node)| node.label() == Some(label))
|
||||
.and_then(|(_, node)| node.bounds())
|
||||
.unwrap_or_else(|| panic!("missing real UI button: {label}"));
|
||||
let at = egui::pos2(((bounds.x0 + bounds.x1) * 0.5) as f32, ((bounds.y0 + bounds.y1) * 0.5) as f32);
|
||||
frame(app, ctx, vec![Event::ModifiersChanged(Modifiers::NONE), Event::PointerMoved(at)]).textures_delta.clear();
|
||||
for pressed in [true, false] {
|
||||
frame(app, ctx, vec![Event::PointerButton { pos: at, button: PointerButton::Primary, pressed, modifiers: Modifiers::NONE }])
|
||||
.textures_delta
|
||||
.clear();
|
||||
}
|
||||
let _ = snapshot(app, ctx);
|
||||
}
|
||||
|
||||
/// Both real controls must sit in the Extension Lines row, rather than in another panel or dialog.
|
||||
fn extension_controls(nodes: &[(AccessId, Node)]) -> Option<(AccessId, AccessId)> {
|
||||
let heading = nodes.iter().find(|(_, node)| named(node, "Extension Lines"))?.1.bounds()?;
|
||||
let in_row = |node: &Node| {
|
||||
node.bounds().is_some_and(|b| {
|
||||
let y = (b.y0 + b.y1) * 0.5;
|
||||
y >= heading.y1 && y <= heading.y1 + 60.0 && b.x0 >= heading.x0 - 2.0
|
||||
})
|
||||
};
|
||||
let weight = nodes.iter().find_map(|(label_id, label)| {
|
||||
if !named(label, "Line Weight:") || !in_row(label) {
|
||||
return None;
|
||||
}
|
||||
nodes
|
||||
.iter()
|
||||
.find(|(_, input)| input.labelled_by().contains(label_id) && number(input).is_some_and(|v| (v - 0.5).abs() < 1e-9))
|
||||
.map(|(id, _)| *id)
|
||||
})?;
|
||||
let color = nodes.iter().find(|(_, node)| node.role() == Role::ColorWell && in_row(node) && node.value() == Some("#000000ff"))?.0;
|
||||
Some((weight, color))
|
||||
}
|
||||
|
||||
fn recipe(app: &VectorcraftApp, id: NodeId) -> Dimension {
|
||||
app.session.active().unwrap().doc.node(id).unwrap().extras().dimension.as_deref().unwrap().clone()
|
||||
}
|
||||
|
||||
fn generated_styles(app: &VectorcraftApp, id: NodeId, extensions: [u8; 3], weight: f64) {
|
||||
let state = app.session.active().unwrap();
|
||||
let children = state.doc.node(id).unwrap().children().unwrap();
|
||||
let paths: Vec<_> = children.iter().filter(|node| matches!(&node.kind, NodeKind::Path { .. })).collect();
|
||||
assert_eq!(paths.len(), 3, "two extension paths and the main dimension line");
|
||||
for extension in &paths[..2] {
|
||||
let stroke = extension.appearance.stroke().unwrap();
|
||||
assert_eq!(stroke.width, weight);
|
||||
assert_eq!(stroke.paint, Paint::solid(Color::rgb8(extensions[0], extensions[1], extensions[2])));
|
||||
}
|
||||
let main = paths[2].appearance.stroke().unwrap();
|
||||
assert_eq!(main.width, 2.1);
|
||||
assert_eq!(main.paint, Paint::solid(Color::rgb8(255, 0, 0)));
|
||||
let text = children.iter().find(|node| matches!(&node.kind, NodeKind::Text(_))).unwrap();
|
||||
assert_eq!(text.appearance.fill().unwrap().paint, Paint::solid(Color::rgb8(0, 0, 255)));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn selected_dimension_properties_exposes_extension_weight_and_color() {
|
||||
vectorcraft_ui_egui::i18n::set_current(vectorcraft_ui_egui::i18n::Lang::EN);
|
||||
let mut app = VectorcraftApp::new(Session::new(), Default::default());
|
||||
app.run("file.new", json!({"width": 400, "height": 300})).unwrap();
|
||||
app.run("paint.setFill", json!({"color": "#d0d0d0"})).unwrap();
|
||||
app.run("shape.ellipse", json!({"x": 100, "y": 129.435, "width": 41.13, "height": 41.13})).unwrap();
|
||||
let made = app
|
||||
.run(
|
||||
"dimension.create",
|
||||
json!({"a": [100,150], "b": [141.13,150], "orientation": "horizontal", "offset": -25,
|
||||
"options": {"units": "pt", "precision": 2, "lineWeight": 2.1, "lineColor": [255,0,0], "textColor": [0,0,255],
|
||||
"extensionWeight": 0.5, "extensionColor": [0,0,0]}}),
|
||||
)
|
||||
.unwrap();
|
||||
let id = NodeId(made["id"].as_u64().unwrap());
|
||||
assert!(made["label"].as_str().unwrap().contains("41.13"));
|
||||
let original = recipe(&app, id);
|
||||
assert!((original.length - 41.13).abs() < 1e-9);
|
||||
generated_styles(&app, id, [0, 0, 0], 0.5);
|
||||
let document = app.session.active().unwrap().doc.clone();
|
||||
let paint = app.session.paint.clone();
|
||||
|
||||
// Backend/artwork control only: it is restored before testing the missing selected UI route.
|
||||
let mut control = original.options.clone();
|
||||
control.extension_weight = 0.35;
|
||||
control.extension_color = [128, 128, 128];
|
||||
app.run("dimension.update", json!({"ids": [id.0], "options": control})).unwrap();
|
||||
generated_styles(&app, id, [128, 128, 128], 0.35);
|
||||
let changed = recipe(&app, id);
|
||||
assert_eq!((changed.a, changed.b, changed.offset, changed.length), (original.a, original.b, original.offset, original.length));
|
||||
assert_eq!(changed.label().unwrap(), original.label().unwrap());
|
||||
app.run("edit.undo", json!({})).unwrap();
|
||||
assert_eq!(app.session.active().unwrap().doc, document);
|
||||
assert_eq!(recipe(&app, id), original);
|
||||
assert_eq!(app.session.paint, paint);
|
||||
|
||||
app.ui.task_bar = false;
|
||||
app.ui.view.rulers = false;
|
||||
app.canvas.worker_started = true;
|
||||
let ctx = egui::Context::default();
|
||||
ctx.enable_accesskit();
|
||||
// Positive UI control: Tool Options already exposes extensions. Close it through its real
|
||||
// Cancel button so its heading and controls cannot satisfy the final Properties assertion.
|
||||
app.run("tool.options", json!({"tool": "dimension"})).unwrap();
|
||||
let tool_options = snapshot(&mut app, &ctx);
|
||||
assert!(tool_options.iter().any(|(_, node)| named(node, "Dimension Tool Options")));
|
||||
if extension_controls(&tool_options).is_none() {
|
||||
let header = tool_options.iter().find(|(_, node)| named(node, "Extension Lines")).and_then(|(_, node)| node.bounds());
|
||||
for (id, node) in &tool_options {
|
||||
let row = header.is_some_and(|h| {
|
||||
node.bounds().is_some_and(|b| {
|
||||
let y = (b.y0 + b.y1) * 0.5;
|
||||
y >= h.y1 && y <= h.y1 + 60.0 && b.x0 >= h.x0 - 2.0
|
||||
})
|
||||
});
|
||||
if row || !node.labelled_by().is_empty() {
|
||||
eprintln!(
|
||||
"CONTROL {id:?} role={:?} label={:?} value={:?} numeric={:?} labelled_by={:?} bounds={:?}",
|
||||
node.role(),
|
||||
node.label(),
|
||||
node.value(),
|
||||
node.numeric_value(),
|
||||
node.labelled_by(),
|
||||
node.bounds()
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
assert!(extension_controls(&tool_options).is_some(), "the existing Tool Options route has both extension controls");
|
||||
click_named(&mut app, &ctx, "Cancel");
|
||||
assert!(app.ui.dialog.is_none());
|
||||
app.select_tool("selection");
|
||||
app.run("select.set", json!({"ids": [id.0]})).unwrap();
|
||||
app.run("window.panel", json!({"panel": "properties"})).unwrap();
|
||||
let properties = snapshot(&mut app, &ctx);
|
||||
assert!(!properties.iter().any(|(_, node)| named(node, "Dimension Tool Options")));
|
||||
for label in ["Dimension", "Line Weight:", "Font Size:", "Apply to All", "Set as Default"] {
|
||||
assert!(properties.iter().any(|(_, node)| named(node, label)), "actual selected Properties baseline control: {label}");
|
||||
}
|
||||
assert!(properties.iter().any(|(_, node)| number(node).is_some_and(|v| (v - 2.1).abs() < 1e-9)), "the selected main-line weight is visible");
|
||||
for value in ["#ff0000ff", "#0000ffff"] {
|
||||
assert!(
|
||||
properties.iter().any(|(_, node)| node.role() == Role::ColorWell && node.value() == Some(value)),
|
||||
"main-line/text color control: {value}"
|
||||
);
|
||||
}
|
||||
assert_eq!(recipe(&app, id), original);
|
||||
assert_eq!(app.session.active().unwrap().doc, document);
|
||||
assert_eq!(app.session.paint, paint);
|
||||
|
||||
assert!(
|
||||
extension_controls(&properties).is_some(),
|
||||
"selected Properties must expose Extension Lines with an independent weight input and color control; Tool Options is closed"
|
||||
);
|
||||
}
|
||||
|
||||
fn fixture() -> (VectorcraftApp, egui::Context, NodeId) {
|
||||
vectorcraft_ui_egui::i18n::set_current(vectorcraft_ui_egui::i18n::Lang::EN);
|
||||
let mut app = VectorcraftApp::new(Session::new(), Default::default());
|
||||
app.run("file.new", json!({"width": 400, "height": 300})).unwrap();
|
||||
app.run("paint.setFill", json!({"color": "#d0d0d0"})).unwrap();
|
||||
app.run("shape.ellipse", json!({"x": 100, "y": 129.435, "width": 41.13, "height": 41.13})).unwrap();
|
||||
let made = app
|
||||
.run(
|
||||
"dimension.create",
|
||||
json!({"a": [100,150], "b": [141.13,150], "orientation": "horizontal", "offset": -25,
|
||||
"options": {"units": "pt", "precision": 2, "lineWeight": 2.1, "lineColor": [255,0,0], "textColor": [0,0,255],
|
||||
"extensionWeight": 0.5, "extensionColor": [0,0,0]}}),
|
||||
)
|
||||
.unwrap();
|
||||
let id = NodeId(made["id"].as_u64().unwrap());
|
||||
app.ui.task_bar = false;
|
||||
app.ui.view.rulers = false;
|
||||
app.session.prefs.monitor_profile_display = false;
|
||||
app.canvas.worker_started = true;
|
||||
let ctx = egui::Context::default();
|
||||
ctx.enable_accesskit();
|
||||
ctx.all_styles_mut(|style| style.visuals.numeric_color_space = egui::style::NumericColorSpace::GammaByte);
|
||||
let _ = snapshot(&mut app, &ctx);
|
||||
let view = app.view_mut().unwrap();
|
||||
view.zoom = 8.0;
|
||||
view.center = vectorcraft_geom::Point::new(120.565, 140.0);
|
||||
view.rotation = 0.0;
|
||||
select_properties(&mut app, &ctx, id);
|
||||
(app, ctx, id)
|
||||
}
|
||||
|
||||
fn select_properties(app: &mut VectorcraftApp, ctx: &egui::Context, id: NodeId) {
|
||||
app.select_tool("selection");
|
||||
app.run("select.set", json!({"ids": [id.0]})).unwrap();
|
||||
app.run("window.panel", json!({"panel": "properties"})).unwrap();
|
||||
let nodes = snapshot(app, ctx);
|
||||
assert!(nodes.iter().any(|(_, node)| named(node, "Apply to All")));
|
||||
}
|
||||
|
||||
fn click_at(app: &mut VectorcraftApp, ctx: &egui::Context, at: Pos2) {
|
||||
frame(app, ctx, vec![Event::ModifiersChanged(Modifiers::NONE), Event::PointerMoved(at)]).textures_delta.clear();
|
||||
for pressed in [true, false] {
|
||||
frame(app, ctx, vec![Event::PointerButton { pos: at, button: PointerButton::Primary, pressed, modifiers: Modifiers::NONE }])
|
||||
.textures_delta
|
||||
.clear();
|
||||
}
|
||||
let _ = snapshot(app, ctx);
|
||||
}
|
||||
|
||||
fn node_center(nodes: &[(AccessId, Node)], id: AccessId) -> Pos2 {
|
||||
let b = nodes.iter().find(|(candidate, _)| *candidate == id).unwrap().1.bounds().unwrap();
|
||||
egui::pos2(((b.x0 + b.x1) * 0.5) as f32, ((b.y0 + b.y1) * 0.5) as f32)
|
||||
}
|
||||
|
||||
fn key(app: &mut VectorcraftApp, ctx: &egui::Context, key: egui::Key, modifiers: Modifiers) {
|
||||
for pressed in [true, false] {
|
||||
frame(app, ctx, vec![Event::ModifiersChanged(modifiers), Event::Key { key, physical_key: Some(key), pressed, repeat: false, modifiers }])
|
||||
.textures_delta
|
||||
.clear();
|
||||
}
|
||||
}
|
||||
|
||||
fn type_at(app: &mut VectorcraftApp, ctx: &egui::Context, at: Pos2, text: &str) {
|
||||
click_at(app, ctx, at);
|
||||
key(app, ctx, egui::Key::A, Modifiers { ctrl: true, command: true, ..Modifiers::NONE });
|
||||
frame(app, ctx, vec![Event::ModifiersChanged(Modifiers::NONE), Event::Text(text.into())]).textures_delta.clear();
|
||||
key(app, ctx, egui::Key::Enter, Modifiers::NONE);
|
||||
let _ = snapshot(app, ctx);
|
||||
}
|
||||
|
||||
fn extension_pair(nodes: &[(AccessId, Node)], weight: f64, color: &str) -> (AccessId, AccessId) {
|
||||
let heading = nodes.iter().find(|(_, node)| named(node, "Extension Lines")).unwrap().1.bounds().unwrap();
|
||||
let in_row = |node: &Node| {
|
||||
node.bounds().is_some_and(|b| {
|
||||
let y = (b.y0 + b.y1) * 0.5;
|
||||
y >= heading.y1 && y <= heading.y1 + 60.0 && b.x0 >= heading.x0 - 2.0
|
||||
})
|
||||
};
|
||||
let input = nodes
|
||||
.iter()
|
||||
.find_map(|(label_id, label)| {
|
||||
if !named(label, "Line Weight:") || !in_row(label) {
|
||||
return None;
|
||||
}
|
||||
nodes
|
||||
.iter()
|
||||
.find(|(_, input)| input.labelled_by().contains(label_id) && number(input).is_some_and(|v| (v - weight).abs() < 1e-9))
|
||||
.map(|(id, _)| *id)
|
||||
})
|
||||
.expect("the selected extension weight's actual input");
|
||||
let color = nodes
|
||||
.iter()
|
||||
.find(|(_, node)| node.role() == Role::ColorWell && in_row(node) && node.value() == Some(color))
|
||||
.expect("the selected extension ColorWell")
|
||||
.0;
|
||||
(input, color)
|
||||
}
|
||||
|
||||
fn edit_weight(app: &mut VectorcraftApp, ctx: &egui::Context, old: f64, color: &str, next: &str) {
|
||||
let nodes = snapshot(app, ctx);
|
||||
let (input, _) = extension_pair(&nodes, old, color);
|
||||
type_at(app, ctx, node_center(&nodes, input), next);
|
||||
}
|
||||
|
||||
fn edit_gray(app: &mut VectorcraftApp, ctx: &egui::Context, weight: f64) -> serde_json::Value {
|
||||
let nodes = snapshot(app, ctx);
|
||||
let (input, color) = extension_pair(&nodes, weight, "#000000ff");
|
||||
let control_bounds = json!({"weight": format!("{:?}", nodes.iter().find(|(id, _)| *id == input).unwrap().1.bounds()),
|
||||
"color": format!("{:?}", nodes.iter().find(|(id, _)| *id == color).unwrap().1.bounds())});
|
||||
click_at(app, ctx, node_center(&nodes, color));
|
||||
// The pinned egui picker uses existing R/G/B DragValues (prefix names), not a hex field.
|
||||
for channel in ["R", "G", "B"] {
|
||||
let nodes = snapshot(app, ctx);
|
||||
let id = nodes.iter().find(|(_, node)| node.label() == Some(channel)).unwrap_or_else(|| panic!("actual picker channel {channel}")).0;
|
||||
type_at(app, ctx, node_center(&nodes, id), "128");
|
||||
}
|
||||
key(app, ctx, egui::Key::Escape, Modifiers::NONE);
|
||||
let _ = snapshot(app, ctx);
|
||||
control_bounds
|
||||
}
|
||||
|
||||
fn geometry(dimension: &Dimension) -> serde_json::Value {
|
||||
let mut value = serde_json::to_value(dimension).unwrap();
|
||||
value.as_object_mut().unwrap().remove("options");
|
||||
value
|
||||
}
|
||||
|
||||
/// Capture the actual canvas texture using ordinary view changes to request a full upload.
|
||||
fn capture(app: &mut VectorcraftApp, ctx: &egui::Context) -> (vectorcraft_render::Rendered, vectorcraft_geom::Affine) {
|
||||
let center = app.view().unwrap().center;
|
||||
app.view_mut().unwrap().center.x += 1.0;
|
||||
frame(app, ctx, vec![]).textures_delta.clear();
|
||||
app.view_mut().unwrap().center = center;
|
||||
let mut output = frame(app, ctx, vec![]);
|
||||
let texture = app.canvas.texture.as_ref().unwrap().id();
|
||||
let upload =
|
||||
output.textures_delta.set.iter().find(|(id, _)| **id == texture).and_then(|(_, updates)| updates.last()).expect("actual CPU canvas upload");
|
||||
assert!(upload.pos.is_none(), "the view change requests a full texture");
|
||||
let egui::ImageData::Color(image) = &upload.image;
|
||||
let rendered = vectorcraft_render::Rendered {
|
||||
width: image.width() as u32,
|
||||
height: image.height() as u32,
|
||||
pixels: image.pixels.iter().flat_map(|color| color.to_array()).collect(),
|
||||
};
|
||||
let cache = app.canvas.key.as_ref().unwrap();
|
||||
assert!(cache.pixel.is_none());
|
||||
assert_eq!(cache.doc, app.session.active().unwrap().uid as usize);
|
||||
assert_eq!(cache.revision, app.session.active().unwrap().revision);
|
||||
assert_eq!((cache.w, cache.h), (rendered.width, rendered.height));
|
||||
// The existing frame_view mapping, bound to this actual upload's public cache key.
|
||||
let transform = vectorcraft_geom::Affine::translate((f64::from(cache.w) / 2.0, f64::from(cache.h) / 2.0))
|
||||
* vectorcraft_geom::Affine::rotate(cache.rot.to_radians())
|
||||
* vectorcraft_geom::Affine::scale(cache.zoom * f64::from(cache.ppp))
|
||||
* vectorcraft_geom::Affine::translate((-cache.cx, -cache.cy));
|
||||
output.textures_delta.clear();
|
||||
(rendered, transform)
|
||||
}
|
||||
|
||||
fn extension_coverage(image: &vectorcraft_render::Rendered, transform: vectorcraft_geom::Affine, x: f64, rgb: [u8; 3]) -> f64 {
|
||||
let point = transform * vectorcraft_geom::Point::new(x, 137.5);
|
||||
let (x, y) = (point.x.floor() as usize, point.y.floor() as usize);
|
||||
assert!(x >= 6 && x + 6 < image.width as usize && y < image.height as usize);
|
||||
let mut coverage = 0.0;
|
||||
let mut solid = false;
|
||||
for column in x - 6..=x + 6 {
|
||||
let at = (y * image.width as usize + column) * 4;
|
||||
let pixel = &image.pixels[at..at + 4];
|
||||
coverage += f64::from(pixel[3]) / 255.0;
|
||||
solid |= pixel[3] == 255 && pixel[..3] == rgb;
|
||||
}
|
||||
assert!(solid, "actual extension midpoint has the expected opaque color {rgb:?}");
|
||||
coverage
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn properties_edits_both_extensions_preserves_main_text_and_roundtrips_editable_recipe() {
|
||||
let (mut app, ctx, id) = fixture();
|
||||
let original = recipe(&app, id);
|
||||
let selection = app.session.active().unwrap().selection.clone();
|
||||
let paint = app.session.paint.clone();
|
||||
let (before, before_xf) = capture(&mut app, &ctx);
|
||||
edit_weight(&mut app, &ctx, 0.5, "#000000ff", "0.35");
|
||||
let weighted = recipe(&app, id);
|
||||
assert_eq!(weighted.options.extension_weight, 0.35);
|
||||
assert_eq!(geometry(&weighted), geometry(&original));
|
||||
generated_styles(&app, id, [0, 0, 0], 0.35);
|
||||
app.run("edit.undo", json!({})).unwrap();
|
||||
assert_eq!(recipe(&app, id), original);
|
||||
generated_styles(&app, id, [0, 0, 0], 0.5);
|
||||
app.run("edit.redo", json!({})).unwrap();
|
||||
assert_eq!(recipe(&app, id), weighted);
|
||||
let _ = snapshot(&mut app, &ctx);
|
||||
let controls = edit_gray(&mut app, &ctx, 0.35);
|
||||
let edited = recipe(&app, id);
|
||||
let mut expected = original.clone();
|
||||
expected.options.extension_weight = 0.35;
|
||||
expected.options.extension_color = [128, 128, 128];
|
||||
assert_eq!(edited, expected, "only the selected independent extension fields change");
|
||||
generated_styles(&app, id, [128, 128, 128], 0.35);
|
||||
assert_eq!(app.session.active().unwrap().selection, selection);
|
||||
assert_eq!(app.session.paint, paint);
|
||||
let (after, after_xf) = capture(&mut app, &ctx);
|
||||
for x in [100.0, 141.13] {
|
||||
let old = extension_coverage(&before, before_xf, x, [0, 0, 0]);
|
||||
let new = extension_coverage(&after, after_xf, x, [128, 128, 128]);
|
||||
assert!(new < old, "both actual extension lines become thinner: {new} < {old}");
|
||||
}
|
||||
for rgb in [[255, 0, 0], [0, 0, 255]] {
|
||||
for image in [&before, &after] {
|
||||
assert!(
|
||||
image.pixels.as_chunks::<4>().0.iter().any(|pixel| pixel[3] == 255 && pixel[..3] == rgb),
|
||||
"main/text color remains on the actual canvas: {rgb:?}"
|
||||
);
|
||||
}
|
||||
}
|
||||
if let Some(dir) = std::env::var_os("VECTORCRAFT_DIMENSION_EVIDENCE") {
|
||||
let dir = std::path::PathBuf::from(dir);
|
||||
std::fs::create_dir_all(&dir).unwrap();
|
||||
std::fs::write(dir.join("before.png"), before.to_png().unwrap()).unwrap();
|
||||
std::fs::write(dir.join("after.png"), after.to_png().unwrap()).unwrap();
|
||||
std::fs::write(
|
||||
dir.join("binding.json"),
|
||||
serde_json::to_vec_pretty(&json!({"doc": app.session.active().unwrap().uid,
|
||||
"target": id.0, "revision": app.session.active().unwrap().revision, "recipe": edited, "controls": controls}))
|
||||
.unwrap(),
|
||||
)
|
||||
.unwrap();
|
||||
}
|
||||
|
||||
// Use the existing native save/open commands in memory; no asset file is needed.
|
||||
let saved = app.run("document.save", json!({"format": "vectorcraft", "preview": false})).unwrap();
|
||||
let data = saved["dataBase64"].as_str().expect("an untitled native save returns bytes");
|
||||
app.run("document.open", json!({"name": "dimension.vectorcraft", "dataBase64": data})).unwrap();
|
||||
assert_eq!(recipe(&app, id), edited);
|
||||
select_properties(&mut app, &ctx, id);
|
||||
edit_weight(&mut app, &ctx, 0.35, "#808080ff", "0.6");
|
||||
assert_eq!(recipe(&app, id).options.extension_weight, 0.6, "the native recipe remains editable through Properties");
|
||||
assert_eq!(geometry(&recipe(&app, id)), geometry(&edited));
|
||||
generated_styles(&app, id, [128, 128, 128], 0.6);
|
||||
assert_eq!(app.session.paint, paint);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn properties_apply_all_copies_full_style_to_editable_dimensions_and_undoes_as_one_edit() {
|
||||
let (mut app, ctx, id) = fixture();
|
||||
let other = NodeId(
|
||||
app.run(
|
||||
"dimension.create",
|
||||
json!({"a": [200,150], "b": [241.13,150], "offset": -30,
|
||||
"options": {"lineWeight": 1.3, "lineColor": [0,128,0], "extensionWeight": 0.8, "extensionColor": [0,128,0]}}),
|
||||
)
|
||||
.unwrap()["id"]
|
||||
.as_u64()
|
||||
.unwrap(),
|
||||
);
|
||||
let locked = NodeId(
|
||||
app.run(
|
||||
"dimension.create",
|
||||
json!({"a": [100,220], "b": [141.13,220], "offset": -20,
|
||||
"options": {"lineWeight": 1.7, "lineColor": [192,0,192], "extensionWeight": 0.9, "extensionColor": [192,0,192]}}),
|
||||
)
|
||||
.unwrap()["id"]
|
||||
.as_u64()
|
||||
.unwrap(),
|
||||
);
|
||||
app.run("object.lock", json!({"ids": [locked.0]})).unwrap();
|
||||
let other_original = recipe(&app, other);
|
||||
let locked_original = recipe(&app, locked);
|
||||
select_properties(&mut app, &ctx, id);
|
||||
edit_weight(&mut app, &ctx, 0.5, "#000000ff", "0.35");
|
||||
let _ = edit_gray(&mut app, &ctx, 0.35);
|
||||
assert_eq!(recipe(&app, other), other_original, "selected edits do not change an unselected dimension");
|
||||
assert_eq!(recipe(&app, locked), locked_original);
|
||||
let selected = recipe(&app, id);
|
||||
let before = app.session.active().unwrap().doc.clone();
|
||||
let undo = app.session.active().unwrap().history.undo.len();
|
||||
let paint = app.session.paint.clone();
|
||||
click_named(&mut app, &ctx, "Apply to All");
|
||||
assert_eq!(recipe(&app, other).options, selected.options, "Apply to All copies the complete style, not only extensions");
|
||||
assert_eq!(geometry(&recipe(&app, other)), geometry(&other_original));
|
||||
assert_eq!(recipe(&app, locked), locked_original, "the locked control is untouched");
|
||||
assert_eq!(recipe(&app, id), selected);
|
||||
assert_eq!(app.session.active().unwrap().history.undo.len(), undo + 1);
|
||||
let after = app.session.active().unwrap().doc.clone();
|
||||
app.run("edit.undo", json!({})).unwrap();
|
||||
assert_eq!(app.session.active().unwrap().doc, before);
|
||||
app.run("edit.redo", json!({})).unwrap();
|
||||
assert_eq!(app.session.active().unwrap().doc, after);
|
||||
assert_eq!(app.session.paint, paint);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn properties_set_default_is_inherited_by_an_options_free_new_dimension() {
|
||||
let (mut app, ctx, id) = fixture();
|
||||
let other = NodeId(
|
||||
app.run("dimension.create", json!({"a": [200,150], "b": [241.13,150], "options": {"extensionWeight": 0.8}})).unwrap()["id"].as_u64().unwrap(),
|
||||
);
|
||||
let other_original = recipe(&app, other);
|
||||
select_properties(&mut app, &ctx, id);
|
||||
edit_weight(&mut app, &ctx, 0.5, "#000000ff", "0.35");
|
||||
let _ = edit_gray(&mut app, &ctx, 0.35);
|
||||
let selected = recipe(&app, id);
|
||||
let document = app.session.active().unwrap().doc.clone();
|
||||
let history = (app.session.active().unwrap().history.undo.len(), app.session.active().unwrap().history.redo.len());
|
||||
let paint = app.session.paint.clone();
|
||||
click_named(&mut app, &ctx, "Set as Default");
|
||||
assert_eq!(app.session.active().unwrap().doc, document, "setting tool defaults does not apply them to existing dimensions");
|
||||
assert_eq!((app.session.active().unwrap().history.undo.len(), app.session.active().unwrap().history.redo.len()), history);
|
||||
assert_eq!(recipe(&app, other), other_original);
|
||||
app.run("window.panel.close", json!({"panel": "properties"})).unwrap();
|
||||
app.run("tool.options", json!({"tool": "dimension"})).unwrap();
|
||||
assert_eq!(app.ui.dialog.as_ref().unwrap().fields["extensionWeight"], json!(0.35));
|
||||
assert_eq!(app.ui.dialog.as_ref().unwrap().fields["extensionColor"], json!([128, 128, 128]));
|
||||
// Enter is this modal's legitimate Save action; Tab commits only the focused draft field.
|
||||
let nodes = snapshot(&mut app, &ctx);
|
||||
let (input, _) = extension_pair(&nodes, 0.35, "#808080ff");
|
||||
click_at(&mut app, &ctx, node_center(&nodes, input));
|
||||
key(&mut app, &ctx, egui::Key::A, Modifiers { ctrl: true, command: true, ..Modifiers::NONE });
|
||||
frame(&mut app, &ctx, vec![Event::ModifiersChanged(Modifiers::NONE), Event::Text("0.9".into())]).textures_delta.clear();
|
||||
key(&mut app, &ctx, egui::Key::Tab, Modifiers::NONE);
|
||||
let _ = snapshot(&mut app, &ctx);
|
||||
assert_eq!(app.ui.dialog.as_ref().unwrap().fields["extensionWeight"], json!(0.9), "Tool Options edits a draft until Save");
|
||||
click_named(&mut app, &ctx, "Cancel");
|
||||
let new = NodeId(app.run("dimension.create", json!({"a": [100,220], "b": [141.13,220], "offset": -20})).unwrap()["id"].as_u64().unwrap());
|
||||
assert_eq!(recipe(&app, new).options, selected.options, "no explicit options: new dimensions inherit the full style");
|
||||
assert_eq!(recipe(&app, id), selected);
|
||||
assert_eq!(recipe(&app, other), other_original);
|
||||
assert_eq!(app.session.paint, paint);
|
||||
}
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
# Roadmap: milestones and what's next
|
||||
|
||||
> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-18 · **Change:** minor (Brush Options Key Color: restore canvas input for the existing one-shot pick, then resume the retained draft and previous tool (#8284; six full-app input regressions passed); scores and estimates unchanged; previously: M4: `.ai` and EPS import: an Art brush in Tints of a swatch-linked stroke color comes in brushed, #8200; scores and estimates unchanged; previously: Ellipse: Up/Down changes Anchors while drawing (#7840); scores and estimates unchanged; previously: Windows/Linux menu access keys and localized cues (#6596); previously: Backquote/~ arrow pattern nudges (#7717); scores and estimates unchanged; previously: Window > Toolbars > Compact Tools offers optional denser main Tools spacing (#7234); default layout, scores and estimates unchanged; previously: Direct Selection: Space during an ordinary path's handle drag repositions its anchor and handles, including a Pen loan (#7237, request 3 only; scores and estimates unchanged); previously: M4: `.ai` and EPS import: clipping paths grouped in a compound path are its subpaths, #8128; scores and estimates unchanged; previously: import: type filled and stroked by a `TJ` whose kerning starts a new line comes in filled and stroked, #8543; PDF Retype phase 1 (#4934): Type › Retype (`type.retype`) turns outlined text that exactly matches an available font back into point text; scores and estimates unchanged; previously: M1: Lock Guides: a selection marquee (Selection, Direct Selection, Group Selection, Enclosing Lasso) leaves out paths made into guides inside groups and compound paths too, as clicks do (#3074), so a group is no longer selected by a locked guide in it; an enclosing marquee measures a group without its locked or hidden guides, and Direct Selection takes no anchor or segment of a guide that can't be picked; a guide in a group still moves with its group (#8538); Production Preflight: output-aware fonts, text overflow, linked files and effective image resolution, clickable findings and automatic rechecking; scores and estimates unchanged; previously: PDF export writes the document language as the catalog's `/Lang`, #3644; M1: an Alt-drag in the Layers panel copies a row above or below its own place, #8237; scores and estimates unchanged; previously: PDF import: a glyph filled only after a glyph filled and stroked comes in filled only, not stroked, #8300; PDF import: translucent type filled and stroked comes in as a filled type object and a stroked one, as the file composites them, and an upright glyph is never kept as the outline of its glyph alone, #8015; PDF import: type filled and stroked by one text-showing operator comes in as one type object, filled and stroked, not a stroked copy over a filled one, #8015; M1: Layers panel Alt-drag shows the copy cursor, #8217; scores and estimates unchanged; previously: Gradient panel: the add-stop strip shows the white arrow with a plus on Windows and X11, #8241; scores and estimates unchanged; previously: Recolor Artwork follow-up (#8031, remaining #4028): native Lab input, picker swatch libraries and Assign-row menus; UI interaction regression coverage; scores and estimates unchanged; previously: Eraser review: hidden Rasterize and Along/Across stroke rows do not block preserving visible gradients; scores and estimates unchanged; previously: Eraser review: ordinary Group/Layer paints and reproducible evaluated gradient placements are preserved; other placements retain existing fitting; scores and estimates unchanged; previously: Eraser: shared fill-only area cutting for fixed and varied tips and the Alt-drag marquee, #6582; scores and estimates unchanged; previously: #8005: the Color spectrum fills a resized panel; scores and estimates unchanged; previously: M7: Check Spelling modal dialog (Edit › Spelling › Check Spelling…), #4936; spell check complete; previously: PDF import: stroked type keeps the line cap, line join and miter limit the file strokes it with, a glyph stroked otherwise than the run it joins coming in as a run of its own, #7741; M10/G5: Neon & Glow built-in graphic style library (Cyan Neon, Magenta Laser, Amber Tube, Electric Lime, Pulse Violet, Cobalt Phosphor); previously: Tech Circuit brush library, G5; previously: Graphic Styles list fills a taller panel, #2992; scores and estimates unchanged; previously: PDF import: glyphs in a span with an empty ActualText come in as outlines, #6971; scores and estimates unchanged; previously: library panels' lists fill a taller panel, #2992; scores and estimates unchanged; previously: Swatches list fills a taller panel, #1638; scores and estimates unchanged; previously: icon-strip flyouts also resize from the top edge and the canvas-side top corner, keeping the moved top in workspaces (storytold/craft-libs#1094); scores and estimates unchanged; previously: #6865: explicitly requested oversized editing artboard; Live Paint Bucket fills faces crossed in one dLine truncated
|
||||
> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-18 · **Change:** minor (selected Dimension extension-line color and weight in Properties (#7078; four focused UI regressions passed); scores and estimates unchanged; previously: Brush Options Key Color: restore canvas input for the existing one-shot pick, then resume the retained draft and previous tool (#8284; six full-app input regressions passed); scores and estimates unchanged; previously: M4: `.ai` and EPS import: an Art brush in Tints of a swatch-linked stroke color comes in brushed, #8200; scores and estimates unchanged; previously: Ellipse: Up/Down changes Anchors while drawing (#7840); scores and estimates unchanged; previously: Windows/Linux menu access keys and localized cues (#6596); previously: Backquote/~ arrow pattern nudges (#7717); scores and estimates unchanged; previously: Window > Toolbars > Compact Tools offers optional denser main Tools spacing (#7234); default layout, scores and estimates unchanged; previously: Direct Selection: Space during an ordinary path's handle drag repositions its anchor and handles, including a Pen loan (#7237, request 3 only; scores and estimates unchanged); previously: M4: `.ai` and EPS import: clipping paths grouped in a compound path are its subpaths, #8128; scores and estimates unchanged; previously: import: type filled and stroked by a `TJ` whose kerning starts a new line comes in filled and stroked, #8543; PDF Retype phase 1 (#4934): Type › Retype (`type.retype`) turns outlined text that exactly matches an available font back into point text; scores and estimates unchanged; previously: M1: Lock Guides: a selection marquee (Selection, Direct Selection, Group Selection, Enclosing Lasso) leaves out paths made into guides inside groups and compound paths too, as clicks do (#3074), so a group is no longer selected by a locked guide in it; an enclosing marquee measures a group without its locked or hidden guides, and Direct Selection takes no anchor or segment of a guide that can't be picked; a guide in a group still moves with its group (#8538); Production Preflight: output-aware fonts, text overflow, linked files and effective image resolution, clickable findings and automatic rechecking; scores and estimates unchanged; previously: PDF export writes the document language as the catalog's `/Lang`, #3644; M1: an Alt-drag in the Layers panel copies a row above or below its own place, #8237; scores and estimates unchanged; previously: PDF import: a glyph filled only after a glyph filled and stroked comes in filled only, not stroked, #8300; PDF import: translucent type filled and stroked comes in as a filled type object and a stroked one, as the file composites them, and an upright glyph is never kept as the outline of its glyph alone, #8015; PDF import: type filled and stroked by one text-showing operator comes in as one type object, filled and stroked, not a stroked copy over a filled one, #8015; M1: Layers panel Alt-drag shows the copy cursor, #8217; scores and estimates unchanged; previously: Gradient panel: the add-stop strip shows the white arrow with a plus on Windows and X11, #8241; scores and estimates unchanged; previously: Recolor Artwork follow-up (#8031, remaining #4028): native Lab input, picker swatch libraries and Assign-row menus; UI interaction regression coverage; scores and estimates unchanged; previously: Eraser review: hidden Rasterize and Along/Across stroke rows do not block preserving visible gradients; scores and estimates unchanged; previously: Eraser review: ordinary Group/Layer paints and reproducible evaluated gradient placements are preserved; other placements retain existing fitting; scores and estimates unchanged; previously: Eraser: shared fill-only area cutting for fixed and varied tips and the Alt-drag marquee, #6582; scores and estimates unchanged; previously: #8005: the Color spectrum fills a resized panel; scores and estimates unchanged; previously: M7: Check Spelling modal dialog (Edit › Spelling › Check Spelling…), #4936; spell check complete; previously: PDF import: stroked type keeps the line cap, line join and miter limit the file strokes it with, a glyph stroked otherwise than the run it joins coming in as a run of its own, #7741; M10/G5: Neon & Glow built-in graphic style library (Cyan Neon, Magenta Laser, Amber Tube, Electric Lime, Pulse Violet, Cobalt Phosphor); previously: Tech Circuit brush library, G5; previously: Graphic Styles list fills a taller panel, #2992; scores and estimates unchanged; previously: PDF import: glyphs in a span with an empty ActualText come in as outlines, #6971; scores and estimates unchanged; previously: library panels' lists fill a taller panel, #2992; scores and estimates unchanged; previously: Swatches list fills a taller panel, #1638; scores and estimates unchanged; previously: icon-strip flyouts also resize from the top edge and the canvas-side top corner, keeping the moved top in workspaces (storytold/craft-libsLine truncated
|
||||
>
|
||||
> Oversized artboard import update (2026-11-12): Explicit editing-data import retains a single artboard beyond a capped 14,400 pt PDF page (#6865).
|
||||
>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Parity with Adobe Illustrator
|
||||
|
||||
> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-18 · **Change:** minor (Brush Options Key Color: restore canvas input for the existing one-shot pick, then resume the retained draft and previous tool (#8284; six full-app input regressions passed); scores and estimates unchanged; previously: #8200: `.ai` and EPS import: an Art brush in Tints of a swatch-linked stroke color comes in brushed, its tints linked to the swatch; scores and estimates unchanged; previously: Ellipse: Up/Down changes Anchors while drawing (#7840); scores and estimates unchanged; previously: Windows/Linux menu access keys and localized cues (#6596); previously: Backquote/~ arrow pattern nudges (#7717); scores and estimates unchanged; previously: Window > Toolbars > Compact Tools offers optional denser main Tools spacing (#7234); default layout, scores and estimates unchanged; previously: Direct Selection: Space during an ordinary path's handle drag repositions its anchor and handles, including a Pen loan (#7237, request 3 only; scores and estimates unchanged); previously: SVG export preserves document units on root width/height for physical units, #864; G11 estimate 8–15 → 6–13 h; previously: Floating panels keep their window level while focus moves between the app's windows, so a press on one panel's bar no longer hands the keyboard to another, #6986; scores and estimates unchanged; previously minor: #8128: `.ai` and EPS import: clipping paths grouped in a compound path are its subpaths, so the compound clipping path clips its clipping group; scores and estimates unchanged; previously: import: type filled and stroked by a `TJ` whose kerning starts a new line comes in filled and stroked, #8543; PDF Retype phase 1 (#4934): Type › Retype (`type.retype`) turns outlined text that exactly matches an available font back into point text; scores and estimates unchanged; previously: Lock Guides: a selection marquee (Selection, Direct Selection, Group Selection, Enclosing Lasso) leaves out paths made into guides inside groups and compound paths too, as clicks do (#3074), so a group is no longer selected by a locked guide in it; an enclosing marquee measures a group without its locked or hidden guides, and Direct Selection takes no anchor or segment of a guide that can't be picked; a guide in a group still moves with its group (#8538); Production Preflight: output-aware fonts, text overflow, linked files and effective image resolution, clickable findings and automatic rechecking; scores and estimates unchanged; previously: PDF export writes the document language as the catalog's `/Lang`, #3644; Layers panel: an Alt-drag copies a row above or below itself, so the top layer dragged up, the bottom layer dragged down and a lone layer are copied, #8237; scores and estimates unchanged; previously: Twist: a strongly twisted path joins its pieces without kinks, #7069; scores and estimates unchanged; previously: PDF import: a glyph filled only after a glyph filled and stroked comes in filled only, not stroked, #8300; PDF import: translucent type filled and stroked comes in as a filled type object and a stroked one, as the file composites them, and an upright glyph is never kept as the outline of its glyph alone, #8015; PDF import: type filled and stroked by one text-showing operator comes in as one type object, filled and stroked, not a stroked copy over a filled one, #8015; Layers panel: Alt over the list shows the copy cursor while rows or the selection square are dragged, #8217; scores and estimates unchanged; previously: Gradient panel: the add-stop strip under the ramp shows the white arrow with a plus on Windows and X11, #8241; scores and estimates unchanged; previously: Properties panel: the Character section shows the font of the Type tool's selection, not the first run's (#8189); scores and estimates unchanged; previously: Recolor Artwork follow-up (#8031, remaining #4028): native Lab input, picker swatch libraries and Assign-row menus; UI interaction regression coverage; scores and estimates unchanged; previously: Eraser review: hidden Rasterize and Along/Across stroke rows do not block preserving visible gradients; scores and estimates unchanged; previously: Eraser review: ordinary Group/Layer paints and reproducible evaluated gradient placements are preserved; other placements retain existing fitting; scores and estimates unchanged; previously: Eraser: shared fill-only area cutting for fixed and varied tips and the Alt-drag marquee, #6582; scores and estimates unchanged; previously: #8005: the Color spectrum fills a resized panel; scores and estimates unchanged; previously: Paragraph composers (#4935): the Paragraph panel menu and paragraph styles offer four composers, the Middle Eastern & South Asian Single-line and Every-line (how all type is set, and the default) and a Standard Single-line and Every-line that set Indic, Arabic and Hebrew type glyph by glyph as the font maps it, for legacy fonts that keep a script on LatLine truncated
|
||||
> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-18 · **Change:** minor (selected Dimension extension-line color and weight in Properties (#7078; four focused UI regressions passed); scores and estimates unchanged; previously: Brush Options Key Color: restore canvas input for the existing one-shot pick, then resume the retained draft and previous tool (#8284; six full-app input regressions passed); scores and estimates unchanged; previously: #8200: `.ai` and EPS import: an Art brush in Tints of a swatch-linked stroke color comes in brushed, its tints linked to the swatch; scores and estimates unchanged; previously: Ellipse: Up/Down changes Anchors while drawing (#7840); scores and estimates unchanged; previously: Windows/Linux menu access keys and localized cues (#6596); previously: Backquote/~ arrow pattern nudges (#7717); scores and estimates unchanged; previously: Window > Toolbars > Compact Tools offers optional denser main Tools spacing (#7234); default layout, scores and estimates unchanged; previously: Direct Selection: Space during an ordinary path's handle drag repositions its anchor and handles, including a Pen loan (#7237, request 3 only; scores and estimates unchanged); previously: SVG export preserves document units on root width/height for physical units, #864; G11 estimate 8–15 → 6–13 h; previously: Floating panels keep their window level while focus moves between the app's windows, so a press on one panel's bar no longer hands the keyboard to another, #6986; scores and estimates unchanged; previously minor: #8128: `.ai` and EPS import: clipping paths grouped in a compound path are its subpaths, so the compound clipping path clips its clipping group; scores and estimates unchanged; previously: import: type filled and stroked by a `TJ` whose kerning starts a new line comes in filled and stroked, #8543; PDF Retype phase 1 (#4934): Type › Retype (`type.retype`) turns outlined text that exactly matches an available font back into point text; scores and estimates unchanged; previously: Lock Guides: a selection marquee (Selection, Direct Selection, Group Selection, Enclosing Lasso) leaves out paths made into guides inside groups and compound paths too, as clicks do (#3074), so a group is no longer selected by a locked guide in it; an enclosing marquee measures a group without its locked or hidden guides, and Direct Selection takes no anchor or segment of a guide that can't be picked; a guide in a group still moves with its group (#8538); Production Preflight: output-aware fonts, text overflow, linked files and effective image resolution, clickable findings and automatic rechecking; scores and estimates unchanged; previously: PDF export writes the document language as the catalog's `/Lang`, #3644; Layers panel: an Alt-drag copies a row above or below itself, so the top layer dragged up, the bottom layer dragged down and a lone layer are copied, #8237; scores and estimates unchanged; previously: Twist: a strongly twisted path joins its pieces without kinks, #7069; scores and estimates unchanged; previously: PDF import: a glyph filled only after a glyph filled and stroked comes in filled only, not stroked, #8300; PDF import: translucent type filled and stroked comes in as a filled type object and a stroked one, as the file composites them, and an upright glyph is never kept as the outline of its glyph alone, #8015; PDF import: type filled and stroked by one text-showing operator comes in as one type object, filled and stroked, not a stroked copy over a filled one, #8015; Layers panel: Alt over the list shows the copy cursor while rows or the selection square are dragged, #8217; scores and estimates unchanged; previously: Gradient panel: the add-stop strip under the ramp shows the white arrow with a plus on Windows and X11, #8241; scores and estimates unchanged; previously: Properties panel: the Character section shows the font of the Type tool's selection, not the first run's (#8189); scores and estimates unchanged; previously: Recolor Artwork follow-up (#8031, remaining #4028): native Lab input, picker swatch libraries and Assign-row menus; UI interaction regression coverage; scores and estimates unchanged; previously: Eraser review: hidden Rasterize and Along/Across stroke rows do not block preserving visible gradients; scores and estimates unchanged; previously: Eraser review: ordinary Group/Layer paints and reproducible evaluated gradient placements are preserved; other placements retain existing fitting; scores and estimates unchanged; previously: Eraser: shared fill-only area cutting for fixed and varied tips and the Alt-drag marquee, #6582; scores and estimates unchanged; previously: #8005: the Color spectrum fills a resized panel; scores and estimates unchanged; previously: Paragraph composers (#4935): the Paragraph panel menu and paragraph styles offer four composers, the Middle Eastern & South Asian Single-line and Every-line (how all type is set, and the default) and aLine truncated
|
||||
>
|
||||
> Tech Circuit update (2026-11-14): three original procedural brushes; ten built-in brush libraries (G5).
|
||||
>
|
||||
@@ -664,6 +664,7 @@ since 2026-10-01.
|
||||
**Drawing tools — Polygon and Star counts:** The existing canvas placement dialog reads the stored count and saves it only after successful placement. `polygon_and_star_canvas_counts_persist_without_new_toolbar_dialogs` covers both tools, repeated drags, tool switching, reopening and Cancel. Counts remain session tool options. Existing click and toolbar gestures are retained; no score or hour change.
|
||||
**Drawing tools, Star inner radius held with Ctrl/Cmd:** While a star is dragged out, Ctrl/Cmd keeps the inner radius the star showed when the key went down, also when the key is pressed with the pointer still. `a_star_drag_holds_its_inner_radius_with_ctrl_and_straightens_with_alt` and `a_star_drag_holds_the_inner_radius_it_shows_when_ctrl_goes_down` cover it, with Alt's straight shoulders and a drag canceled with Escape.
|
||||
**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 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.
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
# UI and interaction parity
|
||||
|
||||
> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-18 · **Change:** minor (Brush Options Key Color: restore canvas input for the existing one-shot pick, then resume the retained draft and previous tool (#8284; six full-app input regressions passed); scores and estimates unchanged; previously: Ellipse: Up/Down changes Anchors while drawing (#7840); scores and estimates unchanged; previously: Windows/Linux menu access keys and localized cues (#6596); previously: Backquote/~ arrow pattern nudges (#7717); scores and estimates unchanged; previously: Window > Toolbars > Compact Tools offers optional denser main Tools spacing (#7234); default layout, scores and estimates unchanged; previously: Direct Selection: Space during an ordinary path's handle drag repositions its anchor and handles, including a Pen loan (#7237, request 3 only; scores and estimates unchanged); previously: Floating panels keep their window level while focus moves between the app's windows, so a press on one panel's bar no longer hands the keyboard to another, #6986; scores and estimates unchanged; previously minor: Lock Guides: a selection marquee (Selection, Direct Selection, Group Selection, Enclosing Lasso) leaves out paths made into guides inside groups and compound paths too, as clicks do (#3074), so a group is no longer selected by a locked guide in it; an enclosing marquee measures a group without its locked or hidden guides, and Direct Selection takes no anchor or segment of a guide that can't be picked; a guide in a group still moves with its group (#8538); scores and estimates unchanged; previously: Production Preflight: output-aware fonts, text overflow, linked files and effective image resolution, clickable findings and automatic rechecking; scores and estimates unchanged; previously: Layers panel: an Alt-drag copies a row above or below itself, so the top layer dragged up, the bottom layer dragged down and a lone layer are copied, #8237; scores and estimates unchanged; previously: Layers panel: Alt over the list shows the copy cursor while rows or the selected-art square are dragged, #8217; scores and estimates unchanged; previously: Gradient panel: the add-stop strip under the ramp shows the white arrow with a plus on Windows and X11, #8241; scores and estimates unchanged; previously: Recolor Artwork follow-up (#8031, remaining #4028): native Lab input, picker swatch libraries and Assign-row menus; UI interaction regression coverage; scores and estimates unchanged; previously: Eraser review: hidden Rasterize and Along/Across stroke rows do not block preserving visible gradients; scores and estimates unchanged; previously: Eraser review: ordinary Group/Layer paints and reproducible evaluated gradient placements are preserved; other placements retain existing fitting; scores and estimates unchanged; previously: Eraser: shared fill-only area cutting for fixed and varied tips and the Alt-drag marquee, #6582; scores and estimates unchanged; previously: #8005: the Color spectrum fills a resized panel; scores and estimates unchanged; previously: Pencil continuation, straight-line and closing cursors; scores and estimates unchanged; previously: Graphic Styles list fills a taller panel, #2992; scores and estimates unchanged; previously: library panels' lists fill a taller panel, #2992; scores and estimates unchanged; previously: Swatches list fills a taller panel, #1638; scores and estimates unchanged; previously: icon-strip flyouts also resize from the top edge and the canvas-side top corner, keeping the moved top in workspaces (storytold/craft-libs#1094); scores and estimates unchanged; previously: macOS: the canvas cursor stays after the pointer moves, #6362; scores and estimates unchanged; previously minor: Remove Background in the Contextual Task Bar, Properties › Quick Actions and the Control bar; previously minor: Ruler origin: the corner drag snaps as a drawn point does; previously minor: Live Paint Bucket fills faces crossed in one drag (#6373); previously: #6404: transform-aware Eyedropper character copying; scores and estimates unchanged; previously: Outline view: images and gradient meshes are picked on what Outline draws, so a click inside them reaches the path behind, #6437; previously minor: a middle-click on a document tab closes it, #6506; previously minor: Blob Brush: a round tip's preview is the outline of the area it adds, round at both ends, as the stroke it commits (#4343); scores and estimates unchanged; previously:; ruler double-click adds a guide at the pointer, #5239; G5: Inventory Icons built-in symbol library (four built-ins); previously minor: files that record no units open in Preferences › Units › General, #5820; previously minor: interim macOS cursor delivery, #2292; native validation pending; scores and estimates unchanged; Control bar › Snapping includes the existing Snap to Glyph and Alignment Guides toggles (#6164); scores and estimates unchanged; floating tab groups collapse into tLine truncated
|
||||
> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-18 · **Change:** minor (selected Dimension extension-line color and weight in Properties (#7078; four focused UI regressions passed); scores and estimates unchanged; previously: Brush Options Key Color: restore canvas input for the existing one-shot pick, then resume the retained draft and previous tool (#8284; six full-app input regressions passed); scores and estimates unchanged; previously: Ellipse: Up/Down changes Anchors while drawing (#7840); scores and estimates unchanged; previously: Windows/Linux menu access keys and localized cues (#6596); previously: Backquote/~ arrow pattern nudges (#7717); scores and estimates unchanged; previously: Window > Toolbars > Compact Tools offers optional denser main Tools spacing (#7234); default layout, scores and estimates unchanged; previously: Direct Selection: Space during an ordinary path's handle drag repositions its anchor and handles, including a Pen loan (#7237, request 3 only; scores and estimates unchanged); previously: Floating panels keep their window level while focus moves between the app's windows, so a press on one panel's bar no longer hands the keyboard to another, #6986; scores and estimates unchanged; previously minor: Lock Guides: a selection marquee (Selection, Direct Selection, Group Selection, Enclosing Lasso) leaves out paths made into guides inside groups and compound paths too, as clicks do (#3074), so a group is no longer selected by a locked guide in it; an enclosing marquee measures a group without its locked or hidden guides, and Direct Selection takes no anchor or segment of a guide that can't be picked; a guide in a group still moves with its group (#8538); scores and estimates unchanged; previously: Production Preflight: output-aware fonts, text overflow, linked files and effective image resolution, clickable findings and automatic rechecking; scores and estimates unchanged; previously: Layers panel: an Alt-drag copies a row above or below itself, so the top layer dragged up, the bottom layer dragged down and a lone layer are copied, #8237; scores and estimates unchanged; previously: Layers panel: Alt over the list shows the copy cursor while rows or the selected-art square are dragged, #8217; scores and estimates unchanged; previously: Gradient panel: the add-stop strip under the ramp shows the white arrow with a plus on Windows and X11, #8241; scores and estimates unchanged; previously: Recolor Artwork follow-up (#8031, remaining #4028): native Lab input, picker swatch libraries and Assign-row menus; UI interaction regression coverage; scores and estimates unchanged; previously: Eraser review: hidden Rasterize and Along/Across stroke rows do not block preserving visible gradients; scores and estimates unchanged; previously: Eraser review: ordinary Group/Layer paints and reproducible evaluated gradient placements are preserved; other placements retain existing fitting; scores and estimates unchanged; previously: Eraser: shared fill-only area cutting for fixed and varied tips and the Alt-drag marquee, #6582; scores and estimates unchanged; previously: #8005: the Color spectrum fills a resized panel; scores and estimates unchanged; previously: Pencil continuation, straight-line and closing cursors; scores and estimates unchanged; previously: Graphic Styles list fills a taller panel, #2992; scores and estimates unchanged; previously: library panels' lists fill a taller panel, #2992; scores and estimates unchanged; previously: Swatches list fills a taller panel, #1638; scores and estimates unchanged; previously: icon-strip flyouts also resize from the top edge and the canvas-side top corner, keeping the moved top in workspaces (storytold/craft-libs#1094); scores and estimates unchanged; previously: macOS: the canvas cursor stays after the pointer moves, #6362; scores and estimates unchanged; previously minor: Remove Background in the Contextual Task Bar, Properties › Quick Actions and the Control bar; previously minor: Ruler origin: the corner drag snaps as a drawn point does; previously minor: Live Paint Bucket fills faces crossed in one drag (#6373); previously: #6404: transform-aware Eyedropper character copying; scores and estimates unchanged; previously: Outline view: images and gradient meshes are picked on what Outline draws, so a click inside them reaches the path behind, #6437; previously minor: a middle-click on a document tab closes it, #6506; previously minor: Blob Brush: a round tip's preview is the outline of the area it adds, round at both ends, as the stroke it commits (#4343); scores and estimates unchanged; previously:; ruler double-click adds a guide at the pointer, #5239; G5: Inventory Icons built-in symbol library (four built-ins); previously minor: files that record no units open in Preferences › Units › General, #5820; previously minor: interim macOS cursor delivery, #2292; native validation pending; scores and estimates unchanged; Control bar Line truncated
|
||||
>
|
||||
> Tech Circuit update (2026-11-14): three original procedural brushes; ten built-in brush libraries (G5).
|
||||
>
|
||||
|
||||
Reference in new issue
Block a user