Merge pull request #2357 from dotCooCoo/feat/simplify-more-options

Simplify: add Corner Point Angle Threshold, Convert to Straight Lines and Show Original Path
This commit is contained in:
BFlat authored and GitHub committed 2026-10-16 15:44:09 +07:00
commit fec2ac402b
26 files changed
+214 -6

No files matched your search

+14
View File
@@ -460,6 +460,7 @@ pub fn show(app: &mut VectorcraftApp, ui: &mut Ui) {
if app.session.active().is_some_and(|d| d.print_tiling) || app.session.tool_id() == "printTiling" {
print_tiling_overlay(app, &painter, &xf);
}
original_path_overlay(app, &painter, &xf);
// Selection visuals and tool overlays.
let revolve_edit = app.ui.dialog.as_ref().is_some_and(crate::dialogs::revolve_gizmo::active);
@@ -1813,6 +1814,19 @@ fn thread_overlay(app: &VectorcraftApp, p: &egui::Painter, xf: &Xf) {
}
}
/// Simplify's Show Original Path: the paths its preview ran on, as they were before it, in a band
/// 3 screen points wide of their layer's color at 40%, under the selection's outlines. Nothing is drawn
/// when they have more than [`OVERLAY_MAX_ANCHORS`] anchor points.
fn original_path_overlay(app: &VectorcraftApp, p: &egui::Painter, xf: &Xf) {
let paths = crate::dialogs::path_ops::original_paths(app);
let Some(st) = app.session.active().filter(|_| paths.iter().map(|(_, path)| path.anchor_count()).sum::<usize>() <= OVERLAY_MAX_ANCHORS) else {
return;
};
for (id, path) in paths {
stroke_path(p, &path.to_bezpath(), xf, Stroke::new(3.0, c32(st.doc.layer_color(id)).gamma_multiply(0.4)));
}
}
/// The slices (unless View → Hide Slices): user and object slices outlined in the Slices
/// preferences' line colour, auto slices dashed and dimmer, each numbered at its top left (Show
/// Slice Numbers); selected slices have a bolder outline. The layout is cached per revision.
-1
View File
@@ -55,7 +55,6 @@ fn lengths(kind: &str) -> &'static [&'static str] {
"star" => &["radius1", "radius2"],
"lineSegment" => &["length"],
"offsetPath" => &["offset"],
"simplify" => &["tolerance"],
_ => &[],
}
}
+56 -2
View File
@@ -1,14 +1,25 @@
//! Path dialogs: Average, and Offset Path, Simplify and Split Into Grid with Preview.
use serde_json::{Value, json};
use vectorcraft_doc::Unit;
use vectorcraft_doc::{NodeId, NodeKind, Unit};
use vectorcraft_geom::PathData;
use super::{DialogSpec, form, run_and_close};
use crate::VectorcraftApp;
use crate::state::Dialog;
use crate::theme::Tokens;
pub(super) const SPEC: DialogSpec = DialogSpec { heading: |d| title(&d.kind).into(), body, confirm, preview: true, ..DialogSpec::FORM };
/// Simplify's Corner Point Angle Threshold when the dialog opens, in degrees. An anchor whose
/// corner is sharper than the threshold stays a corner, so a higher threshold keeps more corners.
/// The command's `cornerAngle` is the turn above which an anchor stays a corner, so the dialog
/// sends 180° less the threshold: 150° sends `object.path.simplify`'s default of 30°.
pub(crate) const ANGLE_THRESHOLD: f64 = 150.0;
/// The field where Simplify keeps the ids of the paths its last preview ran on.
const ORIGINAL_IDS: &str = "__ids";
fn title(kind: &str) -> &'static str {
match kind {
"average" => tl!("Average"),
@@ -25,7 +36,10 @@ fn command(d: &Dialog) -> (&'static str, Value) {
"offsetPath" => {
("object.path.offsetPath", json!({"offset": d.f64("offset", 10.0), "joins": d.str("joins"), "miterLimit": d.f64("miterLimit", 4.0)}))
}
"simplify" => ("object.path.simplify", json!({"tolerance": d.f64("tolerance", 1.0)})),
"simplify" => {
let turn = 180.0 - d.f64("angleThreshold", ANGLE_THRESHOLD).clamp(0.0, 180.0);
("object.path.simplify", json!({"tolerance": d.f64("tolerance", 1.0), "cornerAngle": turn, "straightLines": d.bool("straightLines")}))
}
_ => ("object.path.splitIntoGrid", form::params(d)),
}
}
@@ -87,10 +101,48 @@ fn split_grid(ui: &mut egui::Ui, d: &mut Dialog, unit: Unit) {
form::check(ui, d, "addGuides", tl!("Add Guides"));
}
/// Simplify's fields: Tolerance, Corner Point Angle Threshold (its label above a slider from 0° on
/// the left, the smoothest, to 180°, the sharpest), Convert to Straight Lines and Show Original
/// Path.
fn simplify_fields(ui: &mut egui::Ui, d: &mut Dialog, unit: Unit) {
let rail = Tokens::get(ui.ctx()).input_border;
egui::Grid::new("dlg").num_columns(2).spacing([10.0, 8.0]).show(ui, |ui| {
form::length_field(ui, d, "tolerance", &form::humanized("tolerance"), unit);
});
ui.add_space(8.0);
form::row_label(ui, tl!("Corner Point Angle Threshold:"));
ui.horizontal(|ui| form::slider_field(ui, d, "angleThreshold", 0.0..=180.0, "°", &|_| rail));
ui.add_space(8.0);
form::check(ui, d, "straightLines", tl!("Convert to Straight Lines"));
form::check(ui, d, "showOriginal", tl!("Show Original Path"));
}
/// Simplify's Show Original Path: while the dialog previews with it on, every path the preview ran
/// on, with its id, as it was before the preview (from the interaction's snapshot). Empty
/// otherwise.
pub(crate) fn original_paths(app: &VectorcraftApp) -> Vec<(NodeId, &PathData)> {
let Some(d) = app.ui.dialog.as_ref().filter(|d| d.kind == "simplify" && d.bool("showOriginal") && d.bool("preview")) else { return vec![] };
let (Some(ids), Some(it)) = (d.fields.get(ORIGINAL_IDS).and_then(Value::as_array), app.session.active().and_then(|st| st.interaction.as_ref()))
else {
return vec![];
};
ids.iter()
.filter_map(|id| {
let id = NodeId(id.as_u64()?);
match &it.doc.node(id)?.kind {
NodeKind::Path { path, .. } => Some((id, path)),
_ => None,
}
})
.collect()
}
fn body(app: &mut VectorcraftApp, ui: &mut egui::Ui, d: &mut Dialog) -> bool {
let unit = app.session.general_unit();
if d.kind == "splitIntoGrid" {
split_grid(ui, d, unit);
} else if d.kind == "simplify" {
simplify_fields(ui, d, unit);
} else {
form::grid(ui, d, unit);
}
@@ -98,11 +150,13 @@ fn body(app: &mut VectorcraftApp, ui: &mut egui::Ui, d: &mut Dialog) -> bool {
let (id, params) = command(d);
if d.fields.get(form::PREVIEWED) != Some(&params) || !d.bool("preview") {
d.fields.remove("__counts");
d.fields.remove(ORIGINAL_IDS);
}
if let Some(r) = form::preview_result(app, ui, d, label, id, params)
&& d.kind == "simplify"
{
d.fields.insert("__counts".into(), json!({"before": r["before"], "after": r["after"]}));
d.fields.insert(ORIGINAL_IDS.into(), r["ids"].clone());
}
if d.kind == "simplify"
&& d.bool("preview")
+80
View File
@@ -297,6 +297,86 @@ fn simplify_dialog_ok_keeps_exactly_one_undo_with_or_without_preview() {
}
}
/// Whether every segment of every path in `app`'s document is straight (false with no segments).
fn only_straight_segments(app: &VectorcraftApp) -> bool {
let mut lines = vec![];
app.session.doc().unwrap().doc.walk(|n| {
if let vectorcraft_doc::NodeKind::Path { path, .. } = &n.kind {
for sp in &path.subpaths {
lines.extend((0..sp.segment_count()).map(|i| sp.segment_is_line(i)));
}
}
});
!lines.is_empty() && lines.iter().all(|l| *l)
}
/// Simplify's dialog sends Corner Point Angle Threshold and Convert to Straight Lines with the
/// tolerance, and ticking Convert to Straight Lines previews straight segments only.
#[test]
fn simplify_dialog_sends_corner_angle_and_straight_lines() {
let (ctx, mut app) = (ctx(), app_with_selection());
app.run("shape.ellipse", json!({"x": 100, "y": 200, "width": 160, "height": 90})).unwrap();
crate::menus::invoke(&mut app, "object.path.simplify", json!({}));
settle(&ctx, &mut app);
let texts = frame(&ctx, &mut app, vec![]);
assert!(texts.iter().any(|(t, _)| t == "Corner Point Angle Threshold:"), "{texts:?}");
let previewed = |app: &VectorcraftApp| app.session.doc().unwrap().interaction.as_ref().and_then(|it| it.preview.clone()).expect("a preview").1;
assert_eq!((&previewed(&app)["cornerAngle"], &previewed(&app)["straightLines"]), (&json!(30.0), &json!(false)));
assert!(!only_straight_segments(&app), "the fit keeps the ellipse's curves");
let straight = texts.iter().find(|(t, _)| t == "Convert to Straight Lines").map(|(_, r)| *r).expect("a Convert to Straight Lines checkbox");
click(&ctx, &mut app, straight.center());
assert_eq!(previewed(&app)["straightLines"], json!(true));
assert!(only_straight_segments(&app), "Convert to Straight Lines previews straight segments only");
// A higher threshold keeps more corners: the command's turn angle goes down as it goes up.
app.ui.dialog.as_mut().unwrap().fields.insert("angleThreshold".into(), json!(170));
frame(&ctx, &mut app, vec![]);
assert_eq!(previewed(&app)["cornerAngle"], json!(10.0));
confirm(&mut app).unwrap();
assert!(only_straight_segments(&app), "OK keeps the straight segments");
}
/// Corner Point Angle Threshold: an octagon's 135° corners stay corners at the 150° the dialog opens
/// with, and a threshold below 135° smooths them into curves.
#[test]
fn simplify_dialog_corner_point_angle_threshold_keeps_or_smooths_corners() {
let (ctx, mut app) = (ctx(), app_with_selection());
app.run("edit.clear", json!({})).unwrap();
app.run("shape.polygon", json!({"cx": 200, "cy": 200, "radius": 100, "sides": 8})).unwrap();
crate::menus::invoke(&mut app, "object.path.simplify", json!({}));
app.ui.dialog.as_mut().unwrap().fields.insert("tolerance".into(), json!("10 pt"));
settle(&ctx, &mut app);
assert!(only_straight_segments(&app), "the corners stay and the sides stay straight");
app.ui.dialog.as_mut().unwrap().fields.insert("angleThreshold".into(), json!(120));
frame(&ctx, &mut app, vec![]);
assert!(!only_straight_segments(&app), "the corners are smoothed into curves");
}
/// Show Original Path: while Simplify previews with it on, the canvas outlines the paths as they
/// were before the preview.
#[test]
fn simplify_dialog_show_original_path_outlines_the_paths_before_the_preview() {
let (ctx, mut app) = (ctx(), app_with_dense_path());
let st = app.session.doc().unwrap();
let (id, original) = match st.doc.node(st.selection.objects[0]).map(|n| (n.id, &n.kind)) {
Some((id, vectorcraft_doc::NodeKind::Path { path, .. })) => (id, path.clone()),
_ => panic!("a path is selected"),
};
crate::menus::invoke(&mut app, "object.path.simplify", json!({}));
settle(&ctx, &mut app);
let texts = frame(&ctx, &mut app, vec![]);
assert!(super::path_ops::original_paths(&app).is_empty(), "Show Original Path is off as the dialog opens");
let show = texts.iter().find(|(t, _)| t == "Show Original Path").map(|(_, r)| *r).expect("a Show Original Path checkbox");
click(&ctx, &mut app, show.center());
assert_eq!(super::path_ops::original_paths(&app), vec![(id, &original)]);
let simplified = app.session.doc().unwrap().doc.node(id).map(|n| n.kind.clone());
assert!(!matches!(simplified, Some(vectorcraft_doc::NodeKind::Path { path, .. }) if path == original), "the preview changed the path");
let preview = frame(&ctx, &mut app, vec![]).into_iter().find(|(t, _)| t == "Preview").map(|(_, r)| r).expect("a Preview checkbox");
click(&ctx, &mut app, preview.center());
assert!(super::path_ops::original_paths(&app).is_empty(), "nothing to compare with while Preview is off");
cancel(&mut app);
assert!(super::path_ops::original_paths(&app).is_empty());
}
#[test]
fn printer_mark_labels_are_distinct_from_language_names() {
let cs = crate::i18n::Lang::from_code("cs").unwrap();
+3
View File
@@ -561,6 +561,7 @@
Convert to RGB Конвертиране в RGB
Convert to Shape Конвертиране в фигура
Convert to sRGB Конвертиране в sRGB
Convert to Straight Lines Преобразуване в прави линии
Convert: Конвертиране:
Copied the CSS of {rules} object(s) Копиран е CSS кодът на {rules} обект(а)
Copies: Копия:
@@ -579,6 +580,7 @@
Copyright Notice: Бележка за авторското право:
Copyright Status: Статус на авторското право:
Copyright Symbol Символ за авторско право
Corner Point Angle Threshold: Праг на ъгъла при ъгловите точки:
Corner Radius Радиус на ъгъла
Corner Radius: Радиус на ъгъла:
Corner: Ъгъл:
@@ -2709,6 +2711,7 @@
Show Modified Показване на променените
Show Note Показване на бележка
Show Options Показване на опциите
Show Original Path Показване на оригиналния път
Show Package Показване на пакет
Show Panel Показване на панел
Show Pattern Swatches Показване на образци за мостра
Can't render this file because it contains an unexpected character in line 2 and column 73.
+3
View File
@@ -1581,6 +1581,9 @@ lighting Light Světlo
Updated {} image(s) Aktualizováno obrázků: {}
Break Link Zrušit propojení
Tolerance: Tolerance:
Corner Point Angle Threshold: Prahový úhel rohových bodů:
Convert to Straight Lines Převést na přímé čáry
Show Original Path Zobrazit původní cestu
Transparency Options Možnosti průhlednosti
Color Mixer (Shift-click the chip) Míchání barev (Shift+kliknutí na políčko)
Fill: click for swatches, Shift-click for the color mixer Výplň: kliknutím otevřete vzorník, Shift+kliknutím míchání barev
Can't render this file because it contains an unexpected character in line 2 and column 73.
+3
View File
@@ -561,6 +561,7 @@
Convert to RGB In RGB konvertieren
Convert to Shape In Form umwandeln
Convert to sRGB In sRGB konvertieren
Convert to Straight Lines In gerade Linien umwandeln
Convert: Konvertieren:
Copied the CSS of {rules} object(s) CSS von {rules} Objekt(en) kopiert
Copies: Kopien:
@@ -579,6 +580,7 @@
Copyright Notice: Copyright-Vermerk:
Copyright Status: Copyright-Status:
Copyright Symbol Copyright-Symbol
Corner Point Angle Threshold: Winkelschwelle für Eckpunkte:
Corner Radius Eckenradius
Corner Radius: Eckenradius:
Corner: Ecke:
@@ -2718,6 +2720,7 @@
Show Modified Geänderte einblenden
Show Note Notiz einblenden
Show Options Optionen einblenden
Show Original Path Originalpfad einblenden
Color Panel Options Optionen für das Farbbedienfeld
Show Package Paket anzeigen
Show Panel Bedienfeld einblenden
Can't render this file because it contains an unexpected character in line 2 and column 73.
+3
View File
@@ -535,6 +535,7 @@
Convert to RGB Μετατροπή σε RGB
Convert to Shape Μετατροπή σε σχήμα
Convert to sRGB Μετατροπή σε sRGB
Convert to Straight Lines Μετατροπή σε ευθείες γραμμές
Convert: Μετατροπή:
Copied the CSS of {rules} object(s) Αντιγράφηκαν οι κανόνες CSS από {rules} αντικείμενα
Copies: Αντίγραφα:
@@ -553,6 +554,7 @@
Copyright Notice: Σημείωση πνευματικών δικαιωμάτων:
Copyright Status: Κατάσταση πνευματικών δικαιωμάτων:
Copyright Symbol Σύμβολο πνευματικών δικαιωμάτων
Corner Point Angle Threshold: Όριο γωνίας γωνιακών σημείων:
Corner Radius Ακτίνα γωνίας
Corner Radius: Ακτίνα γωνίας:
Corner: Γωνία:
@@ -3141,6 +3143,7 @@ theme Appearance Εμφάνιση
Show Modified Εμφάνιση τροποποιημένων
Show Note Εμφάνιση σημείωσης
Show Options Εμφάνιση επιλογών
Show Original Path Εμφάνιση αρχικής διαδρομής
Show Package Εμφάνιση συσκευασίας
Show Panel Εμφάνιση πίνακα
Show Pattern Swatches Εμφάνιση δειγμάτων μοτίβου
Can't render this file because it contains an unexpected character in line 1861 and column 19.
+3
View File
@@ -576,6 +576,7 @@
Convert to RGB Convertir a RGB
Convert to Shape Convertir en forma
Convert to sRGB Convertir a sRGB
Convert to Straight Lines Convertir en líneas rectas
Convert: Convertir:
Copied the CSS of {rules} object(s) Se copió el CSS de {rules} objeto(s)
Copies: Copias:
@@ -594,6 +595,7 @@
Copyright Notice: Aviso de copyright:
Copyright Status: Estado de copyright:
Copyright Symbol Símbolo de copyright
Corner Point Angle Threshold: Umbral de ángulo de los puntos de esquina:
Corner Radius Radio de esquina
Corner Radius: Radio de esquina:
Corner: Esquina:
@@ -2766,6 +2768,7 @@
Show Modified Mostrar modificados
Show Note Mostrar nota
Show Options Mostrar opciones
Show Original Path Mostrar trazado original
Color Panel Options Opciones del panel Color
Show Package Mostrar paquete
Show Panel Mostrar panel
Can't render this file because it contains an unexpected character in line 2 and column 73.
+3
View File
@@ -1544,6 +1544,9 @@ lighting Light Valo
Updated {} image(s) Päivitetty {} kuva(a)
Break Link Katkaise linkki
Tolerance: Toleranssi:
Corner Point Angle Threshold: Kulmapisteiden kulmakynnys:
Convert to Straight Lines Muunna suoriksi viivoiksi
Show Original Path Näytä alkuperäinen polku
Transparency Options Läpinäkyvyysasetukset
Color Mixer (Shift-click the chip) Värisekoitin (Vaihto-napsauta värilaattaa)
Fill: click for swatches, Shift-click for the color mixer Täyttö: napsauta avataksesi värimallit, Vaihto-napsauta avataksesi värisekoittimen
Can't render this file because it contains an unexpected character in line 2 and column 73.
+3
View File
@@ -577,6 +577,7 @@
Convert to RGB Convertir en RVB
Convert to Shape Convertir en forme
Convert to sRGB Convertir en sRGB
Convert to Straight Lines Convertir en lignes droites
Convert: Convertir :
Copied the CSS of {rules} object(s) CSS copié pour {rules} objet(s)
Copies: Copies :
@@ -595,6 +596,7 @@
Copyright Notice: Mention de copyright :
Copyright Status: État du copyright :
Copyright Symbol Symbole de copyright
Corner Point Angle Threshold: Seuil d’angle des sommets :
Corner Radius Rayon de l’angle
Corner Radius: Rayon de l’angle :
Corner: Angle :
@@ -2763,6 +2765,7 @@
Show Modified Afficher les éléments modifiés
Show Note Afficher la note
Show Options Afficher les options
Show Original Path Afficher le tracé d’origine
Color Panel Options Options du panneau Couleur
Show Package Afficher le dossier d’assemblage
Show Panel Afficher le panneau
Can't render this file because it contains an unexpected character in line 2 and column 73.
+3
View File
@@ -765,6 +765,7 @@
Convert to RGB Átalakítás RGB-re
Convert to Shape Átalakítás alakzattá
Convert to sRGB Átalakítás sRGB-re
Convert to Straight Lines Átalakítás egyenes vonalakká
Convert: Átalakítás:
Cool Hideg
Copied the CSS of {rules} object(s) CSS másolva, objektumok: {rules}
@@ -789,6 +790,7 @@
Copyright Symbol Szerzői jogi jel
Copyrighted Szerzői jogvédett
Corner Sarok
Corner Point Angle Threshold: Sarokpontok szögküszöbe:
Corner Radius Sarokkerekítés sugara
Corner Radius: Sarokkerekítés sugara:
Corner: Sarok:
@@ -3350,6 +3352,7 @@
Show Modified Módosultak megjelenítése
Show Note Megjegyzés megjelenítése
Show Options Beállítások megjelenítése
Show Original Path Eredeti útvonal megjelenítése
Color Panel Options Szín panel beállításai
Show Package Csomag megjelenítése
Show Panel Panel megjelenítése
Can't render this file because it contains an unexpected character in line 2 and column 73.
+3
View File
@@ -576,6 +576,7 @@
Convert to RGB Converti in RGB
Convert to Shape Converti in forma
Convert to sRGB Converti in sRGB
Convert to Straight Lines Converti in linee rette
Convert: Converti:
Copied the CSS of {rules} object(s) CSS copiato da {rules} oggetto/i
Copies: Copie:
@@ -594,6 +595,7 @@
Copyright Notice: Nota sul copyright:
Copyright Status: Stato copyright:
Copyright Symbol Simbolo di copyright
Corner Point Angle Threshold: Soglia angolo dei punti d'angolo:
Corner Radius Raggio angolo
Corner Radius: Raggio angolo:
Corner: Angolo:
@@ -2769,6 +2771,7 @@
Show Modified Mostra modificati
Show Note Mostra nota
Show Options Mostra opzioni
Show Original Path Mostra tracciato originale
Color Panel Options Opzioni pannello Colore
Show Package Mostra pacchetto
Show Panel Mostra pannello
Can't render this file because it contains an unexpected character in line 2 and column 73.
+3
View File
@@ -1093,6 +1093,7 @@
Convert Process to Global プロセスカラーをグローバルに変換
Convert text to outlines テキストをアウトラインに変換
Convert to sRGB sRGB に変換
Convert to Straight Lines 直線に変換
Copies: コピー:
Copy (make a transformed copy) コピー (変形したコピーを作成)
Copy All Styles すべてのスタイルをコピー
@@ -1104,6 +1105,7 @@
Copyright Info URL: 著作権情報の URL:
Copyright Notice: 著作権表示:
Copyright Status: 著作権の状態:
Corner Point Angle Threshold: コーナーポイントの角度のしきい値:
Corner Radius 角の半径
Corner Radius: 角丸の半径:
Corner: 角の形状:
@@ -2585,6 +2587,7 @@
Show List View リスト表示
Show Note メモを表示
Show Options オプションを表示
Show Original Path 元のパスを表示
Color Panel Options カラーパネルオプション
Show Package パッケージを表示
Show Panel パネルを表示
Can't render this file because it contains an unexpected character in line 2 and column 73.
+3
View File
@@ -1088,6 +1088,7 @@
Convert Process to Global 프로세스 색상을 글로벌로 변환
Convert text to outlines 문자를 윤곽선으로 변환
Convert to sRGB sRGB로 변환
Convert to Straight Lines 직선으로 변환
Copies: 매수:
Copy (make a transformed copy) 복사(변형된 복사본 만들기)
Copy All Styles 모든 스타일 복사
@@ -1099,6 +1100,7 @@
Copyright Info URL: 저작권 정보 URL:
Copyright Notice: 저작권 고지:
Copyright Status: 저작권 상태:
Corner Point Angle Threshold: 모퉁이 포인트 각도 임계값:
Corner Radius 모퉁이 반지름
Corner Radius: 모퉁이 반지름:
Corner: 모퉁이:
@@ -2579,6 +2581,7 @@
Show List View 목록 보기 표시
Show Note 메모 표시
Show Options 옵션 표시
Show Original Path 원래 패스 표시
Color Panel Options 색상 패널 옵션
Show Package 패키지 표시
Show Panel 패널 표시
Can't render this file because it contains an unexpected character in line 2 and column 73.
+3
View File
@@ -1494,6 +1494,9 @@ lighting Light Światło
Updated {} image(s) Zaktualizowane obrazy: {}
Break Link Zerwij łącze
Tolerance: Tolerancja:
Corner Point Angle Threshold: Próg kąta punktów narożnych:
Convert to Straight Lines Konwertuj na linie proste
Show Original Path Pokaż oryginalną ścieżkę
Transparency Options Opcje przezroczystości
Color Mixer (Shift-click the chip) Mikser kolorów (kliknij próbkę z Shift)
Fill: click for swatches, Shift-click for the color mixer Wypełnienie: kliknij, aby wybrać próbkę, z Shift — mikser kolorów
Can't render this file because it contains an unexpected character in line 2 and column 73.
+3
View File
@@ -527,6 +527,7 @@
Convert to RGB Converter para RGB
Convert to Shape Converter em Forma
Convert to sRGB Converter para sRGB
Convert to Straight Lines Converter em Linhas Retas
Copies: Cópias:
Copy Copiar
Copy (make a transformed copy) Copiar (fazer uma cópia transformada)
@@ -540,6 +541,7 @@
Copyright Notice: Aviso de Direitos Autorais:
Copyright Status: Status de Direitos Autorais:
Copyright Symbol Símbolo de Direitos Autorais
Corner Point Angle Threshold: Limite de Ângulo dos Pontos de Canto:
Corner Radius Raio do Canto
Corner Radius: Raio do Canto:
Corner: Canto:
@@ -2274,6 +2276,7 @@
Show List View Mostrar Exibição de Lista
Show Note Mostrar Nota
Show Options Mostrar Opções
Show Original Path Mostrar Caminho Original
Show Package Mostrar Pacote
Show Panel Mostrar Painel
Show Perspective Grid Mostrar Grade de Perspectiva
Can't render this file because it contains an unexpected character in line 6 and column 47.
+3
View File
@@ -574,6 +574,7 @@
Convert to RGB Преобразовать в RGB
Convert to Shape Преобразовать в фигуру
Convert to sRGB Преобразовать в sRGB
Convert to Straight Lines Преобразовать в прямые линии
Convert: Преобразовать:
Copied the CSS of {rules} object(s) Скопирован CSS для {rules} объекта(ов)
Copies: Копии:
@@ -592,6 +593,7 @@
Copyright Notice: Уведомление об авторских правах:
Copyright Status: Статус авторских прав:
Copyright Symbol Символ авторского права
Corner Point Angle Threshold: Пороговый угол угловых точек:
Corner Radius Радиус угла
Corner Radius: Радиус угла:
Corner: Угол:
@@ -2765,6 +2767,7 @@
Show Modified Показать изменённые
Show Note Показать примечание
Show Options Показать параметры
Show Original Path Показать исходный контур
Color Panel Options Параметры панели «Цвет»
Show Package Показать пакет
Show Panel Показать панель
Can't render this file because it contains an unexpected character in line 2 and column 73.
+3
View File
@@ -563,6 +563,7 @@
Convert to RGB Konvertera till RGB
Convert to Shape Konvertera till form
Convert to sRGB Konvertera till sRGB
Convert to Straight Lines Konvertera till raka linjer
Convert: Konvertera:
Copied the CSS of {rules} object(s) Kopierade CSS för {rules} objekt
Copies: Kopior:
@@ -581,6 +582,7 @@
Copyright Notice: Upphovsrättsmeddelande:
Copyright Status: Upphovsrättsstatus:
Copyright Symbol Upphovsrättssymbol
Corner Point Angle Threshold: Vinkeltröskel för hörnpunkter:
Corner Radius Hörnradie
Corner Radius: Hörnradie:
Corner: Hörn:
@@ -2709,6 +2711,7 @@
Show Modified Visa ändrade
Show Note Visa anteckning
Show Options Visa alternativ
Show Original Path Visa ursprunglig bana
Show Package Visa paket
Show Panel Visa panel
Show Pattern Swatches Visa mönsterprover
Can't render this file because it contains an unexpected character in line 5 and column 25.
+3
View File
@@ -570,6 +570,7 @@
Convert to RGB Перетворити на RGB
Convert to Shape Перетворити на фігуру
Convert to sRGB Перетворити на sRGB
Convert to Straight Lines Перетворити на прямі лінії
Convert: Перетворити:
Copied the CSS of {rules} object(s) Скопійовано CSS об’єктів: {rules}
Copies: Копії:
@@ -588,6 +589,7 @@
Copyright Notice: Повідомлення про авторські права:
Copyright Status: Статус авторських прав:
Copyright Symbol Символ авторського права
Corner Point Angle Threshold: Пороговий кут кутових точок:
Corner Radius Радіус кута
Corner Radius: Радіус кута:
Corner: Кут:
@@ -2761,6 +2763,7 @@
Show Modified Показати змінені
Show Note Показати примітку
Show Options Показати параметри
Show Original Path Показати початковий контур
Color Panel Options Параметри панелі «Колір»
Show Package Показати пакет
Show Panel Показати панель
Can't render this file because it contains an unexpected character in line 720 and column 40.
+3
View File
@@ -667,6 +667,7 @@
Convert to RGB Chuyển sang RGB
Convert to Shape Chuyển thành hình dạng
Convert to sRGB Chuyển sang sRGB
Convert to Straight Lines Chuyển thành đường thẳng
Convert: Chuyển đổi:
Copied the CSS of {rules} object(s) Đã sao chép CSS của {rules} đối tượng
Copies: Bản sao:
@@ -689,6 +690,7 @@
Copyright Status: Trạng thái bản quyền:
Copyright Symbol Ký hiệu bản quyền
Corner Góc
Corner Point Angle Threshold: Ngưỡng góc của điểm góc:
Corner Radius Bán kính góc
Corner Radius: Bán kính góc:
Corner: Góc:
@@ -3074,6 +3076,7 @@
Show Modified Hiện đã sửa đổi
Show Note Hiện ghi chú
Show Options Hiện tùy chọn
Show Original Path Hiện đường dẫn gốc
Color Panel Options Tùy chọn bảng màu
Show Package Hiện gói
Show Panel Hiện bảng
1 # Vietnamese (vi) catalog. Same format as zh-hant.tsv: context <TAB> source <TAB> translation
667
668
669
670
671
672
673
690
691
692
693
694
695
696
3076
3077
3078
3079
3080
3081
3082
+3
View File
@@ -531,6 +531,7 @@
Convert to RGB 转换为 RGB
Convert to Shape 转换为形状
Convert to sRGB 转换为 sRGB
Convert to Straight Lines 转换为直线
Convert: 转换:
Copied the CSS of {rules} object(s) 已复制 {rules} 个对象的 CSS
Copies: 份数:
@@ -549,6 +550,7 @@
Copyright Notice: 版权声明:
Copyright Status: 版权状态:
Copyright Symbol 著作权符号
Corner Point Angle Threshold: 尖角点角度阈值:
Corner Radius 圆角半径
Corner Radius: 圆角半径:
Corner: 转角:
@@ -2612,6 +2614,7 @@
Show Modified 显示已修改
Show Note 显示注解
Show Options 显示选项
Show Original Path 显示原始路径
Color Panel Options 颜色面板选项
Show Package 显示打包
Show Panel 显示面板
Can't render this file because it contains an unexpected character in line 2 and column 73.
+3
View File
@@ -545,6 +545,7 @@
Convert to RGB 轉換為 RGB
Convert to Shape 轉換為形狀
Convert to sRGB 轉換為 sRGB
Convert to Straight Lines 轉換為直線
Convert: 轉換:
Copied the CSS of {rules} object(s) 已複製 {rules} 個物件的 CSS
Copies: 份數:
@@ -563,6 +564,7 @@
Copyright Notice: 著作權聲明:
Copyright Status: 著作權狀態:
Copyright Symbol 著作權符號
Corner Point Angle Threshold: 尖角點角度臨界值:
Corner Radius 圓角半徑
Corner Radius: 圓角半徑:
Corner: 轉角:
@@ -2742,6 +2744,7 @@
Show Modified 顯示已修改
Show Note 顯示註解
Show Options 顯示選項
Show Original Path 顯示原始路徑
Color Panel Options 顏色面板選項
Show Package 顯示封裝
Show Panel 顯示面板
Can't render this file because it contains an unexpected character in line 6 and column 47.
+4 -1
View File
@@ -3264,7 +3264,10 @@ fn menu_dialog(app: &VectorcraftApp, id: &str) -> Option<(&'static str, Value)>
// Offset Path opens on the values it was last confirmed with.
"object.path.offsetPath" if app.ui.offset_path.is_object() => ("offsetPath", app.ui.offset_path.clone()),
"object.path.offsetPath" => ("offsetPath", json!({"offset": "10 pt", "joins": "miter", "miterLimit": 4})),
"object.path.simplify" => ("simplify", json!({"tolerance": "1 pt", "preview": true})),
"object.path.simplify" => (
"simplify",
json!({"tolerance": "1 pt", "angleThreshold": crate::dialogs::path_ops::ANGLE_THRESHOLD, "straightLines": false, "showOriginal": false, "preview": true}),
),
"object.path.splitIntoGrid" => {
// The grid starts at the size of the selection.
let size =
+2 -1
View File
@@ -537,8 +537,9 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur
- Scribble (Effect › Stylize › Scribble…) has a Variation for each of Path Overlap, Curviness and Spacing ([Scribble options](https://helpx.adobe.com/illustrator/using/creating-sketches-mosaics.html)) (`overlapVariation`, `curvinessVariation`, `spacingVariation`), shown in its dialog and in the Appearance panel. A Scribble saved with the earlier single `variation` reads it as the Path Overlap and Spacing variations and draws as before. The angle is stored above -180° and up to 180°, so 270° is stored as -90°.
- **Simplify feedback and component selection (#1272):** the existing tolerance dialog previews from the original interaction snapshot and shows original/new anchor counts. Preview off and Cancel restore the document and selection; OK is one Undo. A refit or Add Anchor Points clears component indexes only on paths whose geometry changes, keeping their objects selected whole and unchanged paths' components intact. Engine and real-egui frame regressions cover document/selection restoration and grouped paths.
Public references: [Simplify benefits](https://helpx.adobe.com/illustrator/desktop/draw-shapes-and-paths/modify-paths/simplify-path-benefits.html) and [advanced options](https://helpx.adobe.com/illustrator/desktop/draw-shapes-and-paths/modify-paths/simplify-paths-advanced-options-overview.html).
Nearly unchanged appearance is expected when reducing points. Percentage/auto-simplify controls, the corner-angle UI and Show Original are not implemented; the checklist is partial, without raising scores.
Nearly unchanged appearance is expected when reducing points. Percentage/auto-simplify controls and Retain my latest settings are not implemented; the checklist is partial, without raising scores.
Simplify and Add Anchor Points record no undo step when they change no path, and a path they leave as it is keeps its live shape.
The Simplify dialog also has Corner Point Angle Threshold, Convert to Straight Lines and Show Original Path. The threshold is a slider from 0° to 180° and opens at 150°: an anchor whose corner is sharper than the threshold stays a corner, so moving the slider right keeps more corners, and the dialog sends `cornerAngle` as 180° less the threshold. While Preview is on, Show Original Path draws the paths as they were before the preview in a wide, faint band of their layer's color under the selection's outlines.
- **Type:** Character size, leading, baseline shift and horizontal-scale controls account for object/group transforms (#1034): exact document-point sizes, mixed-value display and keyboard increments, range edits, resettable horizontal stretch, undo/redo and native save/reopen (`tests_typescale`, Character panel tests). Point size is the transformed em-height axis, independent of glyph ink bounds; affine rotation, reflection and shear are retained. Group scaling still scales text; preserving font sizes is a separate enhancement. Behaviour reference: [Transform text](https://helpx.adobe.com/illustrator/desktop/design-with-text/edit-format-text/transform-text.html) (public documentation). Text Wrap, Type on a Path effects (Rainbow/Skew/3D Ribbon/Stair Step/Gravity) and Options (Flip, Align to Path, Spacing; OK keeps the type where it is), type on a path's start, centre and end brackets (Selection and Direct Selection drag them to set where the type runs, slide it along its path and, across the path, flip it: #429), Character and Paragraph Styles (override-preserving redefine), paragraph attributes per paragraph (alignment, indents, spacing, hyphenation, hanging punctuation, tab stops, paragraph style, direction, mojikumi and leading model; the Paragraph, Tabs and Paragraph Styles panels act on the paragraphs the Type tool's selection or caret touches, Return continues the paragraph's style, threads and SVG keep them), Area Type Options (rows/columns/inset/first baseline, vertical Align Top/Center/Bottom/Justify per row/column, reflowing non-rectangular frames and text wrap), threaded text across any closed shapes, Fit Headline, the Every-line Composer for justified and ragged text (paragraph-wide breaks for an even rag, Single-line per object from the Paragraph panel menu or `text.setFormat {composer}`). Area type resizes like Illustrator's type areas: a bounding-box handle drag (Selection tool) or Area Type Options Width/Height size the frame and the text reflows at its size (threads too); Direct Selection drags a frame corner or edge (`text.reshapeArea`). Point type still scales. Auto Size: the frame height follows the text after every edit, in the same undo step (rectangular frames of horizontal type in one row; columns get the least height that holds them; a height set by hand or threading turns it off), and the "Auto Size New Area Type" preference gives it to new area type. Shrink Text to Fit (beyond Illustrator): overflowing area type scales its sizes, leading and baseline shifts down by the largest factor (in 0.1 pt steps of the first run, down to a minimum percentage) that fits, at layout time so every export sees it. `text.areaOptions` and `document.inspect` report overflow and the shrink factor. The Selection tool shows the type widget beside selected type's bounding box (hollow on point type, filled on area type); double-clicking it converts between them (Type › Convert To Area Type / Convert To Point Type), keeping the text and its styles in place. Cmd+Shift+C (Align center) works on Windows and Linux too (#1940). Variable fonts list every named instance as a style of their family (Figtree Light to Black and their italics, Bahnschrift, Segoe UI Variable), and the instance chosen is shaped, drawn, outlined and measured at its axis settings; PDF and SVG embed it as that instance. Variation axis sliders are not done. Beyond Illustrator: inline graphics (`text.insertInline`, Type ▸ Insert Inline Symbol) set a document symbol in a run of type as one character that flows, wraps and justifies like a glyph (InDesign-style inline objects, e.g. mana symbols in card rules text): sized to a multiple of the font size, centred on the cap height, opening up tall lines, following Redefine Symbol; a character of its run's size for Character Alignment and Top-to-Top leading, placed by the bidi reordering in right-to-left text (a neutral U+FFFC); drawn on the canvas, kept as live text plus a `<use>` in SVG and as vector art in PDF; Backspace removes it whole. Hebrew and Arabic are laid out right to left with the Unicode bidirectional algorithm (embedded Latin and numbers keep their direction, lines put in visual order after wrapping) in point, area and path type, with caret, selection and arrow keys in visual order; each paragraph's direction comes from its first strong character unless Paragraph Direction sets it (Paragraph panel with Show Indic Options, `text.setFormat {direction}`), and new type aligns to the start of its direction. SVG export outlines right-to-left text. Arabic typefaces: builds made with a craft-fonts checkout that holds its Arabic families (Noto Sans Arabic, the Arabic fallback, plus Cairo, Tajawal, Almarai, IBM Plex Sans Arabic, Noto Kufi Arabic, Amiri, Alexandria, Fustat, Reem Kufi, Aref Ruqaa and Gulzar once craft-fonts adds them, storytold/craft-fonts#11; releases get them when their craft-fonts pin moves) list them in the font menus on desktop; the web build fetches them from beside tLine truncated
- **Type:** Character size, leading, baseline shift and horizontal-scale controls account for object/group transforms (#1034): exact document-point sizes, mixed-value display and keyboard increments, range edits, resettable horizontal stretch, undo/redo and native save/reopen (`tests_typescale`, Character panel tests). Point size is the transformed em-height axis, independent of glyph ink bounds; affine rotation, reflection and shear are retained. Group scaling still scales text; preserving font sizes is a separate enhancement. Behaviour reference: [Transform text](https://helpx.adobe.com/illustrator/desktop/design-with-text/edit-format-text/transform-text.html) (public documentation). Text Wrap, Type on a Path effects (Rainbow/Skew/3D Ribbon/Stair Step/Gravity) and Options (Flip, Align to Path, Spacing; OK keeps the type where it is), type on a path's start, centre and end brackets (Selection and Direct Selection drag them to set where the type runs, slide it along its path and, across the path, flip it: #429), Character and Paragraph Styles (override-preserving redefine), paragraph attributes per paragraph (alignment, indents, spacing, hyphenation, hanging punctuation, tab stops, paragraph style, direction, mojikumi and leading model; the Paragraph, Tabs and Paragraph Styles panels act on the paragraphs the Type tool's selection or caret touches, Return continues the paragraph's style, threads and SVG keep them), Area Type Options (rows/columns/inset/first baseline, vertical Align Top/Center/Bottom/Justify per row/column, reflowing non-rectangular frames and text wrap), threaded text across any closed shapes, Fit Headline, the Every-line Composer for justified and ragged text (paragraph-wide breaks for an even rag, Single-line per object from the Paragraph panel menu or `text.setFormat {composer}`). Area type resizes like Illustrator's type areas: a bounding-box handle drag (Selection tool) or Area Type Options Width/Height size the frame and the text reflows at its size (threads too); Direct Selection drags a frame corner or edge (`text.reshapeArea`). Point type still scales. Auto Size: the frame height follows the text after every edit, in the same undo step (rectangular frames of horizontal type in one row; columns get the least height that holds them; a height set by hand or threading turns it off), and the "Auto Size New Area Type" preference gives it to new area type. Shrink Text to Fit (beyond Illustrator): overflowing area type scales its sizes, leading and baseline shifts down by the largest factor (in 0.1 pt steps of the first run, down to a minimum percentage) that fits, at layout time so every export sees it. `text.areaOptions` and `document.inspect` report overflow and the shrink factor. The Selection tool shows the type widget beside selected type's bounding box (hollow on point type, filled on area type); double-clicking it converts between them (Type › Convert To Area Type / Convert To Point Type), keeping the text and its styles in place. A double-click on area type's bottom middle handle turns on Auto Size (#1940). Variable fonts list every named instance as a style of their family (Figtree Light to Black and their italics, Bahnschrift, Segoe UI Variable), and the instance chosen is shaped, drawn, outlined and measured at its axis settings; PDF and SVG embed it as that instance. Variation axis sliders are not done. Beyond Illustrator: inline graphics (`text.insertInline`, Type ▸ Insert Inline Symbol) set a document symbol in a run of type as one character that flows, wraps and justifies like a glyph (InDesign-style inline objects, e.g. mana symbols in card rules text): sized to a multiple of the font size, centred on the cap height, opening up tall lines, following Redefine Symbol; a character of its run's size for Character Alignment and Top-to-Top leading, placed by the bidi reordering in right-to-left text (a neutral U+FFFC); drawn on the canvas, kept as live text plus a `<use>` in SVG and as vector art in PDF; Backspace removes it whole. Hebrew and Arabic are laid out right to left with the Unicode bidirectional algorithm (embedded Latin and numbers keep their direction, lines put in visual order after wrapping) in point, area and path type, with caret, selection and arrow keys in visual order; each paragraph's direction comes from its first strong character unless Paragraph Direction sets it (Paragraph panel with Show Indic Options, `text.setFormat {direction}`), and new type aligns to the start of its direction. SVG export outlines right-to-left text. Arabic typefaces: builds made with a craft-fonts checkout that holds its Arabic families (Noto Sans Arabic, the Arabic fallback, plus Cairo, Tajawal, Almarai, IBM Plex Sans Arabic, Noto Kufi Arabic, Amiri, Alexandria, Fustat, Reem Kufi, Aref Ruqaa and Gulzar once craft-fonts adds them, storytold/craft-fonts#11; releases get them when their craft-fonts pin moves) list them in the font menus on desktop; the web build fetches them fLine truncated
- **Vertical punctuation:** fullwidth `!` (U+FF01) and `?` (U+FF1F) use their nominal glyph upright when no vertical alternate is present, following the Tu fallback in [Unicode UAX #50 §3.1](https://www.unicode.org/reports/tr50/#vo). Code-built test fonts cover point and area type with and without `vert` alternates, retain the rotated fallback for a bracket and long vowel mark, and leave horizontal type unchanged. Tests: `crates/text/src/tests_vertical.rs`.
+1 -1
View File
@@ -58,7 +58,7 @@ tools, never checked side by side) isn't captured row by row.
| Join tool scrubbing, Average, Join | done | Join merges the direct-selected anchors lying on one another along a path, as after Average, into one (#1533) |
| Average and Join in one step, with a corner or smooth choice for the joined anchor | missing | `path.join` and `path.average` are separate commands, and Join has no corner/smooth choice; [gap 1](gaps.md) |
| Smooth tool smooths only the stretch of path under the drag | done | #1512 |
| Simplify (slider, auto, corner angle threshold) | partial | Tolerance, default-on Preview and original/new point counts (#1272); slider, auto-simplify, corner-angle UI and Show Original remain missing |
| Simplify (slider, auto, corner angle threshold) | partial | Tolerance, default-on Preview and original/new point counts (#1272); Corner Point Angle Threshold, Convert to Straight Lines and Show Original Path; slider, auto-simplify and Retain my latest settings remain missing |
## Direct Selection, anchors and handles