Merge origin/main into feat/links-item-context-menu

This commit is contained in:
ruchirguitar committed 2026-11-19 20:53:36 +05:30
commit beffa106d9
145 files changed
+10353 -784

No files matched your search

Generated
+44 -40
View File
@@ -1001,7 +1001,7 @@ dependencies = [
[[package]]
name = "craft-affinity"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=64b181977a0488e4d1e167bc5cc8cfededc2ed4b#64b181977a0488e4d1e167bc5cc8cfededc2ed4b"
source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46"
dependencies = [
"crc32fast",
"flate2",
@@ -1012,12 +1012,12 @@ dependencies = [
[[package]]
name = "craft-codepage"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=64b181977a0488e4d1e167bc5cc8cfededc2ed4b#64b181977a0488e4d1e167bc5cc8cfededc2ed4b"
source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46"
[[package]]
name = "craft-dds"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=64b181977a0488e4d1e167bc5cc8cfededc2ed4b#64b181977a0488e4d1e167bc5cc8cfededc2ed4b"
source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46"
dependencies = [
"rayon",
]
@@ -1025,12 +1025,12 @@ dependencies = [
[[package]]
name = "craft-docpath"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=64b181977a0488e4d1e167bc5cc8cfededc2ed4b#64b181977a0488e4d1e167bc5cc8cfededc2ed4b"
source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46"
[[package]]
name = "craft-dxf"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=64b181977a0488e4d1e167bc5cc8cfededc2ed4b#64b181977a0488e4d1e167bc5cc8cfededc2ed4b"
source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46"
dependencies = [
"craft-codepage",
"encoding_rs",
@@ -1042,12 +1042,12 @@ dependencies = [
[[package]]
name = "craft-eps"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=64b181977a0488e4d1e167bc5cc8cfededc2ed4b#64b181977a0488e4d1e167bc5cc8cfededc2ed4b"
source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46"
[[package]]
name = "craft-font-catalog"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=23acc704933a9a5619a5cd1cddc9bb1fb5a9b2d3#23acc704933a9a5619a5cd1cddc9bb1fb5a9b2d3"
source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46"
dependencies = [
"harfrust 0.13.3",
"kurbo 0.13.1",
@@ -1061,12 +1061,12 @@ dependencies = [
[[package]]
name = "craft-fonts-build"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=64b181977a0488e4d1e167bc5cc8cfededc2ed4b#64b181977a0488e4d1e167bc5cc8cfededc2ed4b"
source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46"
[[package]]
name = "craft-gif"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=64b181977a0488e4d1e167bc5cc8cfededc2ed4b#64b181977a0488e4d1e167bc5cc8cfededc2ed4b"
source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46"
dependencies = [
"gif",
]
@@ -1074,7 +1074,7 @@ dependencies = [
[[package]]
name = "craft-gzip"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=64b181977a0488e4d1e167bc5cc8cfededc2ed4b#64b181977a0488e4d1e167bc5cc8cfededc2ed4b"
source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46"
dependencies = [
"flate2",
]
@@ -1082,7 +1082,7 @@ dependencies = [
[[package]]
name = "craft-i18n"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=64b181977a0488e4d1e167bc5cc8cfededc2ed4b#64b181977a0488e4d1e167bc5cc8cfededc2ed4b"
source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46"
dependencies = [
"fixed_decimal",
"icu_decimal",
@@ -1105,7 +1105,7 @@ dependencies = [
[[package]]
name = "craft-image-codecs"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=64b181977a0488e4d1e167bc5cc8cfededc2ed4b#64b181977a0488e4d1e167bc5cc8cfededc2ed4b"
source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46"
dependencies = [
"craft-dds",
"craft-jpeg",
@@ -1132,7 +1132,7 @@ dependencies = [
[[package]]
name = "craft-jpeg"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=64b181977a0488e4d1e167bc5cc8cfededc2ed4b#64b181977a0488e4d1e167bc5cc8cfededc2ed4b"
source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46"
dependencies = [
"thiserror 2.0.21",
]
@@ -1140,8 +1140,9 @@ dependencies = [
[[package]]
name = "craft-jxl"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=64b181977a0488e4d1e167bc5cc8cfededc2ed4b#64b181977a0488e4d1e167bc5cc8cfededc2ed4b"
source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46"
dependencies = [
"brotli-decompressor 5.0.3",
"jixel",
"jxl-oxide",
"thiserror 2.0.21",
@@ -1150,7 +1151,7 @@ dependencies = [
[[package]]
name = "craft-keymap"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=64b181977a0488e4d1e167bc5cc8cfededc2ed4b#64b181977a0488e4d1e167bc5cc8cfededc2ed4b"
source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46"
dependencies = [
"egui",
"serde",
@@ -1160,7 +1161,7 @@ dependencies = [
[[package]]
name = "craft-metadata"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=64b181977a0488e4d1e167bc5cc8cfededc2ed4b#64b181977a0488e4d1e167bc5cc8cfededc2ed4b"
source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46"
dependencies = [
"brotli-decompressor 6.3.2",
"chrono",
@@ -1172,7 +1173,7 @@ dependencies = [
[[package]]
name = "craft-metafile"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=64b181977a0488e4d1e167bc5cc8cfededc2ed4b#64b181977a0488e4d1e167bc5cc8cfededc2ed4b"
source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46"
dependencies = [
"encoding_rs",
"image",
@@ -1183,7 +1184,7 @@ dependencies = [
[[package]]
name = "craft-mime"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=64b181977a0488e4d1e167bc5cc8cfededc2ed4b#64b181977a0488e4d1e167bc5cc8cfededc2ed4b"
source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46"
dependencies = [
"chrono",
"craft-codepage",
@@ -1193,7 +1194,7 @@ dependencies = [
[[package]]
name = "craft-pdf"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=64b181977a0488e4d1e167bc5cc8cfededc2ed4b#64b181977a0488e4d1e167bc5cc8cfededc2ed4b"
source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46"
dependencies = [
"hayro-interpret",
"hayro-syntax",
@@ -1204,15 +1205,16 @@ dependencies = [
[[package]]
name = "craft-plotter"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=a7fb55eaf9a15c21e8ce0b13cf605dc54fd15f57#a7fb55eaf9a15c21e8ce0b13cf605dc54fd15f57"
source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46"
dependencies = [
"kurbo 0.13.1",
"thiserror 2.0.21",
]
[[package]]
name = "craft-print"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=64b181977a0488e4d1e167bc5cc8cfededc2ed4b#64b181977a0488e4d1e167bc5cc8cfededc2ed4b"
source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46"
dependencies = [
"craft-winprint-gdi",
"log",
@@ -1226,7 +1228,7 @@ dependencies = [
[[package]]
name = "craft-proof"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=64b181977a0488e4d1e167bc5cc8cfededc2ed4b#64b181977a0488e4d1e167bc5cc8cfededc2ed4b"
source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46"
dependencies = [
"log",
"miniz_oxide 0.9.1",
@@ -1237,7 +1239,7 @@ dependencies = [
[[package]]
name = "craft-ps"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=64b181977a0488e4d1e167bc5cc8cfededc2ed4b#64b181977a0488e4d1e167bc5cc8cfededc2ed4b"
source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46"
dependencies = [
"flate2",
"kurbo 0.13.1",
@@ -1246,7 +1248,7 @@ dependencies = [
[[package]]
name = "craft-psd"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=64b181977a0488e4d1e167bc5cc8cfededc2ed4b#64b181977a0488e4d1e167bc5cc8cfededc2ed4b"
source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46"
dependencies = [
"encoding_rs",
"flate2",
@@ -1257,7 +1259,7 @@ dependencies = [
[[package]]
name = "craft-stream-codecs"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=64b181977a0488e4d1e167bc5cc8cfededc2ed4b#64b181977a0488e4d1e167bc5cc8cfededc2ed4b"
source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46"
dependencies = [
"fax",
"hayro-ccitt",
@@ -1268,12 +1270,14 @@ dependencies = [
[[package]]
name = "craft-svg"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=64b181977a0488e4d1e167bc5cc8cfededc2ed4b#64b181977a0488e4d1e167bc5cc8cfededc2ed4b"
source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46"
dependencies = [
"craft-image-codecs",
"craft-xml",
"data-url",
"flate2",
"gif",
"image-webp",
"kurbo 0.13.1",
"quick-xml 0.41.0",
"resvg 0.48.1",
@@ -1287,7 +1291,7 @@ dependencies = [
[[package]]
name = "craft-tiff"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=64b181977a0488e4d1e167bc5cc8cfededc2ed4b#64b181977a0488e4d1e167bc5cc8cfededc2ed4b"
source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46"
dependencies = [
"serde",
"thiserror 2.0.21",
@@ -1296,7 +1300,7 @@ dependencies = [
[[package]]
name = "craft-ui"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=64b181977a0488e4d1e167bc5cc8cfededc2ed4b#64b181977a0488e4d1e167bc5cc8cfededc2ed4b"
source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46"
dependencies = [
"craft-fonts-build",
"craft-i18n",
@@ -1317,7 +1321,7 @@ dependencies = [
[[package]]
name = "craft-update"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=64b181977a0488e4d1e167bc5cc8cfededc2ed4b#64b181977a0488e4d1e167bc5cc8cfededc2ed4b"
source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46"
dependencies = [
"chrono",
"dunce",
@@ -1344,7 +1348,7 @@ dependencies = [
[[package]]
name = "craft-vectorcraft-format"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=64b181977a0488e4d1e167bc5cc8cfededc2ed4b#64b181977a0488e4d1e167bc5cc8cfededc2ed4b"
source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46"
dependencies = [
"flate2",
"serde",
@@ -1355,7 +1359,7 @@ dependencies = [
[[package]]
name = "craft-web-api"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=64b181977a0488e4d1e167bc5cc8cfededc2ed4b#64b181977a0488e4d1e167bc5cc8cfededc2ed4b"
source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46"
dependencies = [
"js-sys",
"serde_json",
@@ -1366,7 +1370,7 @@ dependencies = [
[[package]]
name = "craft-window"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=64b181977a0488e4d1e167bc5cc8cfededc2ed4b#64b181977a0488e4d1e167bc5cc8cfededc2ed4b"
source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46"
dependencies = [
"egui",
"objc2 0.6.5",
@@ -1385,7 +1389,7 @@ dependencies = [
[[package]]
name = "craft-xml"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=64b181977a0488e4d1e167bc5cc8cfededc2ed4b#64b181977a0488e4d1e167bc5cc8cfededc2ed4b"
source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46"
dependencies = [
"quick-xml 0.41.0",
"serde",
@@ -2492,7 +2496,7 @@ checksum = "9f4d0e94ddd48749f06bbe4e5389fb9799a0c45bcaf00495042076ef05e3241a"
[[package]]
name = "hayro-cmap"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=64b181977a0488e4d1e167bc5cc8cfededc2ed4b#64b181977a0488e4d1e167bc5cc8cfededc2ed4b"
source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46"
dependencies = [
"brotli",
"hayro-postscript",
@@ -2501,7 +2505,7 @@ dependencies = [
[[package]]
name = "hayro-interpret"
version = "0.7.0"
source = "git+https://github.com/storytold/craft-libs?rev=64b181977a0488e4d1e167bc5cc8cfededc2ed4b#64b181977a0488e4d1e167bc5cc8cfededc2ed4b"
source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46"
dependencies = [
"bitflags 2.13.2",
"hayro-cmap",
@@ -2519,7 +2523,7 @@ dependencies = [
[[package]]
name = "hayro-jbig2"
version = "0.3.0"
source = "git+https://github.com/storytold/craft-libs?rev=64b181977a0488e4d1e167bc5cc8cfededc2ed4b#64b181977a0488e4d1e167bc5cc8cfededc2ed4b"
source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46"
dependencies = [
"fearless_simd",
"hayro-ccitt",
@@ -2537,12 +2541,12 @@ dependencies = [
[[package]]
name = "hayro-postscript"
version = "0.1.0"
source = "git+https://github.com/storytold/craft-libs?rev=64b181977a0488e4d1e167bc5cc8cfededc2ed4b#64b181977a0488e4d1e167bc5cc8cfededc2ed4b"
source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46"
[[package]]
name = "hayro-syntax"
version = "0.7.2"
source = "git+https://github.com/storytold/craft-libs?rev=64b181977a0488e4d1e167bc5cc8cfededc2ed4b#64b181977a0488e4d1e167bc5cc8cfededc2ed4b"
source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46"
dependencies = [
"flate2",
"hayro-ccitt",
@@ -3342,7 +3346,7 @@ dependencies = [
[[package]]
name = "krilla"
version = "0.8.2"
source = "git+https://github.com/storytold/craft-libs?rev=64b181977a0488e4d1e167bc5cc8cfededc2ed4b#64b181977a0488e4d1e167bc5cc8cfededc2ed4b"
source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46"
dependencies = [
"base64 0.22.1",
"bumpalo",
@@ -3451,7 +3455,7 @@ checksum = "d4a5ff6bcca6c4867b1c4fd4ef63e4db7436ef363e0ad7531d1558856bae64f4"
[[package]]
name = "linesweeper"
version = "0.5.0"
source = "git+https://github.com/storytold/craft-libs?rev=64b181977a0488e4d1e167bc5cc8cfededc2ed4b#64b181977a0488e4d1e167bc5cc8cfededc2ed4b"
source = "git+https://github.com/storytold/craft-libs?rev=50b0ee7bf811e363b5f238382b5c77318cf33e46#50b0ee7bf811e363b5f238382b5c77318cf33e46"
dependencies = [
"arrayvec",
"kurbo 0.13.1",
+32 -32
View File
@@ -11,40 +11,40 @@ rust-version = "1.95"
repository = "https://github.com/storytold/vectorcraft"
[workspace.dependencies]
craft-pdf = { git = "https://github.com/storytold/craft-libs", rev = "64b181977a0488e4d1e167bc5cc8cfededc2ed4b", default-features = false, features = ["interpret", "write"] }
craft-print = { git = "https://github.com/storytold/craft-libs", rev = "64b181977a0488e4d1e167bc5cc8cfededc2ed4b" }
craft-docpath = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "64b181977a0488e4d1e167bc5cc8cfededc2ed4b" }
craft-ui = { git = "https://github.com/storytold/craft-libs", rev = "64b181977a0488e4d1e167bc5cc8cfededc2ed4b", features = ["serde"] }
craft-keymap = { git = "https://github.com/storytold/craft-libs", rev = "64b181977a0488e4d1e167bc5cc8cfededc2ed4b" }
craft-proof = { git = "https://github.com/storytold/craft-libs", rev = "64b181977a0488e4d1e167bc5cc8cfededc2ed4b" }
craft-pdf = { git = "https://github.com/storytold/craft-libs", rev = "50b0ee7bf811e363b5f238382b5c77318cf33e46", default-features = false, features = ["interpret", "write"] }
craft-print = { git = "https://github.com/storytold/craft-libs", rev = "50b0ee7bf811e363b5f238382b5c77318cf33e46" }
craft-docpath = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "50b0ee7bf811e363b5f238382b5c77318cf33e46" }
craft-ui = { git = "https://github.com/storytold/craft-libs", rev = "50b0ee7bf811e363b5f238382b5c77318cf33e46", features = ["serde"] }
craft-keymap = { git = "https://github.com/storytold/craft-libs", rev = "50b0ee7bf811e363b5f238382b5c77318cf33e46" }
craft-proof = { git = "https://github.com/storytold/craft-libs", rev = "50b0ee7bf811e363b5f238382b5c77318cf33e46" }
# Decides who draws the window frame (desktop vs. app) so the suite shares one native titlebar per
# desktop. The `egui` feature adds `craft_window::decorate`. (craft-libs#217.)
craft-window = { git = "https://github.com/storytold/craft-libs", rev = "64b181977a0488e4d1e167bc5cc8cfededc2ed4b", features = ["egui"] }
craft-window = { git = "https://github.com/storytold/craft-libs", rev = "50b0ee7bf811e363b5f238382b5c77318cf33e46", features = ["egui"] }
# The `.vectorcraft` envelope: its members, version, embedded images and the data after the JSON.
craft-vectorcraft-format = { git = "https://github.com/storytold/craft-libs", rev = "64b181977a0488e4d1e167bc5cc8cfededc2ed4b" }
craft-gzip = { git = "https://github.com/storytold/craft-libs", rev = "64b181977a0488e4d1e167bc5cc8cfededc2ed4b" }
craft-vectorcraft-format = { git = "https://github.com/storytold/craft-libs", rev = "50b0ee7bf811e363b5f238382b5c77318cf33e46" }
craft-gzip = { git = "https://github.com/storytold/craft-libs", rev = "50b0ee7bf811e363b5f238382b5c77318cf33e46" }
# craft-update: app-specific pretend versions apply to startup and manual checks.
# Native Affinity documents (craft-libs#914).
craft-affinity = { git = "https://github.com/storytold/craft-libs", rev = "64b181977a0488e4d1e167bc5cc8cfededc2ed4b" }
craft-affinity = { git = "https://github.com/storytold/craft-libs", rev = "50b0ee7bf811e363b5f238382b5c77318cf33e46" }
# SVG parsing, limits, SVGZ and writer (craft-libs#778).
craft-svg = { git = "https://github.com/storytold/craft-libs", rev = "64b181977a0488e4d1e167bc5cc8cfededc2ed4b", features = ["tree"] }
craft-mime = { git = "https://github.com/storytold/craft-libs", rev = "64b181977a0488e4d1e167bc5cc8cfededc2ed4b" }
craft-svg = { git = "https://github.com/storytold/craft-libs", rev = "50b0ee7bf811e363b5f238382b5c77318cf33e46", features = ["tree"] }
craft-mime = { git = "https://github.com/storytold/craft-libs", rev = "50b0ee7bf811e363b5f238382b5c77318cf33e46" }
# EPS container, previews, ASCII85 and DSC comments (craft-libs#778).
craft-eps = { git = "https://github.com/storytold/craft-libs", rev = "64b181977a0488e4d1e167bc5cc8cfededc2ed4b" }
craft-eps = { git = "https://github.com/storytold/craft-libs", rev = "50b0ee7bf811e363b5f238382b5c77318cf33e46" }
# DXF tags, reader and writer (craft-libs#778, #926, #927).
craft-plotter = { git = "https://github.com/storytold/craft-libs", rev = "a7fb55eaf9a15c21e8ce0b13cf605dc54fd15f57" }
craft-dxf = { git = "https://github.com/storytold/craft-libs", rev = "64b181977a0488e4d1e167bc5cc8cfededc2ed4b" }
craft-plotter = { git = "https://github.com/storytold/craft-libs", rev = "50b0ee7bf811e363b5f238382b5c77318cf33e46" }
craft-dxf = { git = "https://github.com/storytold/craft-libs", rev = "50b0ee7bf811e363b5f238382b5c77318cf33e46" }
# WMF, EMF and EMF+ reader (craft-libs#778).
craft-metafile = { git = "https://github.com/storytold/craft-libs", rev = "64b181977a0488e4d1e167bc5cc8cfededc2ed4b" }
craft-xml = { git = "https://github.com/storytold/craft-libs", rev = "64b181977a0488e4d1e167bc5cc8cfededc2ed4b" }
craft-image-codecs = { git = "https://github.com/storytold/craft-libs", rev = "64b181977a0488e4d1e167bc5cc8cfededc2ed4b" }
craft-gif = { git = "https://github.com/storytold/craft-libs", rev = "64b181977a0488e4d1e167bc5cc8cfededc2ed4b" }
craft-tiff = { git = "https://github.com/storytold/craft-libs", rev = "64b181977a0488e4d1e167bc5cc8cfededc2ed4b" }
craft-ps = { git = "https://github.com/storytold/craft-libs", rev = "64b181977a0488e4d1e167bc5cc8cfededc2ed4b", default-features = false, features = ["write"] }
craft-psd = { git = "https://github.com/storytold/craft-libs", rev = "64b181977a0488e4d1e167bc5cc8cfededc2ed4b" }
craft-stream-codecs = { git = "https://github.com/storytold/craft-libs", rev = "64b181977a0488e4d1e167bc5cc8cfededc2ed4b" }
craft-jxl = { git = "https://github.com/storytold/craft-libs", rev = "64b181977a0488e4d1e167bc5cc8cfededc2ed4b" }
craft-update = { git = "https://github.com/storytold/craft-libs", version = "=0.1.0", rev = "64b181977a0488e4d1e167bc5cc8cfededc2ed4b", features = ["egui"] }
craft-metafile = { git = "https://github.com/storytold/craft-libs", rev = "50b0ee7bf811e363b5f238382b5c77318cf33e46" }
craft-xml = { git = "https://github.com/storytold/craft-libs", rev = "50b0ee7bf811e363b5f238382b5c77318cf33e46" }
craft-image-codecs = { git = "https://github.com/storytold/craft-libs", rev = "50b0ee7bf811e363b5f238382b5c77318cf33e46" }
craft-gif = { git = "https://github.com/storytold/craft-libs", rev = "50b0ee7bf811e363b5f238382b5c77318cf33e46" }
craft-tiff = { git = "https://github.com/storytold/craft-libs", rev = "50b0ee7bf811e363b5f238382b5c77318cf33e46" }
craft-ps = { git = "https://github.com/storytold/craft-libs", rev = "50b0ee7bf811e363b5f238382b5c77318cf33e46", default-features = false, features = ["write"] }
craft-psd = { git = "https://github.com/storytold/craft-libs", rev = "50b0ee7bf811e363b5f238382b5c77318cf33e46" }
craft-stream-codecs = { git = "https://github.com/storytold/craft-libs", rev = "50b0ee7bf811e363b5f238382b5c77318cf33e46" }
craft-jxl = { git = "https://github.com/storytold/craft-libs", rev = "50b0ee7bf811e363b5f238382b5c77318cf33e46" }
craft-update = { git = "https://github.com/storytold/craft-libs", version = "=0.1.0", rev = "50b0ee7bf811e363b5f238382b5c77318cf33e46", features = ["egui"] }
# internal
vectorcraft-geom = { path = "crates/geom" }
vectorcraft-color = { path = "crates/color" }
@@ -185,13 +185,13 @@ lto = "thin"
codegen-units = 1
[patch.crates-io]
hayro-syntax = { git = "https://github.com/storytold/craft-libs", rev = "64b181977a0488e4d1e167bc5cc8cfededc2ed4b" }
hayro-interpret = { git = "https://github.com/storytold/craft-libs", rev = "64b181977a0488e4d1e167bc5cc8cfededc2ed4b" }
hayro-jbig2 = { git = "https://github.com/storytold/craft-libs", rev = "64b181977a0488e4d1e167bc5cc8cfededc2ed4b" }
hayro-cmap = { git = "https://github.com/storytold/craft-libs", rev = "64b181977a0488e4d1e167bc5cc8cfededc2ed4b" }
hayro-postscript = { git = "https://github.com/storytold/craft-libs", rev = "64b181977a0488e4d1e167bc5cc8cfededc2ed4b" }
krilla = { git = "https://github.com/storytold/craft-libs", rev = "64b181977a0488e4d1e167bc5cc8cfededc2ed4b" }
linesweeper = { git = "https://github.com/storytold/craft-libs", rev = "64b181977a0488e4d1e167bc5cc8cfededc2ed4b" }
hayro-syntax = { git = "https://github.com/storytold/craft-libs", rev = "50b0ee7bf811e363b5f238382b5c77318cf33e46" }
hayro-interpret = { git = "https://github.com/storytold/craft-libs", rev = "50b0ee7bf811e363b5f238382b5c77318cf33e46" }
hayro-jbig2 = { git = "https://github.com/storytold/craft-libs", rev = "50b0ee7bf811e363b5f238382b5c77318cf33e46" }
hayro-cmap = { git = "https://github.com/storytold/craft-libs", rev = "50b0ee7bf811e363b5f238382b5c77318cf33e46" }
hayro-postscript = { git = "https://github.com/storytold/craft-libs", rev = "50b0ee7bf811e363b5f238382b5c77318cf33e46" }
krilla = { git = "https://github.com/storytold/craft-libs", rev = "50b0ee7bf811e363b5f238382b5c77318cf33e46" }
linesweeper = { git = "https://github.com/storytold/craft-libs", rev = "50b0ee7bf811e363b5f238382b5c77318cf33e46" }
ecolor = { git = "https://github.com/storytold/egui.git", rev = "6d518fc799681571963842f95b55a6b68431b15a" }
emath = { git = "https://github.com/storytold/egui.git", rev = "6d518fc799681571963842f95b55a6b68431b15a" }
epaint = { git = "https://github.com/storytold/egui.git", rev = "6d518fc799681571963842f95b55a6b68431b15a" }
+1
View File
@@ -246,6 +246,7 @@ fn with_stores(mut h: Headless) -> Headless {
prefs_dir::attach_script_data(&mut h.session);
prefs_dir::attach_metadata_templates_dir(&mut h.session);
prefs_dir::attach_new_doc_profiles(&mut h.session);
prefs_dir::attach_proof_setups(&mut h.session);
prefs_dir::attach_profile_store(&mut h.session);
prefs_dir::attach_color_settings(&mut h.session);
prefs_dir::attach_plugin_store(&mut h.session);
+1 -1
View File
@@ -17,7 +17,7 @@ path = "src/main.rs"
vectorcraft-engine = { workspace = true, features = ["bundled-fonts", "heif"] }
vectorcraft-ui-egui = { workspace = true }
# The page command API (storytold/craft-libs#413): the request plumbing behind window.vectorcraft.
craft-web-api = { git = "https://github.com/storytold/craft-libs", rev = "64b181977a0488e4d1e167bc5cc8cfededc2ed4b", version = "0.1.0" }
craft-web-api = { git = "https://github.com/storytold/craft-libs", rev = "50b0ee7bf811e363b5f238382b5c77318cf33e46", version = "0.1.0" }
vectorcraft-format = { workspace = true }
vectorcraft-text = { workspace = true }
egui = { workspace = true }
+1
View File
@@ -554,6 +554,7 @@ fn main() -> std::process::ExitCode {
// File Info's metadata templates live in their own folder next to the preferences.
prefs_dir::attach_metadata_templates_dir(&mut session);
prefs_dir::attach_new_doc_profiles(&mut session);
prefs_dir::attach_proof_setups(&mut session);
prefs_dir::attach_script_data(&mut session);
let mut app = VectorcraftApp::new(session, services(cc.winit_window().cloned(), cc.egui_ctx.clone()));
app.set_startup_update_check(true);
+8
View File
@@ -81,6 +81,14 @@ pub fn attach_new_doc_profiles(session: &mut vectorcraft_engine::Session) {
}
}
/// Have View › Proof Setup list the proof setups saved in the `Proof Setups` folder, which
/// `view.proofSetup.save` makes when it saves a setup by name.
pub fn attach_proof_setups(session: &mut vectorcraft_engine::Session) {
if let Some(dir) = store_dir("Proof Setups") {
session.attach_proof_setups(dir);
}
}
/// Keep each script's `Folder.userData` in the `Script Data` folder, and the file access people
/// allow scripts with Always in `Script Grants.json` beside it. Both are made when a script first
/// needs them.
+5 -41
View File
@@ -534,47 +534,13 @@ fn plain(by_pen: &[Vec<Vec<(i64, i64)>>]) -> Vec<u8> {
/// HP-GL/2: `IN;`, the palette, each pen's paths as one `PE`, `PU;SP0;`.
fn encoded(by_pen: &[Vec<Vec<(i64, i64)>>], pens: &[[u8; 3]]) -> Vec<u8> {
let mut out = b"IN;".to_vec();
if !pens.is_empty() {
// Pens 1 to n on a plotter, and on a raster device (whose pens are 0 to NP − 1) too.
let np = (pens.len() + 1).next_power_of_two().max(2);
out.extend(format!("NP{np};").bytes());
for (i, [r, g, b]) in pens.iter().enumerate() {
out.extend(format!("PC{},{r},{g},{b};", i + 1).bytes());
}
}
let mut at: Option<(i64, i64)> = None;
for (i, paths) in by_pen.iter().enumerate().filter(|(_, p)| !p.is_empty()) {
out.extend(format!("PU;SP{};PE", i + 1).bytes());
for path in paths {
for (k, &p) in path.iter().enumerate() {
if k == 0 {
out.push(b'<');
}
// The first move of the plot is absolute, and so is one longer than the range a
// device takes for each number; every other is relative.
match at.map(|a| (p.0 - a.0, p.1 - a.1)).filter(|d| d.0.abs() <= MAX_COORD && d.1.abs() <= MAX_COORD) {
None => {
out.push(b'=');
pe_number(&mut out, p.0);
pe_number(&mut out, p.1);
}
Some((dx, dy)) => {
pe_number(&mut out, dx);
pe_number(&mut out, dy);
}
}
at = Some(p);
}
}
out.push(b';');
}
out.extend(b"PU;SP0;");
out
let pens: Vec<_> = pens.iter().enumerate().map(|(index, &rgb)| craft_plotter::hpgl::write::Pen { number: index + 1, rgb }).collect();
craft_plotter::hpgl::write::write_hpgl2(&pens, by_pen)
}
/// `v` as a base-64 PE number: the sign in the low bit, the low digits from 63 up and the last
/// digit from 191 up.
#[cfg(test)]
fn pe_number(out: &mut Vec<u8>, v: i64) {
let mut n = (v.unsigned_abs() << 1) | u64::from(v < 0);
while n >= 64 {
@@ -973,10 +939,8 @@ impl<'a> Walk<'a> {
end(&mut cur, &mut out, false);
cur.push(p);
}
PathEl::LineTo(p) => {
if cur.last() != Some(&p) {
cur.push(p);
}
PathEl::LineTo(p) if cur.last() != Some(&p) => {
cur.push(p);
}
PathEl::ClosePath => {
let s = cur.first().copied();
+19
View File
@@ -1179,6 +1179,25 @@ fn encoded_numbers_follow_the_reference_guide() {
assert_eq!(out, [194, 191]);
}
/// The app adapter must preserve raw bytes and position across the one-based pen table.
#[test]
fn hpgl2_shared_writer_preserves_raw_bytes_and_pen_indices() {
let paths = vec![vec![vec![(32, -32)]], vec![], vec![vec![(33, -31)], vec![(34, -30)]]];
let pens = [[1, 2, 3], [4, 5, 6], [7, 8, 9]];
assert_eq!(encoded(&paths, &pens), b"IN;NP4;PC1,1,2,3;PC2,4,5,6;PC3,7,8,9;PU;SP1;PE<=?\xc0@\xc0;PU;SP3;PE<\xc1\xc1<\xc1\xc1;PU;SP0;");
}
#[test]
fn hpgl2_shared_writer_preserves_empty_and_last_admitted_pen() {
assert_eq!(encoded(&[], &[]), b"IN;PU;SP0;");
let pens = vec![[0, 0, 0]; MAX_PENS];
let mut paths = vec![vec![]; MAX_PENS];
paths[MAX_PENS - 1] = vec![vec![(0, 0)]];
let bytes = encoded(&paths, &pens);
assert!(bytes.starts_with(b"IN;NP256;PC1,0,0,0;"));
assert!(bytes.ends_with(b"PC255,0,0,0;PU;SP255;PE<=\xbf\xbf;PU;SP0;"));
}
#[test]
fn hpgl2_writes_the_palette_and_encoded_polylines() {
let out = plot(&three(), &HpglOptions { version: Version::Hpgl2, ..opts(&three()) });
+109 -6
View File
@@ -458,6 +458,15 @@ impl Cms {
CmykSpace::Generic(g) => g.to_srgb(cmyk, absolute, bpc),
CmykSpace::Device => naive_cmyk_to_rgb(cmyk),
CmykSpace::Icc(p) => {
// With black-point compensation the profile's black maps onto sRGB black, as
// `cmyk_to_srgb` shows the working space.
if bpc
&& !absolute
&& let Some(srgb) = builtin_rgb_cache(SRGB)
&& let Some(v) = p.to_rgb_of(&srgb, &cmyk, Intent::RelativeColorimetric, true)
{
return v;
}
let i = if absolute { Intent::AbsoluteColorimetric } else { Intent::RelativeColorimetric };
p.to_srgb(&cmyk, i).unwrap_or_else(|| naive_cmyk_to_rgb(cmyk))
}
@@ -676,32 +685,108 @@ impl Cms {
ProofTarget::Tritanopia => TRITANOPIA.simulate(srgb),
ProofTarget::WorkingCmyk => {
let working = self.working_cms();
let cmyk = working.srgb_to_cmyk(srgb, proof.intent);
working.cmyk_to_srgb(cmyk, proof.simulate_paper)
let cmyk = if proof.preserve_numbers { self.preserved_cmyk(srgb) } else { working.srgb_to_cmyk(srgb, proof.intent) };
self.proof_cmyk_to_srgb(cmyk, proof)
}
ProofTarget::Cmyk(name) => match cmyk_space(name) {
Ok(sp) => {
let cmyk = Self::srgb_to_cmyk_in(&sp, srgb, proof.intent, self.settings.bpc);
Self::cmyk_to_srgb_in(&sp, cmyk, proof.simulate_paper, self.settings.bpc)
let cmyk = if proof.preserve_numbers {
self.preserved_cmyk(srgb)
} else {
Self::srgb_to_cmyk_in(&sp, srgb, proof.intent, self.settings.bpc)
};
self.proof_cmyk_to_srgb(cmyk, proof)
}
Err(_) => srgb,
},
ProofTarget::Rgb(name) => match rgb_space(canonical_name(name)) {
Ok(RgbSpace::Srgb) if !proof.preserve_numbers => srgb,
Ok(RgbSpace::Srgb) => self.srgb_to_rgb(srgb).map(|v| v.clamp(0.0, 1.0)),
Ok(RgbSpace::Icc(p)) => {
// The device's own numbers for the color: the document's RGB numbers unchanged,
// or the color converted into the device's space with the proof's intent.
let numbers = if proof.preserve_numbers {
self.srgb_to_rgb(srgb)
} else {
p.from_srgb(srgb, proof.intent).and_then(|v| Some([*v.first()?, *v.get(1)?, *v.get(2)?])).unwrap_or(srgb)
};
p.to_srgb(&numbers, Intent::RelativeColorimetric).unwrap_or(srgb)
}
Err(_) => srgb,
},
}
}
/// Display sRGB of color `c` proofed with Preserve Numbers on a CMYK or RGB device: its own
/// numbers go to the device unchanged. A CMYK device takes a CMYK color's inks as they are, a
/// gray as K only and another color's inks in this context's CMYK space (relative
/// colorimetric); an RGB device takes an RGB color's numbers as they are and another color's
/// numbers in this context's RGB space. Other targets proof the color's display sRGB
/// ([`Self::proof_srgb`]).
pub fn proof_color(&self, c: &Color, proof: &ProofSetup) -> [f32; 3] {
if !proof.preserve_numbers {
return self.proof_srgb(self.display_rgb(c), proof);
}
match &proof.target {
// A device whose profile is not loaded leaves the color as it is, as for a pixel.
ProofTarget::Cmyk(name) if cmyk_space(name).is_err() => self.display_rgb(c),
ProofTarget::WorkingCmyk | ProofTarget::Cmyk(_) => self.proof_cmyk_to_srgb(self.to_cmyk(c, Intent::RelativeColorimetric), proof),
ProofTarget::Rgb(name) => {
// A CMYK color converts straight into the RGB space, so a wide space keeps it.
let numbers = match self.convert(c, Model::Rgb, Intent::RelativeColorimetric) {
Color::Rgb { r, g, b } => [r, g, b],
other => self.srgb_to_rgb(self.display_rgb(&other)),
}
.map(|v| v.clamp(0.0, 1.0));
match rgb_space(canonical_name(name)) {
Ok(RgbSpace::Srgb) => numbers,
Ok(RgbSpace::Icc(p)) => p.to_srgb(&numbers, Intent::RelativeColorimetric).unwrap_or(numbers),
Err(_) => self.display_rgb(c),
}
}
_ => self.proof_srgb(self.display_rgb(c), proof),
}
}
/// The CMYK numbers display sRGB `srgb` has in this context's CMYK space (relative
/// colorimetric), which Preserve CMYK Numbers sends to the simulated device unchanged: for
/// pixels whose own numbers are not known (an RGB image's pixels, art drawn over other art).
/// A color whose numbers are known proofs through [`Self::proof_color`].
fn preserved_cmyk(&self, srgb: [f32; 3]) -> [f32; 4] {
self.srgb_to_cmyk(srgb, Intent::RelativeColorimetric)
}
/// Display sRGB of CMYK inks in the proof's CMYK space (this context's CMYK space for RGB
/// targets).
/// targets). Simulate Paper Color shows the paper's color and the press black (absolute
/// colorimetric); else Simulate Black Ink shows the press black as the dark gray it prints
/// (media-relative, without black-point compensation).
pub fn proof_cmyk_to_srgb(&self, cmyk: [f32; 4], proof: &ProofSetup) -> [f32; 3] {
let black = proof.simulate_black && !proof.simulate_paper;
match &proof.target {
ProofTarget::Cmyk(name) => match cmyk_space(name) {
Ok(sp) if black => Self::black_ink_srgb(&sp, cmyk),
Ok(sp) => Self::cmyk_to_srgb_in(&sp, cmyk, proof.simulate_paper, self.settings.bpc),
Err(_) => self.cmyk_to_srgb(cmyk, proof.simulate_paper),
},
ProofTarget::WorkingCmyk if black => Self::black_ink_srgb(&self.working_cms().cmyk, cmyk),
ProofTarget::WorkingCmyk => self.working_cms().cmyk_to_srgb(cmyk, proof.simulate_paper),
_ => self.cmyk_to_srgb(cmyk, proof.simulate_paper),
}
}
/// Display sRGB of `cmyk` in `space`, media-relative and without black-point compensation, so
/// the darkest ink the space prints shows as the gray it is rather than as black.
fn black_ink_srgb(space: &CmykSpace, cmyk: [f32; 4]) -> [f32; 3] {
let cmyk = cmyk.map(|v| v.clamp(0.0, 1.0));
if let CmykSpace::Icc(p) = space
&& let Some(srgb) = builtin_rgb_cache(SRGB)
&& let Some(v) = p.to_rgb_of(&srgb, &cmyk, Intent::RelativeColorimetric, false)
{
return v;
}
Self::cmyk_to_srgb_in(space, cmyk, false, false)
}
/// The context of the working settings: the one [`use_document_profiles`] put a document's
/// profiles in place of, else this one.
fn working_cms(&self) -> &Cms {
@@ -711,7 +796,10 @@ impl Cms {
/// A cached 3-D lookup table implementing [`Cms::proof_srgb`] for 8-bit pixels.
pub fn proof_lut(&self, proof: &ProofSetup) -> Arc<ProofLut> {
let working = self.working.as_ref().map(|w| &w.settings);
let key = format!("{:?}|{working:?}|{:?}|{:?}|{}", self.settings, proof.target, proof.intent, proof.simulate_paper);
let key = format!(
"{:?}|{working:?}|{:?}|{:?}|{}|{}|{}",
self.settings, proof.target, proof.intent, proof.simulate_paper, proof.preserve_numbers, proof.simulate_black
);
let mut cache = PROOF_CACHE.lock().unwrap_or_else(|e| e.into_inner());
if let Some((_, l)) = cache.iter().find(|(k, _)| *k == key) {
return l.clone();
@@ -860,6 +948,8 @@ pub enum ProofTarget {
WorkingCmyk,
/// A specific CMYK profile (Customize…).
Cmyk(String),
/// A specific RGB profile (Customize…): the color as that RGB device shows it.
Rgb(String),
/// Legacy Macintosh RGB (Gamma 1.8).
LegacyMacRgb,
/// Internet Standard RGB (sRGB).
@@ -879,6 +969,9 @@ impl ProofTarget {
if let Some(p) = s.strip_prefix("cmyk:") {
return Some(ProofTarget::Cmyk(p.to_string()));
}
if let Some(p) = s.strip_prefix("rgb:") {
return Some(ProofTarget::Rgb(p.to_string()));
}
Some(match s {
"workingCmyk" | "cmyk" => ProofTarget::WorkingCmyk,
"legacyMacRgb" | "macRgb" => ProofTarget::LegacyMacRgb,
@@ -894,6 +987,7 @@ impl ProofTarget {
match self {
ProofTarget::WorkingCmyk => "workingCmyk".into(),
ProofTarget::Cmyk(p) => format!("cmyk:{p}"),
ProofTarget::Rgb(p) => format!("rgb:{p}"),
ProofTarget::LegacyMacRgb => "legacyMacRgb".into(),
ProofTarget::Srgb => "srgb".into(),
ProofTarget::MonitorRgb => "monitorRgb".into(),
@@ -917,6 +1011,15 @@ pub struct ProofSetup {
/// Simulate Paper Color (absolute colorimetric display of the press).
#[serde(default)]
pub simulate_paper: bool,
/// Preserve CMYK Numbers (a CMYK device) or Preserve RGB Numbers (an RGB device): the colors'
/// numbers go to the device unchanged instead of being converted into its space with
/// `intent`.
#[serde(default)]
pub preserve_numbers: bool,
/// Simulate Black Ink: the press black shows as the dark gray it prints (a CMYK device; implied
/// by `simulate_paper`).
#[serde(default)]
pub simulate_black: bool,
/// Separations Preview: names of the visible plates ("Cyan", "Magenta", "Yellow", "Black",
/// spot swatch names). `None` = normal composite proof.
#[serde(default, skip_serializing_if = "Option::is_none")]
+94
View File
@@ -194,6 +194,100 @@ fn colour_blindness_proofs() {
assert_eq!(ProofTarget::parse(&ProofTarget::Cmyk("X".into()).id()), Some(ProofTarget::Cmyk("X".into())));
}
/// Proof Setup › Customize: Simulate Black Ink shows the press black of a CMYK device as the dark
/// gray it prints, where the proof otherwise shows it as black; Simulate Paper Color shows it so
/// as well, on the paper's color.
#[test]
fn simulate_black_ink_shows_the_press_black_as_gray() {
let c = cms();
let device = ProofSetup { target: ProofTarget::Cmyk(GENERIC_CMYK.into()), ..Default::default() };
let black = ProofSetup { simulate_black: true, ..device.clone() };
let paper = ProofSetup { simulate_paper: true, ..device.clone() };
let plain = c.proof_srgb([0.0; 3], &device);
let gray = c.proof_srgb([0.0; 3], &black);
assert!(plain.iter().all(|v| *v < 0.02), "black stays black: {plain:?}");
assert!(gray.iter().all(|v| *v > 0.05), "the press black shows as a gray: {gray:?}");
assert_eq!(c.proof_srgb([1.0; 3], &black), [1.0; 3], "the paper stays white");
assert!(c.proof_srgb([0.0; 3], &paper).iter().all(|v| *v > 0.05));
// The working CMYK target, and the inks Separations Preview shows, follow it too.
let working = ProofSetup { target: ProofTarget::WorkingCmyk, simulate_black: true, ..Default::default() };
assert_eq!(c.proof_srgb([0.0; 3], &working), gray);
assert!(c.proof_cmyk_to_srgb([0.0, 0.0, 0.0, 1.0], &black)[0] > c.proof_cmyk_to_srgb([0.0, 0.0, 0.0, 1.0], &device)[0] + 0.05);
// The table the canvas draws through is made for each setting.
assert!(de(c.proof_lut(&black).apply([0.0; 3]), gray) < 2.5);
assert!(de(c.proof_lut(&device).apply([0.0; 3]), plain) < 2.5);
}
/// Preserve CMYK Numbers sends the color's CMYK numbers in the document's space to the simulated
/// device unchanged: with Device CMYK as the working space, K50 shows as the simulated press
/// prints K50 (darker, with its dot gain). Without it the color is converted into the device's
/// space with the intent, and the gray looks as it does on screen.
#[test]
fn preserve_cmyk_numbers_sends_the_numbers_unchanged() {
let dev = Cms::new(&ColorSettings { cmyk: DEVICE_CMYK.into(), ..Default::default() }).unwrap();
let press = Cms::new(&ColorSettings::default()).unwrap();
let k50 = [0.0, 0.0, 0.0, 0.5];
let gray = dev.cmyk_to_srgb(k50, false);
let device = ProofSetup { target: ProofTarget::Cmyk(GENERIC_CMYK.into()), ..Default::default() };
let preserved = dev.proof_srgb(gray, &ProofSetup { preserve_numbers: true, ..device.clone() });
let want = press.cmyk_to_srgb(k50, false);
assert!(de(preserved, want) < 0.5, "{preserved:?} vs {want:?}");
let converted = dev.proof_srgb(gray, &device);
assert!(de(converted, gray) < 1.5, "{converted:?} vs {gray:?}");
assert!(de(converted, preserved) > 3.0, "{converted:?} vs {preserved:?}");
// With the numbers preserved the intent is not used.
let perceptual = ProofSetup { intent: Intent::Perceptual, preserve_numbers: true, ..device };
assert_eq!(dev.proof_srgb(gray, &perceptual), preserved);
}
/// An RGB profile as the device to simulate: with Preserve RGB Numbers the document's RGB numbers
/// show as that device shows them (sRGB numbers on a Display P3 device look more saturated);
/// without it a color the device can show looks the same, and one it can't show is clipped.
#[test]
fn rgb_device_proofs_show_the_device_numbers() {
let c = cms();
let p3 = ProofSetup { target: ProofTarget::Rgb(DISPLAY_P3.into()), ..Default::default() };
assert_eq!(ProofTarget::parse(&p3.target.id()), Some(p3.target.clone()));
assert_eq!(p3.target.id(), format!("rgb:{DISPLAY_P3}"));
assert!(!p3.target.is_cmyk());
let red = [0.7, 0.3, 0.25];
let converted = c.proof_srgb(red, &p3);
assert!(de(converted, red) < 1.0, "{converted:?}");
let preserved = c.proof_srgb(red, &ProofSetup { preserve_numbers: true, ..p3.clone() });
assert!(preserved[0] > red[0] + 0.02 && preserved[1] < red[1] - 0.02, "{preserved:?}");
// An RGB color's own numbers give the same proof.
let own = c.proof_color(&Color::rgb(red[0], red[1], red[2]), &ProofSetup { preserve_numbers: true, ..p3.clone() });
assert!(de(own, preserved) < 0.01, "{own:?} vs {preserved:?}");
// sRGB numbers on an sRGB device: as they are either way.
let srgb = ProofSetup { target: ProofTarget::Rgb(SRGB.into()), preserve_numbers: true, ..Default::default() };
assert!(de(c.proof_srgb(red, &srgb), red) < 0.01);
// A wider working space's numbers on an sRGB device: its green clips to sRGB green.
let wide = Cms::new(&ColorSettings { rgb: WIDE_GAMUT_RGB.into(), ..Default::default() }).unwrap();
let green = wide.rgb_to_srgb([0.2, 0.8, 0.2]);
let shown = wide.proof_srgb(green, &srgb);
assert!(de(shown, green) > 3.0, "the wide space's numbers show as sRGB numbers: {shown:?}");
// A profile that is gone leaves the colors as they are.
let gone = ProofSetup { target: ProofTarget::Rgb("Nope".into()), ..Default::default() };
assert_eq!(c.proof_srgb(red, &gone), red);
}
/// A CMYK device whose profile is not loaded leaves a color as the screen shows it, with Preserve
/// CMYK Numbers on as well as off, the same as for a pixel of that color.
#[test]
fn missing_cmyk_device_leaves_colors_as_they_are() {
let c = cms();
let gone = ProofSetup { target: ProofTarget::Cmyk("Nope".into()), preserve_numbers: true, ..Default::default() };
let blue = Color::rgb(0.0, 0.0, 1.0);
let shown = c.display_rgb(&blue);
assert_eq!(c.proof_color(&blue, &gone), shown);
assert_eq!(c.proof_srgb(shown, &gone), shown);
let off = ProofSetup { preserve_numbers: false, ..gone.clone() };
assert_eq!(c.proof_color(&blue, &off), shown);
// A CMYK color keeps its inks' display color.
let ink = Color::Cmyk { c: 0.2, m: 0.7, y: 0.1, k: 0.05 };
assert!(de(c.proof_color(&ink, &gone), c.display_rgb(&ink)) < 0.01);
}
/// The expected colors were computed separately with NumPy from the same published inputs (linear
/// sRGB to XYZ from IEC 61966-2-1, Smith & Pokorny's XYZ to LMS, Judd-Vos XYZ at 485 nm and 660 nm),
/// following Brettel, Viénot & Mollon (1997) with the display's white as the neutral axis.
+19
View File
@@ -187,6 +187,25 @@ fn black_point_compensation_maps_the_darkest_ink_to_rgb_black() {
assert_eq!(abs(true), abs(false));
}
/// A loaded ICC CMYK profile as Proof Setup's device shows its darkest ink with the settings'
/// black-point compensation, as the working CMYK proof of the same profile does, and Simulate
/// Black Ink shows it as the lighter gray the press prints.
#[test]
fn simulate_black_ink_shows_a_loaded_cmyk_profiles_black_as_gray() {
let c = icc_cmyk(true);
let k100 = [0.0, 0.0, 0.0, 1.0];
let device = ProofSetup { target: ProofTarget::Cmyk(c.settings().cmyk.clone()), ..Default::default() };
let plain = c.proof_cmyk_to_srgb(k100, &device);
let working = c.proof_cmyk_to_srgb(k100, &ProofSetup { target: ProofTarget::WorkingCmyk, ..Default::default() });
assert!(plain.iter().zip(working).all(|(a, b)| (a - b).abs() < 0.01), "device {plain:?}, working {working:?}");
let black = c.proof_cmyk_to_srgb(k100, &ProofSetup { simulate_black: true, ..device.clone() });
assert!(plain.iter().zip(black).all(|(a, b)| b > a + 0.03), "black ink {black:?}, without {plain:?}");
// Without black-point compensation the device shows the darkest ink as the press prints it.
let off = icc_cmyk(false);
let plain_off = off.proof_cmyk_to_srgb(k100, &ProofSetup { target: ProofTarget::Cmyk(off.settings().cmyk.clone()), ..Default::default() });
assert!(plain_off.iter().zip(black).all(|(a, b)| (a - b).abs() < 0.02), "without compensation {plain_off:?}, black ink {black:?}");
}
/// #1584: every built-in profile (RGB, CMYK and gray) has each tag on a 4-byte boundary and a size
/// that is a multiple of 4 (ICC.1 §7.1.2), and still reads back as the same space.
#[test]
+6 -3
View File
@@ -621,7 +621,8 @@ impl Gradient {
}
/// Stops expanded so that midpoints are represented as explicit stops (for renderers without
/// midpoints), and a Perceptual gradient's segments as stops on its curve (for renderers that
/// mix linearly; within [`PERCEPTUAL_TOLERANCE`] of it).
/// mix linearly; within [`PERCEPTUAL_TOLERANCE`] of it). A stop between two stops of the same
/// color is that color, as it is, so paper white or a tint stays exact.
pub fn expanded_stops(&self) -> Vec<(f32, Color, f32)> {
self.expanded().map(|(t, c, o, _)| (t, c, o)).collect()
}
@@ -638,6 +639,9 @@ impl Gradient {
// Otherwise (repeated or unsorted offsets) each midpoint is looked up as `sample` would
// find it, but by binary search: a scan of all the stops per midpoint cost their square.
let reach = if increasing || !self.method.is_classic() { None } else { Some(StopReach::new(&self.stops)) };
// Two stops of the same color mix to that color, as it is: a mix through display RGB or
// OKLab would change its model or round its numbers.
let mix = move |a: &Color, b: &Color, v| if a == b { *a } else { self.method.mix(a, b, v) };
self.stops.iter().enumerate().flat_map(move |(i, s)| {
let next = self.stops.get(i + 1);
let off_centre = (s.midpoint - 0.5).abs() > 1e-3;
@@ -646,7 +650,6 @@ impl Gradient {
let t = s.offset + (n.offset - s.offset) * s.midpoint;
// Mixed from the two stops it lies between, as `sample` would: searching all the
// stops again for each midpoint made many stops cost their square.
let mix = |a: &Color, b: &Color, v| self.method.mix(a, b, v);
let (c, o) = match &reach {
Some(reach) => reach.sample_with(&self.stops, t, &mix),
None => between(s, n, t, &mix),
@@ -661,7 +664,7 @@ impl Gradient {
let mid = v == 0.5;
let t = curve_offset(s, n, v);
let o = s.opacity + (n.opacity - s.opacity) * v;
(t, self.method.mix(&s.color, &n.color, v), o, (mid && off_centre).then_some(s.midpoint), None)
(t, mix(&s.color, &n.color, v), o, (mid && off_centre).then_some(s.midpoint), None)
})
});
std::iter::once((s.offset, s.color, s.opacity, None, Some(i))).chain(classic).chain(perceptual.into_iter().flatten())
+65 -1
View File
@@ -124,6 +124,54 @@ impl ArrowStyle {
}
}
/// `arrowHead`: null, or a built-in stroke arrowhead by its name (`Barbed`, as `stroke.set` takes
/// it). A custom arrowhead and an unknown name are refused.
mod arrow_head {
use crate::Arrowhead;
use serde::de::{Error, IntoDeserializer, Visitor};
use serde::{Deserialize, Deserializer};
pub fn deserialize<'de, D: Deserializer<'de>>(deserializer: D) -> Result<Option<Arrowhead>, D::Error> {
deserializer.deserialize_option(Name)
}
/// Reads the name where it is, without a copy of its own.
struct Name;
impl<'de> Visitor<'de> for Name {
type Value = Option<Arrowhead>;
fn expecting(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
f.write_str("a built-in stroke arrowhead name or null")
}
fn visit_none<E: Error>(self) -> Result<Self::Value, E> {
Ok(None)
}
fn visit_unit<E: Error>(self) -> Result<Self::Value, E> {
Ok(None)
}
fn visit_some<D: Deserializer<'de>>(self, deserializer: D) -> Result<Self::Value, D::Error> {
deserializer.deserialize_str(self)
}
fn visit_str<E: Error>(self, name: &str) -> Result<Self::Value, E> {
// No built-in name is this long, so a longer one is refused without parsing it.
let parsed: Result<Arrowhead, serde::de::value::Error> =
if name.len() > 64 { Err(serde::de::value::Error::custom("too long")) } else { Arrowhead::deserialize(name.into_deserializer()) };
match parsed {
Ok(head) if !matches!(head, Arrowhead::Custom(_)) => Ok(Some(head)),
_ => {
let shown: String = name.chars().take(64).collect();
Err(E::custom(format!("Unknown arrowhead {shown}: a built-in stroke arrowhead name or null")))
}
}
}
}
}
/// Where the label sits across the dimension line.
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "lowercase")]
@@ -157,6 +205,12 @@ pub struct DimensionOptions {
pub line_type: LineType,
pub line_color: [u8; 3],
pub arrow_style: ArrowStyle,
/// A built-in stroke arrowhead drawn at both ends in place of `arrow_style`'s head. Versions
/// that have the stroke arrowhead but do not read this keep the saved arrows until they draw
/// the dimension again, and then draw `arrow_style`. Versions without the stroke arrowhead do
/// not open the file.
#[serde(deserialize_with = "arrow_head::deserialize", skip_serializing_if = "Option::is_none")]
pub arrow_head: Option<crate::Arrowhead>,
pub arrow_scale: f64,
pub extension_weight: f64,
pub extension_type: LineType,
@@ -186,6 +240,7 @@ impl Default for DimensionOptions {
line_type: LineType::Solid,
line_color: [0, 0, 0],
arrow_style: ArrowStyle::Filled,
arrow_head: None,
arrow_scale: 100.0,
extension_weight: 0.5,
extension_type: LineType::Solid,
@@ -209,7 +264,8 @@ impl DimensionOptions {
/// tolerantly so a newer version's options don't stop a document opening.
pub fn from_params(v: serde_json::Value) -> Result<Self, String> {
if let (Some(given), Ok(serde_json::Value::Object(known))) = (v.as_object(), serde_json::to_value(Self::default()))
&& let Some(k) = given.keys().find(|k| !known.contains_key(*k))
// `arrowHead` is left out of the saved options when it is null.
&& let Some(k) = given.keys().find(|k| !known.contains_key(*k) && k.as_str() != "arrowHead")
{
return Err(format!("Unknown dimension option {k}"));
}
@@ -228,8 +284,16 @@ impl DimensionOptions {
}
Ok(f)
}
/// The stroke arrowhead drawn at each end of the dimension line: `arrow_head`, or else the
/// arrow style's head.
pub fn arrowhead(&self) -> Option<crate::Arrowhead> {
self.arrow_head.clone().or_else(|| self.arrow_style.arrowhead())
}
pub fn validate(&self) -> Result<(), String> {
self.factor()?;
if matches!(self.arrow_head, Some(crate::Arrowhead::Custom(_))) {
return Err("A dimension's arrowhead is a built-in stroke arrowhead".into());
}
if self.precision > 6 {
return Err("Choose a precision from 0 to 6".into());
}
+29 -7
View File
@@ -144,10 +144,36 @@ impl LiveShape {
/// from straight up (the Rotate field's sense). None for other shapes.
pub fn polygon_angle(&self) -> Option<f64> {
let LiveShape::Polygon { .. } = self else { return None };
// No −0° or 360° from rounding: a polygon drawn upright reads 0°.
self.shape_angle()
}
/// A rectangle's, ellipse's or polygon's angle (Rectangle, Ellipse and Polygon Angle): the
/// counterclockwise degrees in [0, 360) it is turned by (the Rotate field's sense). A rectangle or
/// ellipse drawn level reads 0°, as does a polygon drawn with its first vertex straight up. None for
/// other shapes.
pub fn shape_angle(&self) -> Option<f64> {
let (LiveShape::Rectangle { .. } | LiveShape::Ellipse { .. } | LiveShape::Polygon { .. }) = self else { return None };
// No −0° or 360° from rounding: a shape drawn level reads 0°.
let a = (-self.angle_deg()).rem_euclid(360.0);
Some(if a > 360.0 - 1e-9 { 0.0 } else { a + 0.0 })
}
/// Turn a rectangle, ellipse or polygon about its center to `angle` (degrees, as
/// [`LiveShape::shape_angle`]), keeping its size, corners and pie. Nothing changes for other
/// shapes or an angle that isn't finite.
pub fn set_shape_angle(&mut self, angle: f64) {
let Some(now) = self.shape_angle() else { return };
if !angle.is_finite() {
return;
}
// Brought into [0, 360) first: `now - angle` loses `now` for a very large angle.
let angle = angle.rem_euclid(360.0);
let (xf, local) = match self {
LiveShape::Rectangle { w, h, xf, .. } | LiveShape::Ellipse { w, h, xf, .. } => (xf, Point::new(*w / 2.0, *h / 2.0)),
LiveShape::Polygon { xf, .. } => (xf, Point::ZERO),
LiveShape::Line { .. } | LiveShape::Path { .. } => return,
};
let center = *xf * local;
*xf = Affine::rotate_about((now - angle).to_radians(), center) * *xf;
}
/// Whether a polygon's sides are all as long: `xf` scales it evenly and doesn't shear it. True
/// for other shapes.
pub fn polygon_sides_equal(&self) -> bool {
@@ -171,12 +197,8 @@ impl LiveShape {
}
/// Turn a polygon about its centre to `angle` (degrees, as [`LiveShape::polygon_angle`]).
pub fn set_polygon_angle(&mut self, angle: f64) {
let Some(now) = self.polygon_angle() else { return };
if let LiveShape::Polygon { xf, .. } = self
&& angle.is_finite()
{
let centre = *xf * Point::ZERO;
*xf = Affine::rotate_about((now - angle).to_radians(), centre) * *xf;
if let LiveShape::Polygon { .. } = self {
self.set_shape_angle(angle);
}
}
/// A line's length in the document, from its first end to its second. None for other shapes.
+14
View File
@@ -184,6 +184,20 @@ fn a_polygon_reports_and_takes_its_radius_angle_and_equal_sides() {
assert_eq!((e.polygon_radius(), e.polygon_angle()), (None, None));
}
/// A very large angle turns a rectangle to that angle modulo 360, whatever angle it had before.
#[test]
fn a_shape_takes_a_very_large_angle() {
let close = |a: f64, b: f64| (a - b).abs() < 1e-6;
let want = 1e20f64.rem_euclid(360.0);
for turned in [0.0, 90.0] {
let xf = Affine::translate((50.0, 50.0)) * Affine::rotate(-f64::to_radians(turned));
let mut r = LiveShape::Rectangle { w: 100.0, h: 50.0, radii: [0.0; 4], kinds: Default::default(), radii_relative: false, xf };
assert!(close(r.shape_angle().unwrap(), turned), "{:?}", r.shape_angle());
r.set_shape_angle(1e20);
assert!(close(r.shape_angle().unwrap(), want), "from {turned}°: {:?}, not {want}", r.shape_angle());
}
}
/// A node holding a live rectangle (`w` × `h`, all radii `r`, placed by `xf`) and its path.
fn live_rect(w: f64, h: f64, r: f64, xf: Affine) -> Node {
let live = LiveShape::Rectangle { w, h, radii: [r; 4], kinds: Default::default(), radii_relative: false, xf };
+1 -1
View File
@@ -907,7 +907,7 @@ pub use gradpresets::{GradientPreset, GradientPresetEntry};
pub use buildcmds::{TracePreset, TracePresetChange};
/// An Image Trace made off the UI thread, and what it traced (#3098).
pub use buildcmds::{TraceRun, Traced};
pub use buildcmds::{TraceRun, Traced, image_trace_target};
/// The saved Image Trace presets' revision and latest changes ([`crate::Session`] keeps them).
pub(crate) use buildcmds::TracePresetChanges;
+44
View File
@@ -182,6 +182,7 @@ pub const BUILTIN: &[BuiltinBrushLibrary] = &[
BuiltinBrushLibrary { id: "energy-beams", name: "Energy Beams", make: energy_beams },
BuiltinBrushLibrary { id: "dry-media", name: "Dry Media", make: dry_media },
BuiltinBrushLibrary { id: "tech-circuit", name: "Tech Circuit", make: tech_circuit },
BuiltinBrushLibrary { id: "engraving", name: "Engraving", make: engraving },
BuiltinBrushLibrary { id: "arrows", name: "Arrows", make: arrows },
BuiltinBrushLibrary { id: "image-brush", name: "Image Brush", make: image_brush },
];
@@ -237,6 +238,49 @@ fn art(name: &str, art: Node, colorization: Colorization) -> Brush {
Brush { name: name.into(), kind: BrushKind::Art(ArtBrush { art, colorization, ..Default::default() }) }
}
/// Original fine-line art for an engraving-style brush library.
fn engraving() -> BrushLibrary {
let lines = |count: usize, width: f64, spacing: f64| {
group(
(0..count)
.map(|i| {
let y = (i as f64 - (count - 1) as f64 / 2.0) * spacing;
black(shapes::rectangle(Rect::new(0.0, y - width / 2.0, 100.0, y + width / 2.0)))
})
.collect(),
)
};
let taper = group(
(0..5)
.map(|i| {
let y = (i as f64 - 2.0) * 2.2;
black(polygon(&[(0.0, y - 0.35), (80.0, y - 0.35), (100.0, y), (80.0, y + 0.35), (0.0, y + 0.35)]))
})
.collect(),
);
let broken = group(
(0..5)
.flat_map(|row| {
(0..4).map(move |segment| {
let x = segment as f64 * 25.0 + if row % 2 == 0 { 0.0 } else { 8.0 };
let y = (row as f64 - 2.0) * 2.2;
black(shapes::rectangle(Rect::new(x, y - 0.3, (x + 16.0).min(100.0), y + 0.3)))
})
})
.collect(),
);
built(
"Engraving",
Document::new(100.0, 100.0),
vec![
art("Fine Hatching", lines(5, 0.65, 2.2), Colorization::Tints),
art("Dense Hatching", lines(9, 0.42, 1.2), Colorization::Tints),
art("Tapered Hatching", taper, Colorization::Tints),
art("Broken Hatching", broken, Colorization::Tints),
],
)
}
/// An Arrows brush whose art stretches only between `start` and `end` (fractions of its length).
fn arrow_art(name: &str, art: Node, start: f64, end: f64) -> Brush {
Brush {
+1 -1
View File
@@ -42,7 +42,7 @@ pub(crate) use live_paint::{LivePaintMove, check_part_name, clear_part_name, iso
use live_paint::{lp_expand, lp_fill, lp_gap_options, lp_info, lp_make, lp_merge, lp_release, lp_stroke_edge};
use shape_builder::{sb_merge, sb_regions};
pub(crate) use trace::TracePresetChanges;
pub use trace::{TracePreset, TracePresetChange, TraceRun, Traced};
pub use trace::{TracePreset, TracePresetChange, TraceRun, Traced, image_trace_target};
use trace::{trace_expand, trace_make, trace_presets_delete, trace_presets_save, trace_release, trace_set_view};
/// Name of an Image Trace group.
+25 -19
View File
@@ -606,6 +606,30 @@ struct Prepared {
library: Vec<([u8; 3], Paint)>,
}
/// The object `imageTrace.make` would trace, without preparing settings or reading image bytes.
pub fn image_trace_target(s: &Session, p: &Value) -> Result<NodeId> {
target_image(s, "imageTrace.make", p).map(|(target, _)| target)
}
fn target_image(s: &Session, c: &str, p: &Value) -> Result<(NodeId, Box<ImageObject>)> {
let roots = root_ids(s, p)?;
let d = &s.doc()?.doc;
roots
.iter()
.find_map(|r| {
let n = d.node(*r)?;
match &n.kind {
NodeKind::Image(i) => Some((*r, i.clone())),
_ if is_trace_group(n) => match &n.children()?.first()?.kind {
NodeKind::Image(i) => Some((*r, i.clone())),
_ => None,
},
_ => None,
}
})
.ok_or_else(|| bad(c, "select an image (or an Image Trace group)"))
}
/// What command `c` with params `p` traces, and how, from the session: everything but the trace.
fn prepare(s: &Session, c: &str, p: &Value) -> Result<Prepared> {
let mut params = trace_params(s, c, p)?;
@@ -625,25 +649,7 @@ fn prepare(s: &Session, c: &str, p: &Value) -> Result<Prepared> {
None if is(tr::preset(named)) || is(tr::enhanced_preset(named)) => named.to_string(),
None => "Custom".to_string(),
};
let roots = root_ids(s, p)?;
// The image (inside a trace group, or selected directly).
let (target, image) = {
let d = &s.doc()?.doc;
roots
.iter()
.find_map(|r| {
let n = d.node(*r)?;
match &n.kind {
NodeKind::Image(i) => Some((*r, i.clone())),
_ if is_trace_group(n) => match &n.children()?.first()?.kind {
NodeKind::Image(i) => Some((*r, i.clone())),
_ => None,
},
_ => None,
}
})
.ok_or_else(|| bad(c, "select an image (or an Image Trace group)"))?
};
let (target, image) = target_image(s, c, p)?;
if by_color && s.doc()?.doc.node(target).is_some_and(vectorcraft_render::effects::has_pathfinder) {
return Err(bad(c, LIVE_PATHFINDER_BY_COLOR));
}
+74 -19
View File
@@ -26,6 +26,8 @@ use vectorcraft_render::proof;
use super::EngineError;
use super::{CommandSpec, Result, Session, always, bad, cmd, color_value, has_doc, switch_or, targets, text_param};
pub mod proof_file;
/// `Document.unknown` key under which files before format v3 kept the assigned profiles (migrated
/// to `Document::color_profiles` on load).
pub const PROFILES_KEY: &str = vectorcraft_doc::profiles::LEGACY_PROFILES_KEY;
@@ -100,10 +102,46 @@ pub fn specs() -> Vec<CommandSpec> {
"Proof Setup",
["View", "Proof Setup"],
None,
"{target?: \"workingCmyk\"|\"cmyk:<profile>\"|\"legacyMacRgb\"|\"srgb\"|\"monitorRgb\"|\"protanopia\"|\"deuteranopia\"|\"tritanopia\", intent?, simulatePaper?, proof?: bool (also turn Proof Colors on)} → proof state",
"{target?: \"workingCmyk\"|\"cmyk:<profile>\"|\"rgb:<profile>\"|\"legacyMacRgb\"|\"srgb\"|\"monitorRgb\"|\"protanopia\"|\"deuteranopia\"|\"tritanopia\" (cmyk: and rgb: name a CMYK or RGB profile of color.loadProfile or the built-in ones: the device to simulate), intent? (used while preserveNumbers is off), simulatePaper?: bool, preserveNumbers?: bool (Preserve CMYK or RGB Numbers: the colors' numbers in the document's space go to the device unchanged), simulateBlack?: bool (Simulate Black Ink: the device's black shows as the dark gray it prints; simulatePaper does this too; CMYK devices only, as simulatePaper), proof?: bool (also turn Proof Colors on)} → proof state",
always,
proof_setup
),
cmd!(
query "view.proofSetup.save",
"Save Proof Setup…",
[],
None,
"{path?: file | name?: a setup in the Proof Setups folder next to the preferences (at most 100 characters and no path characters; exactly one of the two), target?, intent?, simulatePaper?, preserveNumbers?, simulateBlack? (as view.proofSetup; default: the current proof setup's)} write a custom proof setup to a VectorCraft proof setup file (.vcproof, JSON) without changing the proof view. The target must be a device: workingCmyk, cmyk:<profile> or rgb:<profile> → {path, target, intent, simulatePaper, preserveNumbers, simulateBlack}",
always,
proof_file::save
),
cmd!(
query "view.proofSetup.load",
"Load Proof Setup…",
[],
None,
"{path?: file | name?: a setup in the Proof Setups folder (exactly one of the two)} read a proof setup file of at most 64 KiB that view.proofSetup.save wrote, make it the proof setup and turn Proof Colors on → {path} and the proof state. A file whose device names a profile that is not loaded is refused and nothing changes",
always,
proof_file::load
),
cmd!(
query "view.proofSetup.read",
"Read Proof Setup",
[],
None,
"{path?: file | name?: a setup in the Proof Setups folder (exactly one of the two)} the settings of a proof setup file, read as view.proofSetup.load reads it, without changing the proof view → {path, target, intent, simulatePaper, preserveNumbers, simulateBlack}",
always,
proof_file::read
),
cmd!(
query "view.proofSetup.list",
"Saved Proof Setups",
[],
None,
"{} the proof setup files in the Proof Setups folder next to the preferences, by name, at most 100 → {folder (null without the folder), setups: [{name, path}], truncated}",
always,
proof_file::list
),
cmd!(query "view.proofColors", "Proof Colors", ["View"], None, "{on?: bool (default: toggle)} → proof state", always, |s, p| {
toggle_view(s, p, "view.proofColors", |v, on| v.proof_colors = on.unwrap_or(!v.proof_colors))
}),
@@ -261,7 +299,7 @@ fn load_profile(s: &mut Session, p: &Value) -> Result<Value> {
use_front_profiles(s);
touch_all(s);
} else if proof_targets(&info.name) {
// A new file of the CMYK profile View → Proof Setup targets: redraw.
// A new file of the profile View → Proof Setup targets: redraw.
touch_all(s);
} else {
// Documents behind the front one draw through their own profiles: those assigned it redraw.
@@ -292,7 +330,7 @@ fn remove_profile(s: &mut Session, p: &Value) -> Result<Value> {
if active.rgb == name || active.cmyk == name {
use_front_profiles(s);
}
// The CMYK profile View → Proof Setup targets: redraw.
// The profile View → Proof Setup targets: redraw.
if proof_targets(&info.name) {
touch_all(s);
}
@@ -311,9 +349,9 @@ fn touch_assigned(s: &mut Session, name: &str) {
}
}
/// Whether View → Proof Setup targets the CMYK profile `name`.
/// Whether View → Proof Setup targets the CMYK or RGB profile `name`.
fn proof_targets(name: &str) -> bool {
matches!(proof::view().setup.target, ProofTarget::Cmyk(t) if t == name)
matches!(proof::view().setup.target, ProofTarget::Cmyk(t) | ProofTarget::Rgb(t) if t == name)
}
#[cfg(target_arch = "wasm32")]
@@ -1003,7 +1041,7 @@ impl PasteProfile {
if o.keys().any(|k| k != "rgb" && k != "cmyk") {
return Err(refuse());
}
let model = |m: &str| o.get(m).map(&one).transpose();
let model = |m: &str| o.get(m).map(one).transpose();
Ok(Some(PasteChoice { rgb: model("rgb")?, cmyk: model("cmyk")? }))
}
Some(v) => {
@@ -1392,6 +1430,8 @@ fn view_json(v: &proof::ProofView) -> Value {
"target": v.setup.target.id(),
"intent": v.setup.intent.id(),
"simulatePaper": v.setup.simulate_paper,
"preserveNumbers": v.setup.preserve_numbers,
"simulateBlack": v.setup.simulate_black,
"proofColors": v.proof_colors,
"overprintPreview": v.overprint,
"separations": v.separations,
@@ -1401,19 +1441,7 @@ fn view_json(v: &proof::ProofView) -> Value {
fn proof_setup(s: &mut Session, p: &Value) -> Result<Value> {
const C: &str = "view.proofSetup";
let mut v = proof::view();
if let Some(t) = text_param(p, "target", C)? {
let t = ProofTarget::parse(t).ok_or_else(|| bad(C, format!("unknown proof target `{t}`")))?;
if let ProofTarget::Cmyk(name) = &t
&& !cms::profile(name).is_some_and(|k| k.kind == cms::ProfileKind::Cmyk)
{
return Err(bad(C, format!("unknown CMYK profile `{name}`")));
}
v.setup.target = t;
}
if let Some(i) = intent_param(p, C)? {
v.setup.intent = i;
}
v.setup.simulate_paper = switch_or(p, "simulatePaper", v.setup.simulate_paper, C)?;
setup_params(p, &mut v.setup, C)?;
if let Some(on) = on_param(p, "proof", C)? {
v.proof_colors = on;
}
@@ -1421,6 +1449,33 @@ fn proof_setup(s: &mut Session, p: &Value) -> Result<Value> {
Ok(view_json(&v))
}
/// Take the proof setup settings `p` gives (`target`, `intent`, `simulatePaper`, `preserveNumbers`
/// and `simulateBlack`, as `view.proofSetup` reads them) into `setup`. A `cmyk:` or `rgb:` target
/// must name a CMYK or RGB profile that is loaded.
fn setup_params(p: &Value, setup: &mut cms::ProofSetup, cmd: &str) -> Result<()> {
if let Some(t) = text_param(p, "target", cmd)? {
let t = ProofTarget::parse(t).ok_or_else(|| bad(cmd, format!("unknown proof target `{t}`")))?;
if let ProofTarget::Cmyk(name) = &t
&& !cms::profile(name).is_some_and(|k| k.kind == cms::ProfileKind::Cmyk)
{
return Err(bad(cmd, format!("unknown CMYK profile `{name}`")));
}
if let ProofTarget::Rgb(name) = &t
&& !cms::profile(name).is_some_and(|k| k.kind == cms::ProfileKind::Rgb)
{
return Err(bad(cmd, format!("unknown RGB profile `{name}`")));
}
setup.target = t;
}
if let Some(i) = intent_param(p, cmd)? {
setup.intent = i;
}
setup.simulate_paper = switch_or(p, "simulatePaper", setup.simulate_paper, cmd)?;
setup.preserve_numbers = switch_or(p, "preserveNumbers", setup.preserve_numbers, cmd)?;
setup.simulate_black = switch_or(p, "simulateBlack", setup.simulate_black, cmd)?;
Ok(())
}
/// Make `v` the proof view and redraw every document. When `v` equals the current view, the view
/// and the revisions stay as they are; Separations Preview's visible plates are compared as a set.
fn store_view(s: &mut Session, v: proof::ProofView) {
@@ -0,0 +1,288 @@
//! View → Proof Setup → Customize…'s Save… and Load…: a custom proof setup (the device to simulate,
//! Preserve Numbers, the rendering intent, Simulate Paper Color and Simulate Black Ink) in a file,
//! and the setups saved in the `Proof Setups` folder next to the preferences, which View → Proof
//! Setup lists ([`Session::attach_proof_setups`]). `view.proofSetup.read` reads a file without
//! applying it, which is how Load… fills the dialog.
//!
//! The file format is VectorCraft's own: JSON with `format` [`FORMAT`], `version` 1, `target`,
//! `intent`, `simulatePaper`, `preserveNumbers` and `simulateBlack`, as `view.proofSetup` names
//! them, at most [`MAX_FILE`] bytes.
use serde_json::{Value, json};
use vectorcraft_color::cms::{self, Intent, ProofSetup, ProofTarget};
use vectorcraft_render::proof;
use super::super::{EngineError, fileio};
use super::{Result, Session, bad, setup_params, store_view, text_param, view_json};
/// The extension of a proof setup file.
pub const EXT: &str = "vcproof";
/// The `format` a proof setup file names.
pub const FORMAT: &str = "vectorcraft-proof-setup";
/// The format version this build writes and reads.
const VERSION: u64 = 1;
/// The largest proof setup file `view.proofSetup.load` reads, bytes (VectorCraft's own limit).
pub const MAX_FILE: usize = 64 << 10;
/// The most setups `view.proofSetup.list` lists.
pub const MAX_LISTED: usize = 100;
/// The most folder entries `view.proofSetup.list` looks at, setup files or not.
const MAX_SCANNED: usize = 100_000;
/// The longest `name`, in characters.
const MAX_NAME: usize = 100;
impl Session {
/// Keep the proof setups that `view.proofSetup.save` saves by name in the folder `dir` (`Proof
/// Setups` next to the preferences), which `view.proofSetup.list` lists. The folder is made
/// when a setup is first saved there.
pub fn attach_proof_setups(&mut self, dir: std::path::PathBuf) {
self.proof_setup_dir = Some(dir);
}
/// The saved proof setups' folder ([`Session::attach_proof_setups`]); none on the web.
pub fn proof_setup_dir(&self) -> Option<&std::path::Path> {
self.proof_setup_dir.as_deref().filter(|_| !cfg!(target_arch = "wasm32"))
}
/// How many proof setup files `view.proofSetup.save` wrote in this session; the menus list the
/// Proof Setups folder again when it changes.
pub fn proof_setup_saves(&self) -> u64 {
self.proof_setup_saves
}
}
/// The file `p` names for `cmd`: its `path`, or the setup `name` in the Proof Setups folder.
fn file_path(s: &Session, p: &Value, cmd: &str) -> Result<(String, bool)> {
match (text_param(p, "path", cmd)?, text_param(p, "name", cmd)?) {
(Some(path), None) if path.trim().is_empty() => Err(bad(cmd, "`path` is empty")),
(Some(path), None) => Ok((path.to_string(), false)),
(None, Some(name)) => {
let name = setup_name(name, cmd)?;
let dir = s.proof_setup_dir().ok_or_else(|| bad(cmd, "saved proof setups need the preferences folder, which this run doesn't have"))?;
let path = dir.join(format!("{name}.{EXT}"));
let path = path.to_str().ok_or_else(|| bad(cmd, format!("{}: the folder's path is not valid Unicode", dir.display())))?;
Ok((path.to_string(), true))
}
(Some(_), Some(_)) => Err(bad(cmd, "give `path` or `name`, not both")),
(None, None) => Err(bad(cmd, "missing `path` or `name`")),
}
}
/// `name` trimmed, when it can name a file in the Proof Setups folder: not empty, at most
/// [`MAX_NAME`] characters, no path or control characters, and not starting with a dot.
fn setup_name<'a>(name: &'a str, cmd: &str) -> Result<&'a str> {
let name = name.trim();
if name.is_empty() {
return Err(bad(cmd, "`name` is empty"));
}
if name.chars().count() > MAX_NAME {
return Err(bad(cmd, format!("`name` is longer than {MAX_NAME} characters")));
}
if name.starts_with('.') || name.chars().any(|c| c.is_control() || matches!(c, '/' | '\\' | ':' | '*' | '?' | '"' | '<' | '>' | '|')) {
return Err(bad(cmd, format!("`name` can't hold path characters: `{name}`")));
}
Ok(name)
}
/// `Ok` when `t` is a device a custom proof setup can simulate and its profile is loaded.
fn check_device(t: &ProofTarget) -> std::result::Result<(), String> {
let loaded = |name: &str, kind| cms::profile(name).is_some_and(|k| k.kind == kind);
match t {
ProofTarget::WorkingCmyk => Ok(()),
ProofTarget::Cmyk(name) if loaded(name, cms::ProfileKind::Cmyk) => Ok(()),
ProofTarget::Rgb(name) if loaded(name, cms::ProfileKind::Rgb) => Ok(()),
ProofTarget::Cmyk(name) => Err(format!("the device to simulate is the CMYK profile `{name}`, which is not loaded")),
ProofTarget::Rgb(name) => Err(format!("the device to simulate is the RGB profile `{name}`, which is not loaded")),
t => Err(format!("`{}` is not a device to simulate: a custom proof setup simulates workingCmyk, cmyk:<profile> or rgb:<profile>", t.id())),
}
}
/// The settings of `setup`, as `view.proofSetup` names them.
fn setup_json(setup: &ProofSetup) -> serde_json::Map<String, Value> {
let v = json!({
"target": setup.target.id(),
"intent": setup.intent.id(),
"simulatePaper": setup.simulate_paper,
"preserveNumbers": setup.preserve_numbers,
"simulateBlack": setup.simulate_black,
});
match v {
Value::Object(m) => m,
_ => serde_json::Map::new(),
}
}
/// The proof setup in a file's `bytes`, or why it can't be read.
pub fn parse(bytes: &[u8]) -> std::result::Result<ProofSetup, String> {
let v: Value = serde_json::from_slice(bytes).map_err(|e| format!("not a proof setup file: {e}"))?;
if v.get("format").and_then(Value::as_str) != Some(FORMAT) {
return Err("not a VectorCraft proof setup file".into());
}
match v.get("version").and_then(Value::as_u64) {
Some(VERSION) => {}
Some(n) if n > VERSION => return Err(format!("the file is version {n}, made by a newer VectorCraft")),
_ => return Err("the file has no version VectorCraft reads".into()),
}
let text = |key: &str| v.get(key).and_then(Value::as_str);
let target = text("target").ok_or("the file names no device to simulate")?;
let target = ProofTarget::parse(target).ok_or_else(|| format!("unknown proof target `{target}`"))?;
let intent = text("intent").ok_or("the file names no rendering intent")?;
let intent = Intent::parse(intent).ok_or_else(|| format!("unknown intent `{intent}`"))?;
let on = |key: &str| match v.get(key) {
None | Some(Value::Null) => Ok(false),
Some(Value::Bool(b)) => Ok(*b),
Some(_) => Err(format!("`{key}` must be true or false")),
};
Ok(ProofSetup {
target,
intent,
simulate_paper: on("simulatePaper")?,
preserve_numbers: on("preserveNumbers")?,
simulate_black: on("simulateBlack")?,
separations: None,
})
}
/// A proof setup file holding `setup`.
pub fn encode(setup: &ProofSetup) -> Vec<u8> {
let mut m = serde_json::Map::new();
m.insert("format".into(), json!(FORMAT));
m.insert("version".into(), json!(VERSION));
m.extend(setup_json(setup));
let mut bytes = serde_json::to_vec_pretty(&Value::Object(m)).unwrap_or_default();
bytes.push(b'\n');
bytes
}
pub(super) fn save(s: &mut Session, p: &Value) -> Result<Value> {
const C: &str = "view.proofSetup.save";
let (path, named) = file_path(s, p, C)?;
let mut setup = proof::view().setup;
setup_params(p, &mut setup, C)?;
check_device(&setup.target).map_err(|e| bad(C, e))?;
// A file `view.proofSetup.load` would refuse is not written (a device with a very long name).
let bytes = encode(&setup);
if bytes.len() > MAX_FILE {
return Err(bad(C, format!("{path}: larger than {MAX_FILE} bytes")));
}
if named
&& let Some(dir) = std::path::Path::new(&path).parent()
&& !dir.is_dir()
{
crate::file_access::check_write(&path).map_err(EngineError::Other)?;
std::fs::create_dir_all(dir).map_err(|e| bad(C, format!("{}: {e}", dir.display())))?;
}
fileio::write_file(&path, &bytes)?;
s.proof_setup_saves += 1;
let mut r = setup_json(&setup);
r.insert("path".into(), json!(path));
Ok(Value::Object(r))
}
/// The file `p` names for `cmd` and the usable proof setup in it.
fn read_setup(s: &Session, p: &Value, cmd: &str) -> Result<(String, ProofSetup)> {
let (path, _) = file_path(s, p, cmd)?;
// One byte past the limit shows a file over it, which is not read further.
let bytes = fileio::read_file_head(&path, MAX_FILE + 1)?;
if bytes.len() > MAX_FILE {
return Err(bad(cmd, format!("{path}: larger than {MAX_FILE} bytes")));
}
let setup = parse(&bytes).map_err(|e| bad(cmd, format!("{path}: {e}")))?;
check_device(&setup.target).map_err(|e| bad(cmd, format!("{path}: {e}")))?;
Ok((path, setup))
}
pub(super) fn read(s: &mut Session, p: &Value) -> Result<Value> {
let (path, setup) = read_setup(s, p, "view.proofSetup.read")?;
let mut r = setup_json(&setup);
r.insert("path".into(), json!(path));
Ok(Value::Object(r))
}
pub(super) fn load(s: &mut Session, p: &Value) -> Result<Value> {
let (path, setup) = read_setup(s, p, "view.proofSetup.load")?;
let mut v = proof::view();
// Separations Preview's plates are not part of a proof setup file.
v.setup = ProofSetup { separations: v.setup.separations.take(), ..setup };
v.proof_colors = true;
store_view(s, v.clone());
let mut r = view_json(&v);
r["path"] = json!(path);
Ok(r)
}
pub(super) fn list(s: &mut Session, _: &Value) -> Result<Value> {
let none = json!({"folder": null, "setups": [], "truncated": false});
let Some(dir) = s.proof_setup_dir() else { return Ok(none) };
listed(dir).map(|l| l.unwrap_or(none))
}
/// The web keeps no saved setups ([`Session::proof_setup_dir`]).
#[cfg(target_arch = "wasm32")]
pub fn listed(_: &std::path::Path) -> Result<Option<Value>> {
Ok(None)
}
/// The listing of the Proof Setups folder `dir`, as `view.proofSetup.list` gives it; `None` for a
/// request that may not read it. The app calls it on another thread, without a session.
#[cfg(not(target_arch = "wasm32"))]
pub fn listed(dir: &std::path::Path) -> Result<Option<Value>> {
const C: &str = "view.proofSetup.list";
let folder = dir.to_string_lossy().into_owned();
// A request that may not read the folder learns nothing of it, nor where it is.
if crate::file_access::check_read(&folder).is_err() {
return Ok(None);
}
// The listed paths are text: a folder whose path is not valid Unicode can't be named in them.
if dir.to_str().is_none() {
return Err(bad(C, format!("{folder}: the folder's path is not valid Unicode")));
}
let entries = match std::fs::read_dir(dir) {
Ok(entries) => entries,
// No folder yet: nothing has been saved.
Err(e) if e.kind() == std::io::ErrorKind::NotFound => return Ok(Some(json!({"folder": folder, "setups": [], "truncated": false}))),
Err(e) => return Err(bad(C, format!("{folder}: {e}"))),
};
// The setups' names, the first MAX_LISTED by name; other entries are passed over before the
// limit applies. A link is not followed. A file is listed only when it is named
// `<name>.vcproof` and `name` takes that name unchanged, so each listed name loads its own
// file. An entry that can't be read, or whose file name is not valid Unicode, leaves the
// listing incomplete.
let (mut names, mut truncated) = (Vec::<String>::new(), false);
for (i, e) in entries.enumerate() {
if i == MAX_SCANNED {
truncated = true;
break;
}
let Ok(e) = e else {
truncated = true;
continue;
};
let Ok(file) = e.file_name().into_string() else {
truncated = true;
continue;
};
let Some(name) = file.strip_suffix(EXT).and_then(|s| s.strip_suffix('.')) else { continue };
if setup_name(name, C).ok() != Some(name) {
continue;
}
match e.file_type() {
Ok(t) if t.is_file() => {}
Ok(_) => continue,
Err(_) => {
truncated = true;
continue;
}
}
names.push(name.to_string());
if names.len() > 2 * MAX_LISTED {
names.sort();
names.truncate(MAX_LISTED);
truncated = true;
}
}
names.sort();
truncated |= names.len() > MAX_LISTED;
names.truncate(MAX_LISTED);
let setups: Vec<Value> = names.iter().map(|name| json!({"name": name, "path": dir.join(format!("{name}.{EXT}")).to_string_lossy()})).collect();
Ok(Some(json!({"folder": folder, "setups": setups, "truncated": truncated})))
}
+2 -2
View File
@@ -14,7 +14,7 @@ pub fn specs() -> Vec<CommandSpec> {
"Create Dimension",
[],
None,
"{mode?: linear|angular|radius|diameter, a?: [x,y], b?: [x,y], vertex?: [x,y], source?: {kind: segment, edge: {node,subpath,segment}}|{kind: angle, first: edge, second: edge}|{kind: circle, node}|{kind: arc, edge}|{kind: points, a?, b?, vertex?: {node,subpath,anchor}, freeA?, freeB?: a point that is not an anchor, {kind: onSegment, edge: {node,subpath,segment}, t: 0..1 (curve parameter)}|{kind: anchors, node, anchors: [{subpath,anchor,part?: point|in|out (the anchor, default, or its in or out handle),weight}] (2 or 3 points of one path whose weights add up to 1), across?: (2 anchors only: times the first-to-second anchor vector (x,y) turned to (-y,x), which points down when the vector points right)} (an end is an anchor or a free point, not both)}, orientation?: aligned|horizontal|vertical (linear only: the distance between the points, or only its horizontal or vertical part; default aligned), offset?: pt (the line's distance from the first point: along the left normal of a → b when aligned, downward when horizontal, leftward when vertical; negative goes the other way), options?: {units: in|mm|pt|pc|px|cm|m|ft|yd, precision: 0-6, scale: drawing:real, hideUnits, lineWeight, lineType: solid|dashed|dotted, lineColor: [r,g,b], arrowStyle: filled|open|tick|none, arrowScale: %, extensionWeight, extensionType, extensionColor, extensionOffset, extensionLength, hideExtensions, fontFamily, fontStyle, fontSize, textColor, textPosition: away|between, textAlignment: left|center|right, textOffset}} → {id,label}; linked measurements follow source edits",
"{mode?: linear|angular|radius|diameter, a?: [x,y], b?: [x,y], vertex?: [x,y], source?: {kind: segment, edge: {node,subpath,segment}}|{kind: angle, first: edge, second: edge}|{kind: circle, node}|{kind: arc, edge}|{kind: points, a?, b?, vertex?: {node,subpath,anchor}, freeA?, freeB?: a point that is not an anchor, {kind: onSegment, edge: {node,subpath,segment}, t: 0..1 (curve parameter)}|{kind: anchors, node, anchors: [{subpath,anchor,part?: point|in|out (the anchor, default, or its in or out handle),weight}] (2 or 3 points of one path whose weights add up to 1), across?: (2 anchors only: times the first-to-second anchor vector (x,y) turned to (-y,x), which points down when the vector points right)} (an end is an anchor or a free point, not both)}, orientation?: aligned|horizontal|vertical (linear only: the distance between the points, or only its horizontal or vertical part; default aligned), offset?: pt (the line's distance from the first point: along the left normal of a → b when aligned, downward when horizontal, leftward when vertical; negative goes the other way), options?: {units: in|mm|pt|pc|px|cm|m|ft|yd, precision: 0-6, scale: drawing:real, hideUnits, lineWeight, lineType: solid|dashed|dotted, lineColor: [r,g,b], arrowStyle: filled|open|tick|none, arrowHead: null|a built-in stroke.set arrowhead name (Barbed, LineArrow…; drawn at both ends in place of arrowStyle's head; versions that have the stroke arrowhead but do not read arrowHead draw arrowStyle when they draw the dimension again; custom arrowheads are refused), arrowScale: %, extensionWeight, extensionType, extensionColor, extensionOffset, extensionLength, hideExtensions, fontFamily, fontStyle, fontSize, textColor, textPosition: away|between, textAlignment: left|center|right, textOffset}} → {id,label}; linked measurements follow source edits",
has_doc,
create
),
@@ -565,7 +565,7 @@ fn appearance(o: &DimensionOptions, mode: ColorMode, ext: bool, arrows: bool) ->
LineType::Solid => None,
};
if arrows {
let head = o.arrow_style.arrowhead();
let head = o.arrowhead();
st.start_arrow = head.clone();
st.end_arrow = head;
st.arrow_scale = (o.arrow_scale, o.arrow_scale);
+610 -96
View File
@@ -24,20 +24,28 @@
//! Light, Pin Light, Hard Mix, Subtract, Divide, Darker Color, Lighter Color) is merged with the
//! layers below it in its group. A Dissolve layer's partly transparent pixels are merged as opaque
//! or transparent, opaque at the share of its pixels their transparency gives, in a fixed pattern
//! that differs from layer to layer. When a merge's canvases would need more memory than allowed,
//! the layer comes in alone: in the Normal mode, or unclipped.
//! Hidden layers are left out unless `hidden` asks for them. A hidden layer that would need a merge
//! (one in a mode VectorCraft lacks, one that layers are clipped to, one clipped to another, or
//! one below a merged layer) is always left out, with the layers clipped to it. Adjustment layers,
//! fill layers that store no pixels and whose fill isn't read or whose shape is a vector mask,
//! layer effects that are switched on, knockouts and vector masks aren't applied; the warnings
//! count them and the hidden layers left out.
//! that differs from layer to layer. A layer or group in a group whose Knockout setting is 1 (read
//! as a shallow knockout) is merged with the layers below it in its group too, as the import option
//! describes: where it has pixels, they are cleared to transparency and it is drawn there at its fill
//! opacity, and its opacity fades that back toward them. In a pass-through group this is done only
//! when it and the visible layers below it are in the Normal mode. When a merge's canvases would need more
//! memory than allowed, the layer comes in alone: in the Normal mode, unclipped, or without its
//! knockout. Hidden layers are left out unless `hidden` asks for them. A hidden layer that would need
//! a merge (one in a mode VectorCraft lacks, one with a knockout in a group that changes the layers
//! below it, one that layers are clipped to, one clipped to another, or one below a merged layer) is
//! always left out, with the layers clipped to it. Adjustment layers, fill layers that store no
//! pixels and whose fill isn't read or whose shape is a vector mask, layer effects that are switched
//! on, vector masks, and the knockouts of top-level layers, of clipped layers, of layers that others
//! are clipped to and of layers in a pass-through group with a layer in another mode, and other
//! Knockout values, aren't applied; the warnings count them and the hidden layers left out.
//!
//! The file is untrusted: every count, length and size is checked before anything is allocated,
//! groups nest at most [`MAX_DEPTH`] deep (layers deeper than a document may nest merge into the
//! group around them, with a warning), each layer's pixels, like the canvases one step of a
//! merge holds together, must fit the memory allowed, and all the pixels decoded and the canvases
//! the merges make must fit [`TOTAL_DECODED`] times that.
//! the merges make must fit [`TOTAL_DECODED`] times that. A merge being tried may take that much
//! past what was read before it. What the merges that aren't made, or that a hidden layer would
//! need, decoded and made is counted apart, against the same limit.
use std::cell::Cell;
use std::sync::Arc;
@@ -66,6 +74,13 @@ const MAX_CHANNELS: usize = 56;
const MIN_RECORD: usize = 34;
const DAMAGED: &str = "the PSD file's layer records are damaged";
#[cfg(test)]
thread_local! {
/// The layer lists imports on this thread have walked, and the most a test lets them walk
/// before the import stops with an error.
pub(super) static WALKS: Cell<(usize, usize)> = const { Cell::new((0, usize::MAX)) };
}
/// The keys of the tagged blocks that make a layer an adjustment layer.
const ADJUSTMENTS: [&[u8; 4]; 18] = [
b"levl", b"curv", b"brit", b"blnc", b"hue ", b"hue2", b"selc", b"mixr", b"grdm", b"phfl", b"expA", b"vibA", b"thrs", b"nvrt", b"post", b"clrL",
@@ -227,7 +242,9 @@ struct Record<'a> {
content: Content,
effects: bool,
vector_mask: bool,
knockout: bool,
/// The Knockout setting's byte (`knko`): 0 none, 1 a shallow knockout. Any other value isn't
/// applied.
knockout: u8,
}
/// The layer records of `info` (the layer count, the records, then their channels' data).
@@ -285,7 +302,7 @@ fn record<'a>(r: &mut Reader<'a>, psb: bool) -> Result<(Record<'a>, Vec<(i16, us
content: Content::Pixels,
effects: false,
vector_mask: false,
knockout: false,
knockout: 0,
};
rec.read_extra(extra, psb)?;
Ok((rec, lengths))
@@ -345,8 +362,7 @@ impl Record<'_> {
b"lfx2" | b"lmfx" => effects = Some(effects == Some(true) || effects_on(data)),
b"lrFX" => old_effects = true,
b"vmsk" | b"vsms" => self.vector_mask = true,
// Shallow or deep knockout.
b"knko" => self.knockout = data.first().is_some_and(|&k| k != 0),
b"knko" => self.knockout = data.first().copied().unwrap_or(0),
k if ADJUSTMENTS.contains(&k) => self.content = Content::Adjustment,
_ => {}
}
@@ -612,6 +628,8 @@ struct Unit<'i> {
body: Body<'i>,
/// While layers are clipped to it: how its merged canvas is shaped.
clip: Option<Clip>,
/// Layers are clipped to it, merged into it or not.
base: bool,
}
impl Unit<'_> {
@@ -640,13 +658,36 @@ enum Clip {
enum Body<'i> {
/// A layer record's pixels.
Layer(usize),
/// A group's layers.
Group(&'i [Item]),
/// A group's record and its layers.
Group(usize, &'i [Item]),
/// Layers merged into one image.
Merged(Canvas),
}
/// Where a layer list is.
#[derive(Clone, Copy, PartialEq)]
enum Level {
/// The file's top level.
Top,
/// An isolated group, or a group drawn on its own.
Group,
/// A pass-through group whose layers blend with what is below it.
Pass,
}
/// What a knockout's merge with the layers below it gives.
enum Knocked {
/// The merged canvas.
Merged(Canvas),
/// Nothing below it draws, it draws nothing, it is at 0 fill and cuts no painted pixel below
/// it, or what is below it and the merge are both transparent: it comes in as a layer of its own.
Nothing,
/// The canvases would need more memory than allowed.
TooLarge,
}
/// A unit's body drawn alone.
#[derive(Clone)]
enum Drawn {
/// It draws nothing.
Nothing,
@@ -663,6 +704,7 @@ struct Notes {
fills: usize,
effects: usize,
vector_masks: usize,
/// Layers whose knockout wasn't applied.
knockouts: usize,
/// Hidden layers left out, and layers clipped to them.
hidden: usize,
@@ -677,11 +719,17 @@ struct Notes {
/// The counts a merge that can't be made gives back.
#[derive(Clone, Copy)]
struct Counts {
/// The bytes spent so far (see [`Builder::spent`]).
spent: u64,
skipped: usize,
/// The knockouts counted as not applied.
unknocked: usize,
merged: usize,
unmerged: usize,
unclipped: usize,
clipped_out: usize,
/// The groups found to read no pixels.
blank: usize,
}
/// Adds the warning for `n` things to `out`: `one` when `n` is 1, `many` with the count in place
@@ -745,8 +793,17 @@ impl Notes {
out
}
fn counts(&self, skipped: usize) -> Counts {
Counts { skipped, merged: self.merged.len(), unmerged: self.unmerged, unclipped: self.unclipped, clipped_out: self.clipped_out }
fn counts(&self, spent: u64, skipped: usize, unknocked: usize, blank: usize) -> Counts {
Counts {
spent,
skipped,
unknocked,
merged: self.merged.len(),
unmerged: self.unmerged,
unclipped: self.unclipped,
clipped_out: self.clipped_out,
blank,
}
}
}
@@ -767,12 +824,47 @@ struct Builder<'a, F> {
notes: Notes,
/// The records [`Notes`] counted.
noted: Vec<bool>,
/// Those records, in the order they were counted.
noted_log: Vec<usize>,
/// The records counted as hidden layers left out.
skipped: Vec<bool>,
/// Those records, in the order they were counted.
skip_log: Vec<usize>,
/// The records counted as knockouts not applied.
unknocked: Vec<bool>,
/// Those records, in the order they were counted.
unknock_log: Vec<usize>,
/// The records counted as layers clipped to a fill that isn't drawn.
clipped_out: Vec<bool>,
/// Those records, in the order they were counted.
clipped_out_log: Vec<usize>,
/// The records counted as clipped layers left unclipped.
unclipped: Vec<bool>,
/// Those records, in the order they were counted.
unclip_log: Vec<usize>,
/// The records that came in as layers of the document (hidden ones too, with `hidden`): not left
/// out, though a drawing for a merge that wasn't made counted them.
kept: Vec<bool>,
/// Bytes of layer and mask pixels decoded, and of canvases the merges made, so far.
spent: Cell<u64>,
/// Those bytes that merges not made, and merges a hidden layer would need, took: given back to
/// `spent` and counted here instead, against the same limit.
wasted: Cell<u64>,
/// `spent` when the innermost merge being tried began: until it is made or given up, it may
/// spend the whole allowance past that (see [`Self::spend`]).
trial: Cell<u64>,
/// The layers whose pixels were read so far (each time they were).
painted: Cell<usize>,
/// What each group gave when drawn alone without reading any layer's pixels (nothing, or a
/// canvas without pixels, whatever the memory left): drawing it again gives that without
/// walking its layers.
blank: Vec<Option<Drawn>>,
/// The pass-through groups that laid nothing onto nothing (see [`Self::laid_nothing`]).
laid_blank: Vec<bool>,
/// The groups of both, in the order they were found.
blank_log: Vec<usize>,
/// How many times a merge was counted as not made because it needed more memory than allowed.
squeezed: usize,
}
impl<F: Fn([f32; 4]) -> [f32; 3]> Builder<'_, F> {
@@ -786,10 +878,38 @@ impl<F: Fn([f32; 4]) -> [f32; 3]> Builder<'_, F> {
}
/// Count `bytes` of decoded pixels, or of a canvas a merge makes, against the whole import's
/// allowance, [`TOTAL_DECODED`] times the memory allowed for one image.
/// allowance, [`TOTAL_DECODED`] times the memory allowed for one image. While a merge is tried
/// (see [`Self::try_from_here`]), only what it spent counts against the allowance.
fn spend(&self, bytes: u64) -> Result<(), String> {
let total = self.spent.get().saturating_add(bytes);
self.spent.set(total);
if total.saturating_sub(self.trial.get()) > self.max_alloc.saturating_mul(TOTAL_DECODED) {
return Err("the PSD file's layers take more memory to read than allowed".into());
}
Ok(())
}
/// Start trying a merge that may not be made: what it spends counts against the whole
/// allowance, however much was spent before it. Gives what [`Self::tried`] takes back.
fn try_from_here(&self) -> u64 {
self.trial.replace(self.spent.get())
}
/// End the merge tried since [`Self::try_from_here`] gave `outer`. A merge that is `made` keeps
/// what it spent, which must then fit the allowance with what was spent before it.
fn tried(&self, outer: u64, made: bool) -> Result<(), String> {
self.trial.set(outer);
if made { self.spend(0) } else { Ok(()) }
}
/// Move the bytes spent since `spent` was the count to [`Self::wasted`], which has an allowance
/// of its own as large: what a merge that isn't made decoded doesn't take the room for reading
/// the layers apart.
fn refund(&self, spent: u64) -> Result<(), String> {
let since = self.spent.get().saturating_sub(spent);
self.spent.set(self.spent.get().min(spent));
let total = self.wasted.get().saturating_add(since);
self.wasted.set(total);
if total > self.max_alloc.saturating_mul(TOTAL_DECODED) {
return Err("the PSD file's layers take more memory to read than allowed".into());
}
@@ -814,6 +934,7 @@ impl<F: Fn([f32; 4]) -> [f32; 3]> Builder<'_, F> {
Paint::Cmyk(ink) => (self.cmyk)(ink),
};
let px = image::Rgba([byte(rgb[0]), byte(rgb[1]), byte(rgb[2]), 255]);
self.painted.set(self.painted.get() + 1);
return Ok(Some((0, 0, RgbaImage::from_pixel(h.width, h.height, px))));
}
Content::Pixels | Content::Type | Content::Solid(_) | Content::Fill => rec.bounds.size(),
@@ -845,6 +966,7 @@ impl<F: Fn([f32; 4]) -> [f32; 3]> Builder<'_, F> {
let rgb = to_rgb(h, |c| planes.get(c).map_or(0.0, |p| at(p, linear, 0.0)), &self.cmyk);
image::Rgba([byte(rgb[0]), byte(rgb[1]), byte(rgb[2]), byte(at(&alpha, false, 1.0))])
});
self.painted.set(self.painted.get() + 1);
Ok(Some((i64::from(rec.bounds.left), i64::from(rec.bounds.top), img)))
}
@@ -897,7 +1019,7 @@ impl<F: Fn([f32; 4]) -> [f32; 3]> Builder<'_, F> {
for item in items {
let (i, body) = match item {
Item::Layer(i) => (*i, Body::Layer(*i)),
Item::Group(i, children) => (*i, Body::Group(children)),
Item::Group(i, children) => (*i, Body::Group(*i, children)),
};
let rec = self.record(i)?;
let (name, hidden, clipped, blend) = (rec.name.clone(), rec.hidden, rec.clipped, rec.blend);
@@ -920,14 +1042,26 @@ impl<F: Fn([f32; 4]) -> [f32; 3]> Builder<'_, F> {
Some(b) => {
// Counted even when it draws nothing (an adjustment layer).
self.note(i)?;
if !unclipped && self.clip(&mut out, b, &body, i, &name, blend, opacity)? {
// A clipped layer's knockout isn't applied.
if self.record(i)?.knockout != 0 {
self.unknock(i);
}
if let Some(u) = out.get_mut(b) {
u.base = true;
}
let spent = self.spent.get();
let outer = self.try_from_here();
let made = !unclipped && self.clip(&mut out, b, &body, i, &name, blend, opacity)?;
self.tried(outer, made)?;
if made {
continue;
}
self.refund(spent)?;
// The merge doesn't fit: this layer and the next ones clipped to the same
// base come in as layers of their own.
unclipped = true;
self.notes.unclipped += 1;
out.push(Unit { name, visible: true, opacity, blend, mask_of: Some(i), record: i, body, clip: None });
self.unclip(i);
out.push(Unit { name, visible: true, opacity, blend, mask_of: Some(i), record: i, body, clip: None, base: false });
}
}
continue;
@@ -939,7 +1073,7 @@ impl<F: Fn([f32; 4]) -> [f32; 3]> Builder<'_, F> {
continue;
}
self.note(i)?;
out.push(Unit { name, visible: !hidden, opacity, blend, mask_of: Some(i), record: i, body, clip: None });
out.push(Unit { name, visible: !hidden, opacity, blend, mask_of: Some(i), record: i, body, clip: None, base: false });
base = Some(Some(out.len() - 1));
}
for u in &mut out {
@@ -962,7 +1096,7 @@ impl<F: Fn([f32; 4]) -> [f32; 3]> Builder<'_, F> {
};
// A fill whose shape is a vector mask isn't drawn, and nothing clipped to it is either.
if undrawn && u.clip.is_none() {
self.notes.clipped_out += 1;
self.clip_out(i);
return Ok(true);
}
let layer = match self.draw_body(body, Some(i))? {
@@ -1045,12 +1179,15 @@ impl<F: Fn([f32; 4]) -> [f32; 3]> Builder<'_, F> {
// Once, though a merge may draw it again.
match self.noted.get_mut(i) {
Some(true) => return Ok(()),
Some(n) => *n = true,
Some(n) => {
*n = true;
self.noted_log.push(i);
}
None => {}
}
let (content, empty, effects, vector_mask, knockout) = {
let (content, empty, effects, vector_mask) = {
let rec = self.record(i)?;
(rec.content, rec.stores_nothing(), rec.effects, rec.vector_mask, rec.knockout)
(rec.content, rec.stores_nothing(), rec.effects, rec.vector_mask)
};
match content {
Content::Type => self.notes.types += 1,
@@ -1062,10 +1199,59 @@ impl<F: Fn([f32; 4]) -> [f32; 3]> Builder<'_, F> {
}
self.notes.effects += usize::from(effects);
self.notes.vector_masks += usize::from(vector_mask);
self.notes.knockouts += usize::from(knockout);
Ok(())
}
/// What [`Self::note`] has counted so far: the length of its log, and the counts.
fn noted_so_far(&self) -> (usize, [usize; 5]) {
let n = &self.notes;
(self.noted_log.len(), [n.types, n.adjustments, n.fills, n.effects, n.vector_masks])
}
/// Forget what [`Self::note`] counted since `so_far`, for layers that are left out.
fn unnote(&mut self, (logged, counts): (usize, [usize; 5])) {
for i in self.noted_log.split_off(logged) {
if let Some(n) = self.noted.get_mut(i) {
*n = false;
}
}
let n = &mut self.notes;
[n.types, n.adjustments, n.fills, n.effects, n.vector_masks] = counts;
}
/// Count record `i` as a layer whose knockout isn't applied (once).
fn unknock(&mut self, i: usize) {
if let Some(s) = self.unknocked.get_mut(i)
&& !*s
{
*s = true;
self.notes.knockouts += 1;
self.unknock_log.push(i);
}
}
/// Does unit `u`, at `level` above the units `below` it, take a shallow knockout this import
/// applies? Only a layer or group in a group, neither clipped nor a base of clipped layers, does;
/// in a pass-through group, only when it and the visible units below it are in the Normal mode, so
/// that none of them blends with what is below the group. Any other knockout is counted as not
/// applied. One at 0 opacity, or with no visible unit below it, changes nothing below it: it needs
/// no merge, and a hidden one isn't left out for it.
fn knocks(&mut self, u: &Unit<'_>, below: &[Unit<'_>], level: Level) -> Result<bool, String> {
let rec = self.record(u.record)?;
if rec.knockout == 0 {
return Ok(false);
}
let normal = |u: &Unit<'_>| u.blend == Blend::Mode(BlendMode::Normal);
let blends_out = level == Level::Pass && !(normal(u) && below.iter().filter(|b| b.visible).all(normal));
let applies = rec.knockout == 1 && level != Level::Top && !blends_out && !rec.clipped && !u.base && !matches!(u.body, Body::Merged(_));
// Its fill opacity isn't checked: at 0 fill it still clears what is below it.
let changes = rec.opacity > 0.0 && below.iter().any(|b| b.visible);
if !applies {
self.unknock(u.record);
}
Ok(applies && changes)
}
/// Count record `i` as a hidden layer left out (once).
fn skip(&mut self, i: usize) {
if let Some(s) = self.skipped.get_mut(i)
@@ -1077,21 +1263,100 @@ impl<F: Fn([f32; 4]) -> [f32; 3]> Builder<'_, F> {
}
}
/// `items`' units with the layers in blend modes VectorCraft lacks merged with those below.
fn merged<'i>(&mut self, items: &'i [Item], keep_hidden: bool) -> Result<Vec<Unit<'i>>, String> {
/// Count record `i` as a layer clipped to a fill that isn't drawn (once).
fn clip_out(&mut self, i: usize) {
if let Some(s) = self.clipped_out.get_mut(i)
&& !*s
{
*s = true;
self.notes.clipped_out += 1;
self.clipped_out_log.push(i);
}
}
/// Count record `i` as a clipped layer left unclipped (once).
fn unclip(&mut self, i: usize) {
self.squeezed += 1;
if let Some(s) = self.unclipped.get_mut(i)
&& !*s
{
*s = true;
self.notes.unclipped += 1;
self.unclip_log.push(i);
}
}
/// `items`' units, at `level`, with the layers in blend modes VectorCraft lacks, and in a group
/// the layers with a shallow knockout, merged with those below.
fn merged<'i>(&mut self, items: &'i [Item], keep_hidden: bool, level: Level) -> Result<Vec<Unit<'i>>, String> {
#[cfg(test)]
{
let (walked, most) = WALKS.get();
if walked >= most {
return Err("the import walked more layer lists than the test allows".into());
}
WALKS.set((walked + 1, most));
}
let mut out: Vec<Unit<'i>> = vec![];
for mut u in self.units(items, keep_hidden)? {
// A hidden layer in a mode VectorCraft lacks would need the merge for its mode: it is left
// out without being drawn.
if !u.visible && matches!(u.blend, Blend::Other(_)) {
self.skip(u.record);
continue;
}
if self.knocks(&u, &out, level)? {
let saved = self.saved();
let noted = self.noted_so_far();
let squeezed = self.squeezed;
let outer = self.try_from_here();
let knocked = self.knock(&out, &u)?;
self.tried(outer, u.visible && matches!(knocked, Knocked::Merged(_)))?;
match knocked {
// A hidden layer that would need the merge is left out, and nothing its drawing
// counted is counted.
Knocked::Merged(_) | Knocked::TooLarge if !u.visible => {
self.restore(saved)?;
self.unnote(noted);
self.skip(u.record);
continue;
}
Knocked::Merged(canvas) => {
self.take_merge(&mut out, &u, canvas);
if let Blend::Other(other) = u.blend
&& !self.notes.merged.contains(&other.label())
{
self.notes.merged.push(other.label());
}
continue;
}
// Nothing below it, or nothing of its own, to knock out: it comes in as a layer,
// with the hidden layers its drawing left out (see `kept`). What its drawing
// read is read again when it comes in. A hidden one may still be left out by a
// later merge: what its drawing counted is counted when it comes in instead.
Knocked::Nothing if !u.visible => {
self.restore(saved)?;
self.unnote(noted);
}
// A merge below it that its held canvas left without the memory it needed may
// be made when they come in without it: what drawing them counted is given back
// and counted again then.
Knocked::Nothing if self.squeezed != squeezed => self.restore(saved)?,
Knocked::Nothing => self.refund(saved.spent)?,
Knocked::TooLarge => {
self.restore(saved)?;
self.squeezed += 1;
self.unknock(u.record);
}
}
}
let Blend::Other(other) = u.blend else {
out.push(u);
continue;
};
// A hidden layer that would need the merge is left out.
if !u.visible {
self.skip(u.record);
continue;
}
// A merge that can't be made counts nothing its groups would have counted.
let saved = self.notes.counts(self.skip_log.len());
let saved = self.saved();
let outer = self.try_from_here();
let made = match out.as_mut_slice() {
// Onto the previous merge alone: composited onto its canvas, in place.
[prev] if prev.is_merge() => {
@@ -1113,45 +1378,20 @@ impl<F: Fn([f32; 4]) -> [f32; 3]> Builder<'_, F> {
}
_ => match self.merge(&out, &u)? {
Some(canvas) => {
let mut name = String::new();
for (k, b) in out.iter_mut().filter(|b| b.visible).enumerate() {
if k == 0 {
name = std::mem::take(&mut b.name);
} else {
name.push_str(" + ");
name.push_str(&b.name);
}
}
if out.iter().any(|b| b.visible) {
name.push_str(" + ");
}
name.push_str(&u.name);
// Hidden layers below are left out with the rest.
for b in out.iter().filter(|b| !b.visible).map(|b| b.record).collect::<Vec<_>>() {
self.skip(b);
}
out.clear();
out.push(Unit {
name,
visible: true,
opacity: 1.0,
blend: Blend::Mode(BlendMode::Normal),
mask_of: None,
record: u.record,
body: Body::Merged(canvas),
clip: None,
});
self.take_merge(&mut out, &u, canvas);
true
}
None => false,
},
};
self.tried(outer, made)?;
if made {
if !self.notes.merged.contains(&other.label()) {
self.notes.merged.push(other.label());
}
} else {
self.restore(saved);
self.restore(saved)?;
self.squeezed += 1;
self.notes.unmerged += 1;
u.blend = Blend::Mode(BlendMode::Normal);
out.push(u);
@@ -1160,18 +1400,51 @@ impl<F: Fn([f32; 4]) -> [f32; 3]> Builder<'_, F> {
Ok(out)
}
/// The counts as they were before a merge that couldn't be made.
fn restore(&mut self, c: Counts) {
/// The counts as they are, for [`Self::restore`].
fn saved(&self) -> Counts {
self.notes.counts(self.spent.get(), self.skip_log.len(), self.unknock_log.len(), self.blank_log.len())
}
/// The counts as they were before a merge that couldn't be made, the bytes it spent counted as
/// wasted (see [`Self::refund`]).
fn restore(&mut self, c: Counts) -> Result<(), String> {
self.refund(c.spent)?;
for i in self.skip_log.split_off(c.skipped) {
if let Some(s) = self.skipped.get_mut(i) {
*s = false;
self.notes.hidden = self.notes.hidden.saturating_sub(1);
}
}
for i in self.unknock_log.split_off(c.unknocked) {
if let Some(s) = self.unknocked.get_mut(i) {
*s = false;
self.notes.knockouts = self.notes.knockouts.saturating_sub(1);
}
}
// The groups found since: what their drawing counted is given back, so they are drawn again.
for g in self.blank_log.split_off(c.blank) {
if let Some(b) = self.blank.get_mut(g) {
*b = None;
}
if let Some(b) = self.laid_blank.get_mut(g) {
*b = false;
}
}
for i in self.unclip_log.split_off(c.unclipped) {
if let Some(s) = self.unclipped.get_mut(i) {
*s = false;
self.notes.unclipped = self.notes.unclipped.saturating_sub(1);
}
}
for i in self.clipped_out_log.split_off(c.clipped_out) {
if let Some(s) = self.clipped_out.get_mut(i) {
*s = false;
self.notes.clipped_out = self.notes.clipped_out.saturating_sub(1);
}
}
self.notes.merged.truncate(c.merged);
self.notes.unmerged = c.unmerged;
self.notes.unclipped = c.unclipped;
self.notes.clipped_out = c.clipped_out;
Ok(())
}
/// The visible units `below` with `top` composited over them; `None` when the canvas would need
@@ -1186,24 +1459,169 @@ impl<F: Fn([f32; 4]) -> [f32; 3]> Builder<'_, F> {
Ok(Some(acc.unwrap_or_default()))
}
/// `out` replaced by one layer: `canvas`, the merge of its visible units with `top`, named after
/// them, bottom first. Its hidden units are left out.
fn take_merge<'i>(&mut self, out: &mut Vec<Unit<'i>>, top: &Unit<'_>, canvas: Canvas) {
let mut name = String::new();
for (k, b) in out.iter_mut().filter(|b| b.visible).enumerate() {
if k == 0 {
name = std::mem::take(&mut b.name);
} else {
name.push_str(" + ");
name.push_str(&b.name);
}
}
if out.iter().any(|b| b.visible) {
name.push_str(" + ");
}
name.push_str(&top.name);
// Hidden layers below are left out with the rest.
for b in out.iter().filter(|b| !b.visible).map(|b| b.record).collect::<Vec<_>>() {
self.skip(b);
}
out.clear();
out.push(Unit {
name,
visible: true,
opacity: 1.0,
blend: Blend::Mode(BlendMode::Normal),
mask_of: None,
record: top.record,
body: Body::Merged(canvas),
clip: None,
base: false,
});
}
/// The visible units `below` with `top`, a layer with a shallow knockout, knocking them out: where
/// `top` has pixels, what is below it in its group is cleared to transparency (the group's own
/// backdrop) and `top` is drawn there at its fill opacity; its opacity then fades all of that
/// back toward the units below as they were. Its layer mask shapes the cut.
fn knock(&mut self, below: &[Unit<'_>], top: &Unit<'_>) -> Result<Knocked, String> {
let (fill, opacity) = {
let rec = self.record(top.record)?;
(rec.fill, rec.opacity)
};
let k = match self.draw_body(&top.body, top.mask_of)? {
Drawn::Nothing => return Ok(Knocked::Nothing),
Drawn::TooLarge => return Ok(Knocked::TooLarge),
Drawn::Canvas(c) if c.px.iter().all(|p| p[3] <= 0.0) => return Ok(Knocked::Nothing),
Drawn::Canvas(c) => c,
};
// At 0 fill, beside every layer below it, it cuts nothing: no canvas for them is needed.
if fill <= 0.0 && self.beside(below, &k)? {
return Ok(Knocked::Nothing);
}
// The layer's canvas is held while the units below are drawn.
let bytes = 16 * k.px.len() as u64;
self.held = self.held.saturating_add(bytes);
let mut acc: Option<Canvas> = None;
let mut drawn = Ok(true);
for u in below.iter().filter(|u| u.visible) {
drawn = self.composite(&mut acc, u);
if !matches!(drawn, Ok(true)) {
break;
}
}
self.held = self.held.saturating_sub(bytes);
if !drawn? {
return Ok(Knocked::TooLarge);
}
// Nothing below draws.
let Some(below) = acc.as_ref() else { return Ok(Knocked::Nothing) };
// At 0 fill it draws nothing of its own: where it cuts no painted pixel below, no canvas for
// the merge is needed.
if fill <= 0.0 && !cuts_paint(below, &k, top.blend, opacity, top.record) {
return Ok(Knocked::Nothing);
}
let clear = |c: &Canvas| c.px.iter().all(|p| p[3] <= 0.0);
let below_clear = clear(below);
if !knock_onto(&mut acc, &k, top.blend, fill, opacity, top.record, self.room(), &|n| self.spend(n))? {
return Ok(Knocked::TooLarge);
}
// Nothing below to cut, and nothing of its own drawn at its fill opacity.
if below_clear && acc.as_ref().is_none_or(clear) {
return Ok(Knocked::Nothing);
}
Ok(acc.map_or(Knocked::Nothing, Knocked::Merged))
}
/// Do the pixels `knock` paints lie outside the bounds of every visible unit `below`? Only the
/// bounds of layers and of merged canvases are known without drawing them: with a group below,
/// `false`.
fn beside(&self, below: &[Unit<'_>], knock: &Canvas) -> Result<bool, String> {
let width = knock.width.max(1);
let mut painted: Option<[i64; 4]> = None;
for (k, _) in knock.px.iter().enumerate().filter(|(_, p)| p[3] > 0.0) {
let (x, y) = (knock.left + (k % width) as i64, knock.top + (k / width) as i64);
painted = Some(painted.map_or([x, y, x + 1, y + 1], |[l, t, r, b]| [l.min(x), t.min(y), r.max(x + 1), b.max(y + 1)]));
}
let Some([left, top, right, bottom]) = painted else { return Ok(true) };
for u in below.iter().filter(|u| u.visible) {
let [l, t, r, b] = match &u.body {
Body::Merged(c) => [c.left, c.top, c.left + c.width as i64, c.top + c.height as i64],
Body::Layer(i) => {
let rec = self.record(*i)?;
match rec.content {
Content::Adjustment => continue,
Content::Solid(Some(_)) if rec.color_over_canvas() => [0, 0, i64::from(self.h.width), i64::from(self.h.height)],
_ => {
let (w, h) = rec.bounds.size();
let (l, t) = (i64::from(rec.bounds.left), i64::from(rec.bounds.top));
[l, t, l + w as i64, t + h as i64]
}
}
}
Body::Group(..) => return Ok(false),
};
if l < right && left < r && t < bottom && top < b {
return Ok(false);
}
}
Ok(true)
}
/// The bytes a merge step may still take: the memory allowed, less the copies of what is below
/// the pass-through groups being merged.
fn room(&self) -> u64 {
self.max_alloc.saturating_sub(self.held)
}
/// Note pass-through group `g` as laying nothing onto nothing when `acc`, nothing before, still
/// is and no layer's pixels were read since `painted`: laying its layers onto nothing again
/// gives nothing, with the same notes.
fn laid_nothing(&mut self, g: usize, acc: &Option<Canvas>, painted: usize) {
if acc.is_none()
&& self.painted.get() == painted
&& let Some(b) = self.laid_blank.get_mut(g)
&& !*b
{
*b = true;
self.blank_log.push(g);
}
}
/// Unit `u` composited onto `acc`. A pass-through group lays its layers onto `acc` one by one,
/// so that they blend with what is below it; at less than full opacity or with a layer mask, the
/// result is then faded back toward `acc` as it was by the opacity and the mask. Anything else
/// is drawn alone first. `false` when the canvas would need more memory than allowed.
fn composite(&mut self, acc: &mut Option<Canvas>, u: &Unit<'_>) -> Result<bool, String> {
if let (Body::Group(items), Blend::Pass) = (&u.body, u.blend) {
if let (Body::Group(g, items), Blend::Pass) = (&u.body, u.blend) {
let mask = match u.mask_of {
Some(i) if self.has_mask(Some(i))? => self.mask(i, false)?,
_ => None,
};
// Onto nothing, a group that laid nothing onto nothing before lays nothing again.
let (fresh, painted) = (acc.is_none(), self.painted.get());
if fresh && self.laid_blank.get(*g) == Some(&true) {
return Ok(true);
}
if u.opacity >= 1.0 && mask.is_none() {
return self.lay(acc, items);
let laid = self.lay(acc, items, Level::Pass)?;
if laid && fresh {
self.laid_nothing(*g, acc, painted);
}
return Ok(laid);
}
let bytes = acc.as_ref().map_or(0, |c| 16 * c.px.len() as u64);
if bytes > self.room() {
@@ -1212,11 +1630,14 @@ impl<F: Fn([f32; 4]) -> [f32; 3]> Builder<'_, F> {
self.spend(bytes)?;
let below = acc.clone();
self.held = self.held.saturating_add(bytes);
let laid = self.lay(acc, items);
let laid = self.lay(acc, items, Level::Pass);
self.held = self.held.saturating_sub(bytes);
if !laid? {
return Ok(false);
}
if fresh {
self.laid_nothing(*g, acc, painted);
}
if let Some(after) = acc.as_mut() {
fade(after, below.as_ref(), u.opacity, mask.as_ref());
}
@@ -1230,10 +1651,10 @@ impl<F: Fn([f32; 4]) -> [f32; 3]> Builder<'_, F> {
blend_onto(acc, &c, u.blend, u.opacity, u.record, self.room(), &|n| self.spend(n))
}
/// `items`' layers composited onto `acc` one by one; `false` when a canvas would need more
/// memory than allowed.
fn lay(&mut self, acc: &mut Option<Canvas>, items: &[Item]) -> Result<bool, String> {
for c in self.merged(items, false)? {
/// `items`' layers, the layers of a group at `level`, composited onto `acc` one by one; `false`
/// when a canvas would need more memory than allowed.
fn lay(&mut self, acc: &mut Option<Canvas>, items: &[Item], level: Level) -> Result<bool, String> {
for c in self.merged(items, false, level)? {
if !self.composite(acc, &c)? {
return Ok(false);
}
@@ -1271,13 +1692,29 @@ impl<F: Fn([f32; 4]) -> [f32; 3]> Builder<'_, F> {
}
None => return Ok(Drawn::Nothing),
},
Body::Group(items) => {
let mut acc: Option<Canvas> = None;
if !self.lay(&mut acc, items)? {
return Ok(Drawn::TooLarge);
Body::Group(g, items) => {
let drawn = match self.blank.get(*g).cloned().flatten() {
Some(d) => d,
None => {
let painted = self.painted.get();
let mut acc: Option<Canvas> = None;
if !self.lay(&mut acc, items, Level::Group)? {
return Ok(Drawn::TooLarge);
}
let d = acc.map_or(Drawn::Nothing, Drawn::Canvas);
if self.painted.get() == painted
&& let Some(b) = self.blank.get_mut(*g)
{
*b = Some(d.clone());
self.blank_log.push(*g);
}
d
}
};
match drawn {
Drawn::Canvas(c) => c,
other => return Ok(other),
}
let Some(acc) = acc else { return Ok(Drawn::Nothing) };
acc
}
};
if let Some(i) = mask_of {
@@ -1306,10 +1743,10 @@ impl<F: Fn([f32; 4]) -> [f32; 3]> Builder<'_, F> {
Ok(n)
}
/// Layers of the document for `items`, bottom first.
fn list(&mut self, items: &[Item]) -> Result<Vec<Arc<Node>>, String> {
/// Layers of the document for `items`, the layers at `level`, bottom first.
fn list(&mut self, items: &[Item], level: Level) -> Result<Vec<Arc<Node>>, String> {
let mut out = vec![];
for u in self.merged(items, self.hidden)? {
for u in self.merged(items, self.hidden, level)? {
if let Some(n) = self.node(u)? {
out.push(Arc::new(n));
}
@@ -1320,6 +1757,9 @@ impl<F: Fn([f32; 4]) -> [f32; 3]> Builder<'_, F> {
/// The layer of the document unit `u` becomes; `None` for a layer that draws nothing (an
/// adjustment layer, or one without pixels).
fn node(&mut self, u: Unit<'_>) -> Result<Option<Node>, String> {
if let Some(k) = self.kept.get_mut(u.record) {
*k = true;
}
let children = match &u.body {
Body::Layer(i) => match self.image(*i)? {
Some((left, top, img)) => vec![Arc::new(self.image_node(&u.name, left, top, img)?)],
@@ -1329,13 +1769,13 @@ impl<F: Fn([f32; 4]) -> [f32; 3]> Builder<'_, F> {
Some((left, top, img)) => vec![Arc::new(self.image_node(&u.name, left, top, img)?)],
None => return Ok(None),
},
Body::Group(items) => self.list(items)?,
Body::Group(_, items) => self.list(items, if u.blend == Blend::Pass { Level::Pass } else { Level::Group })?,
};
let mut layer = self.layer(&u.name);
layer.visible = u.visible;
layer.opacity = u.opacity.clamp(0.0, 1.0);
(layer.blend, layer.isolate) = match u.blend {
Blend::Mode(m) => (m, matches!(u.body, Body::Group(_))),
Blend::Mode(m) => (m, matches!(u.body, Body::Group(..))),
Blend::Pass | Blend::Other(_) => (BlendMode::Normal, false),
};
if let Some(c) = layer.children_mut() {
@@ -1443,6 +1883,71 @@ fn blend_onto(
max_alloc: u64,
spend: &dyn Fn(u64) -> Result<(), String>,
) -> Result<bool, String> {
if !cover(acc, src, max_alloc, spend)? {
return Ok(false);
}
let Some(out) = acc.as_mut() else { return Ok(false) };
// Only the source's rows and columns change.
let (sw, x0, y0) = (src.width.max(1), (src.left - out.left) as usize, (src.top - out.top) as usize);
for (k, s) in src.px.iter().enumerate() {
let Some(p) = out.px.get_mut((y0 + k / sw) * out.width + x0 + k % sw) else { continue };
let a = coverage(blend, s[3] * opacity, src.left + (k % sw) as i64, src.top + (k / sw) as i64, record);
*p = over(blend, *p, [s[0], s[1], s[2], a]);
}
Ok(true)
}
/// `knock` (of record `record`, in `blend`, with its `fill` and `opacity`), a layer with a shallow
/// knockout, knocking out `acc`, on a canvas covering both, as [`blend_onto`] makes it. Where
/// `knock` has pixels, its transparency is the share of `acc` cleared and replaced by its color at
/// `fill`; `opacity` then fades that back toward `acc` (in Dissolve, each pixel is cleared fully
/// or not at all, at the share its transparency times `opacity` gives). `false`, with `acc` as it
/// was, when the canvases would take more than `max_alloc` bytes.
#[allow(clippy::too_many_arguments)]
fn knock_onto(
acc: &mut Option<Canvas>,
knock: &Canvas,
blend: Blend,
fill: f32,
opacity: f32,
record: usize,
max_alloc: u64,
spend: &dyn Fn(u64) -> Result<(), String>,
) -> Result<bool, String> {
if !cover(acc, knock, max_alloc, spend)? {
return Ok(false);
}
let Some(out) = acc.as_mut() else { return Ok(false) };
let (fill, opacity) = (fill.clamp(0.0, 1.0), opacity.clamp(0.0, 1.0));
let (kw, x0, y0) = (knock.width.max(1), (knock.left - out.left) as usize, (knock.top - out.top) as usize);
for (k, s) in knock.px.iter().enumerate() {
let Some(p) = out.px.get_mut((y0 + k / kw) * out.width + x0 + k % kw) else { continue };
let t = coverage(blend, s[3].clamp(0.0, 1.0) * opacity, knock.left + (k % kw) as i64, knock.top + (k / kw) as i64, record);
let below = p[3].clamp(0.0, 1.0);
let alpha = (1.0 - t) * below + t * fill;
if alpha <= 0.0 {
*p = [0.0; 4];
continue;
}
let mix = |i: usize| ((1.0 - t) * below * p[i] + t * fill * s[i]) / alpha;
*p = [mix(0), mix(1), mix(2), alpha];
}
Ok(true)
}
/// Does `knock`, as [`knock_onto`] takes it, clear any of a pixel of `below` that has paint?
fn cuts_paint(below: &Canvas, knock: &Canvas, blend: Blend, opacity: f32, record: usize) -> bool {
let (kw, opacity) = (knock.width.max(1), opacity.clamp(0.0, 1.0));
knock.px.iter().enumerate().any(|(k, s)| {
let (x, y) = (knock.left + (k % kw) as i64, knock.top + (k / kw) as i64);
below.get(x, y).is_some_and(|b| b[3] > 0.0) && coverage(blend, s[3].clamp(0.0, 1.0) * opacity, x, y, record) > 0.0
})
}
/// `acc` grown, when it doesn't already, to a canvas covering itself and `src` (a new one counted
/// with `spend`). `false`, with `acc` as it was, when the canvases held, `acc` and `src` and a
/// larger canvas when one is needed, would take more than `max_alloc` bytes.
fn cover(acc: &mut Option<Canvas>, src: &Canvas, max_alloc: u64, spend: &dyn Fn(u64) -> Result<(), String>) -> Result<bool, String> {
let (mut left, mut top, mut right, mut bottom) = (src.left, src.top, src.left + src.width as i64, src.top + src.height as i64);
if let Some(a) = acc.as_ref() {
left = left.min(a.left);
@@ -1475,14 +1980,6 @@ fn blend_onto(
}
*acc = Some(out);
}
let Some(out) = acc.as_mut() else { return Ok(false) };
// Only the source's rows and columns change.
let (sw, x0, y0) = (src.width.max(1), (src.left - left) as usize, (src.top - top) as usize);
for (k, s) in src.px.iter().enumerate() {
let Some(p) = out.px.get_mut((y0 + k / sw) * width + x0 + k % sw) else { continue };
let a = coverage(blend, s[3] * opacity, src.left + (k % sw) as i64, src.top + (k / sw) as i64, record);
*p = over(blend, *p, [s[0], s[1], s[2], a]);
}
Ok(true)
}
@@ -1521,11 +2018,28 @@ pub(super) fn import(
layers: 0,
notes: Notes::default(),
noted: vec![false; records.len()],
noted_log: vec![],
skipped: vec![false; records.len()],
skip_log: vec![],
unknocked: vec![false; records.len()],
unknock_log: vec![],
clipped_out: vec![false; records.len()],
clipped_out_log: vec![],
unclipped: vec![false; records.len()],
unclip_log: vec![],
kept: vec![false; records.len()],
spent: Cell::new(0),
wasted: Cell::new(0),
trial: Cell::new(0),
painted: Cell::new(0),
blank: vec![None; records.len()],
laid_blank: vec![false; records.len()],
blank_log: vec![],
squeezed: 0,
};
let layers = b.list(&items)?;
let layers = b.list(&items, Level::Top)?;
// A drawing for a knockout or a clip leaves hidden layers out; those that came in anyway aren't.
b.notes.hidden = b.skipped.iter().zip(&b.kept).filter(|&(s, k)| *s && !*k).count();
let Builder { mut doc, notes, .. } = b;
if !layers.is_empty() {
doc.layers = layers;
@@ -646,6 +646,453 @@ fn dissolve_layers_merge_as_opaque_or_transparent_pixels() {
assert!((32..=96).contains(&red), "{red} of 256 pixels show the lower layer: {r}");
}
/// A layer with a Knockout value of `knko` and a fill opacity of `fill`.
fn knockout(l: L, knko: u8, fill: u8) -> L {
let mut l = l;
l.blocks.push((*b"knko", vec![knko, 0, 0, 0]));
l.blocks.push((*b"iOpa", vec![fill]));
l
}
/// A green layer under a group of `group_blend` holding a red layer and `cut` above it.
fn knockout_stack(group_blend: &'static [u8; 4], cut: L) -> Vec<L> {
vec![
layer("Outside", [0, 0, 4, 4], [0, 255, 0, 255]),
group_end(),
layer("Lower", [0, 0, 4, 4], [255, 0, 0, 255]),
cut,
group("Group", group_blend),
]
}
/// The names of the document's layers, and of the layers in its second one.
fn knockout_names(s: &Session) -> (Vec<String>, Vec<String>) {
let d = &s.doc().unwrap().doc;
let names = |ls: &[std::sync::Arc<Node>]| ls.iter().map(|l| name(l).to_string()).collect::<Vec<_>>();
(names(&d.layers), d.layers.get(1).and_then(|g| g.children()).map_or(vec![], |c| names(c)))
}
/// A layer with a shallow knockout in a group merges with the layers below it in the group: its
/// shape clears them to transparency, it draws there at its fill opacity, and its opacity fades
/// that. What is outside the group stays a layer of its own and shows through.
#[test]
fn knockout_layers_merge_with_the_layers_below_them_in_their_group() {
let cut = |fill: u8, opacity: u8| knockout(L { opacity, ..layer("Cut", [0, 0, 2, 2], [0, 0, 255, 255]) }, 1, fill);
for (fill, opacity, at_cut) in [(0, 255, [0, 0, 0, 0]), (128, 255, [0, 0, 255, 128]), (0, 128, [255, 0, 0, 127]), (255, 255, [0, 0, 255, 255])] {
for group_blend in [b"norm", b"pass"] {
let (s, r) = open(&file(4, 4, &knockout_stack(group_blend, cut(fill, opacity)), 8, false, false), json!({}));
assert_eq!(r["warnings"], json!([]), "{r}");
let (top, inner) = knockout_names(&s);
assert_eq!((top, inner), (vec!["Outside".to_string(), "Group".into()], vec!["Lower + Cut".to_string()]), "{fill} {opacity}");
let d = &s.doc().unwrap().doc;
assert_eq!(d.layers[1].isolate, group_blend == b"norm");
let ((x, y), px) = image_of(&s, &d.layers[1].children().unwrap()[0]);
assert_eq!(((x, y), px.dimensions()), ((0.0, 0.0), (4, 4)));
assert_eq!((px.get_pixel(1, 1).0, px.get_pixel(3, 3).0), (at_cut, [255, 0, 0, 255]), "{fill} {opacity}");
}
}
// A layer mask shapes the cut: where it hides the layer, nothing below is cleared.
let mut masked = cut(0, 255);
masked.mask = Some(([0, 0, 1, 1], 255, 0, vec![0]));
let (s, r) = open(&file(4, 4, &knockout_stack(b"norm", masked), 8, false, false), json!({}));
let px = image_of(&s, &s.doc().unwrap().doc.layers[1].children().unwrap()[0]).1;
assert_eq!((px.get_pixel(0, 0).0, px.get_pixel(1, 1).0), ([255, 0, 0, 255], [0, 0, 0, 0]), "{r}");
// Without a knockout (0), the layers stay apart.
let (s, r) =
open(&file(4, 4, &knockout_stack(b"norm", knockout(layer("Cut", [0, 0, 2, 2], [0, 0, 255, 255]), 0, 0)), 8, false, false), json!({}));
assert_eq!((knockout_names(&s).1, &r["warnings"]), (vec!["Lower".to_string(), "Cut".into()], &json!([])), "{r}");
}
/// The knockouts this import doesn't apply come in as layers, counted in a warning: at the top level,
/// on a clipped layer, and with a Knockout value other than 1. Hidden ones that would need the merge
/// are left out; one that draws nothing, or nothing below it, merges nothing.
#[test]
fn knockouts_that_arent_applied_are_said() {
const UNAPPLIED: &str = "the knockout of 1 layer wasn't applied";
let cut = |l: L, knko: u8| knockout(l, knko, 0);
let blue = || layer("Cut", [0, 0, 2, 2], [0, 0, 255, 255]);
// At the top level.
let layers = [layer("Lower", [0, 0, 4, 4], [255, 0, 0, 255]), cut(blue(), 1)];
let (s, r) = open(&file(4, 4, &layers, 8, false, false), json!({}));
assert_eq!((knockout_names(&s).0, &r["warnings"]), (vec!["Lower".to_string(), "Cut".into()], &json!([UNAPPLIED])), "{r}");
// Another Knockout value, and a clipped layer, in a group.
let (s, r) = open(&file(4, 4, &knockout_stack(b"norm", cut(blue(), 2)), 8, false, false), json!({}));
assert_eq!((knockout_names(&s).1, &r["warnings"]), (vec!["Lower".to_string(), "Cut".into()], &json!([UNAPPLIED])), "{r}");
let (s, r) = open(&file(4, 4, &knockout_stack(b"norm", cut(L { clipped: true, ..blue() }, 1)), 8, false, false), json!({}));
assert_eq!((knockout_names(&s).1, &r["warnings"]), (vec!["Lower + Cut".to_string()], &json!([UNAPPLIED])), "{r}");
// In a pass-through group, a layer below it, or the knockout itself, in another mode blends with
// what is outside the group: the layers stay apart, and the lower one still multiplies the green
// outside. In an isolated group they merge.
let mut multiply = knockout_stack(b"pass", cut(blue(), 1));
multiply[2].blend = b"mul ";
let (s, r) = open(&file(4, 4, &multiply, 8, false, false), json!({}));
assert_eq!((knockout_names(&s).1, &r["warnings"]), (vec!["Lower".to_string(), "Cut".into()], &json!([UNAPPLIED])), "{r}");
assert_eq!(s.doc().unwrap().doc.layers[1].children().unwrap()[0].blend, BlendMode::Multiply);
let (s, r) = open(&file(4, 4, &knockout_stack(b"pass", cut(L { blend: b"mul ", ..blue() }, 1)), 8, false, false), json!({}));
assert_eq!((knockout_names(&s).1, &r["warnings"]), (vec!["Lower".to_string(), "Cut".into()], &json!([UNAPPLIED])), "{r}");
multiply[4] = group("Group", b"norm");
let (s, r) = open(&file(4, 4, &multiply, 8, false, false), json!({}));
assert_eq!((knockout_names(&s).1, &r["warnings"]), (vec!["Lower + Cut".to_string()], &json!([])), "{r}");
// A hidden knockout would need the merge: left out, hidden layers asked for or not.
for hidden in [false, true] {
let (s, r) =
open(&file(4, 4, &knockout_stack(b"norm", cut(L { hidden: true, ..blue() }, 1)), 8, false, false), json!({"hiddenLayers": hidden}));
assert_eq!((knockout_names(&s).1, &r["warnings"]), (vec!["Lower".to_string()], &json!([HIDDEN_1])), "{hidden}: {r}");
}
// One that stores no pixels or only transparent ones cuts nothing, and merges nothing.
for (l, inner) in [(L { bare: true, ..blue() }, vec!["Lower"]), (layer("Cut", [0, 0, 2, 2], [0, 0, 255, 0]), vec!["Lower", "Cut"])] {
let (s, r) = open(&file(4, 4, &knockout_stack(b"norm", cut(l, 1)), 8, false, false), json!({}));
assert_eq!((knockout_names(&s).1, &r["warnings"]), (inner.iter().map(|n| n.to_string()).collect(), &json!([])), "{r}");
}
// Nothing below it in its group: it comes in as a layer.
let layers = [group_end(), cut(blue(), 1), group("Group", b"norm"), layer("Over", [0, 0, 1, 1], [9, 9, 9, 255])];
let (s, r) = open(&file(4, 4, &layers, 8, false, false), json!({}));
let d = &s.doc().unwrap().doc;
assert_eq!(d.layers[0].children().unwrap().iter().map(|c| name(c)).collect::<Vec<_>>(), ["Cut"], "{r}");
assert_eq!(r["warnings"], json!([]), "{r}");
}
/// A knockout that changes nothing below it leaves the layers apart, hidden ones included: one at 0
/// opacity, one at 0 fill over layers that are transparent or beside their painted pixels, and one
/// whose layer mask hides all of it. At 0 fill over painted layers, and
/// at a fill over transparent ones, it still merges. A knockout at 0 fill over a transparent layer
/// stays apart without a warning when their merge would need more memory than allowed.
#[test]
fn knockouts_that_change_nothing_keep_the_layers_apart() {
let cms = |c: [f32; 4]| [c[0], c[1], c[2]];
let layers = [
group_end(),
layer("Lower", [0, 0, 2, 2], [255, 0, 0, 0]),
knockout(layer("Cut", [2, 2, 4, 4], [0, 0, 255, 255]), 1, 0),
group("Group", b"norm"),
];
// The two 2 × 2 layers drawn together fit 256 bytes, but not the 4 × 4 canvas covering both.
let (doc, warnings) = psdlayers::import(&file(4, 4, &layers, 8, false, false), false, 256, cms).unwrap().unwrap();
assert_eq!(doc.layers[0].children().unwrap().iter().map(|c| name(c)).collect::<Vec<_>>(), ["Lower", "Cut"]);
assert!(warnings.is_empty(), "{warnings:?}");
let lower = |alpha: u8| layer("Lower", [0, 0, 4, 4], [255, 0, 0, alpha]);
let hidden = L { hidden: true, ..layer("Hidden", [0, 0, 4, 4], [0, 255, 0, 255]) };
let cut = |fill: u8, opacity: u8| knockout(L { opacity, ..layer("Cut", [0, 0, 2, 2], [0, 0, 255, 255]) }, 1, fill);
let inner = |s: &Session| s.doc().unwrap().doc.layers[0].children().map_or(vec![], |c| c.iter().map(|l| name(l).to_string()).collect::<Vec<_>>());
for (alpha, fill, opacity, apart) in [(255, 0, 0, true), (0, 0, 255, true), (255, 0, 255, false), (0, 128, 255, false)] {
let layers = [group_end(), lower(alpha), hidden.clone(), cut(fill, opacity), group("Group", b"norm")];
let (s, r) = open(&file(4, 4, &layers, 8, false, false), json!({"hiddenLayers": true}));
let (names, warnings) = if apart { (vec!["Lower", "Hidden", "Cut"], json!([])) } else { (vec!["Lower + Cut"], json!([HIDDEN_1])) };
assert_eq!((inner(&s), &r["warnings"]), (names.iter().map(|n| n.to_string()).collect(), &warnings), "{alpha} {fill} {opacity}: {r}");
}
// A hidden knockout that needs no merge comes in with hidden layers: at 0 opacity, with nothing
// below it in its group, at 0 fill beside the painted pixels below it, and with a layer mask that
// hides all of it.
let hidden_cut = |opacity: u8| L { hidden: true, ..cut(0, opacity) };
let beside = L { hidden: true, ..knockout(layer("Cut", [0, 0, 2, 2], [0, 0, 255, 255]), 1, 0) };
let masked = L { hidden: true, mask: Some(([0, 0, 2, 2], 0, 0, vec![0; 4])), ..cut(255, 255) };
for (layers, names) in [
(vec![group_end(), lower(255), hidden_cut(0), group("Group", b"norm")], vec!["Lower", "Cut"]),
(vec![group_end(), hidden_cut(255), group("Group", b"norm")], vec!["Cut"]),
(vec![group_end(), layer("Lower", [2, 2, 4, 4], [255, 0, 0, 255]), beside, group("Group", b"norm")], vec!["Lower", "Cut"]),
(vec![group_end(), lower(255), masked.clone(), group("Group", b"norm")], vec!["Lower", "Cut"]),
] {
let (s, r) = open(&file(4, 4, &layers, 8, false, false), json!({"hiddenLayers": true}));
assert_eq!((inner(&s), &r["warnings"]), (names.iter().map(|n| n.to_string()).collect(), &json!([])), "{r}");
}
// With the mask switched off it would need the merge, and is left out.
let unmasked = L { mask: Some(([0, 0, 2, 2], 0, 2, vec![0; 4])), ..masked };
let (s, r) = open(&file(4, 4, &[group_end(), lower(255), unmasked, group("Group", b"norm")], 8, false, false), json!({"hiddenLayers": true}));
assert_eq!((inner(&s), &r["warnings"]), (vec!["Lower".to_string()], &json!([HIDDEN_1])), "{r}");
// A hidden knockout group that would need the merge is counted once, as a hidden layer left out:
// its type layer and its own hidden layer aren't counted.
let mut words = layer("Words", [0, 0, 2, 2], [0, 0, 0, 255]);
words.blocks.push((*b"TySh", vec![0; 4]));
let layers = [
group_end(),
lower(255),
group_end(),
words.clone(),
L { hidden: true, ..layer("Inner", [0, 0, 2, 2], [0, 0, 255, 255]) },
L { hidden: true, ..knockout(group("Cut", b"norm"), 1, 255) },
group("Group", b"norm"),
];
let (s, r) = open(&file(4, 4, &layers, 8, false, false), json!({"hiddenLayers": true}));
assert_eq!((inner(&s), &r["warnings"]), (vec!["Lower".to_string()], &json!([HIDDEN_1])), "{r}");
// One whose layer mask hides all of it needs no merge, but a knockout above it merges the layers
// and leaves it out: it is counted once, without its type layer.
let layers = [
group_end(),
lower(255),
group_end(),
words,
L { hidden: true, mask: Some(([0, 0, 2, 2], 0, 0, vec![0; 4])), ..knockout(group("Masked", b"norm"), 1, 255) },
cut(0, 255),
group("Group", b"norm"),
];
let (s, r) = open(&file(4, 4, &layers, 8, false, false), json!({"hiddenLayers": true}));
assert_eq!((inner(&s), &r["warnings"]), (vec!["Lower + Cut".to_string()], &json!([HIDDEN_1])), "{r}");
}
/// With hidden layers asked for, the hidden layers of a group drawn for a knockout or a clip that
/// isn't made come in, and aren't counted as left out: a knockout group over a layer that stores no
/// pixels, and a clipped group whose merge needs more memory than allowed.
#[test]
fn hidden_layers_of_a_group_drawn_for_a_merge_not_made_come_in() {
let cms = |c: [f32; 4]| [c[0], c[1], c[2]];
let children = |l: &Node| l.children().map_or(vec![], |c| c.iter().map(|l| (name(l).to_string(), l.visible)).collect::<Vec<_>>());
let shown_and_hidden =
|| [group_end(), layer("Shown", [0, 0, 2, 2], [0, 0, 255, 255]), L { hidden: true, ..layer("Hidden", [2, 2, 4, 4], [0, 255, 0, 255]) }];
let both = vec![("Shown".to_string(), true), ("Hidden".to_string(), false)];
// A knockout group over a layer that stores no pixels.
let mut layers = vec![group_end(), L { bare: true, ..layer("Lower", [0, 0, 2, 2], [0; 4]) }];
layers.extend(shown_and_hidden());
layers.extend([knockout(group("Cut", b"norm"), 1, 255), group("Group", b"norm")]);
let (s, r) = open(&file(4, 4, &layers, 8, false, false), json!({"hiddenLayers": true}));
let d = &s.doc().unwrap().doc;
let cut = &d.layers[0].children().unwrap()[0];
assert_eq!((name(cut), children(cut), &r["warnings"]), ("Cut", both.clone(), &json!([])), "{r}");
// A clipped group whose merge with its base doesn't fit 320 bytes.
let mut layers = vec![layer("Base", [0, 0, 2, 2], [255, 0, 0, 255])];
layers.extend(shown_and_hidden());
layers[2].rect = [0, 0, 4, 4];
layers.push(L { clipped: true, ..group("Clipped", b"norm") });
let (doc, warnings) = psdlayers::import(&file(4, 4, &layers, 8, false, false), true, 320, cms).unwrap().unwrap();
let clipped = &doc.layers[1];
assert_eq!((name(clipped), children(clipped)), ("Clipped", both), "{warnings:?}");
assert_eq!(warnings, ["1 layer clipped to the layer below came in unclipped: the merge needs more memory than allowed"]);
}
/// A knockout's merge whose canvases would need more memory than allowed leaves the layers apart,
/// with a warning. One at 0 fill beside the painted pixels below it cuts nothing, and stays apart
/// whatever the memory.
#[test]
fn a_knockout_merge_past_the_memory_allowed_leaves_the_layers_apart() {
let cms = |c: [f32; 4]| [c[0], c[1], c[2]];
let stack = |cut: [i32; 4]| {
let layers = [
group_end(),
layer("Lower", [0, 0, 2, 2], [255, 0, 0, 255]),
knockout(layer("Cut", cut, [0, 0, 255, 255]), 1, 0),
group("Group", b"norm"),
];
file(4, 4, &layers, 8, false, false)
};
let names = |doc: &vectorcraft_doc::Document| doc.layers[0].children().unwrap().iter().map(|c| name(c).to_string()).collect::<Vec<_>>();
let f = stack([1, 1, 3, 3]);
// Each 2 × 2 layer fits 128 bytes (16 a pixel), but not the canvas of the layer below with the
// knockout's canvas held beside it.
let (doc, warnings) = psdlayers::import(&f, false, 128, cms).unwrap().unwrap();
assert_eq!(names(&doc), ["Lower", "Cut"]);
assert_eq!(warnings, ["the knockout of 1 layer wasn't applied"]);
let (doc, warnings) = psdlayers::import(&f, false, 1 << 20, cms).unwrap().unwrap();
assert_eq!(names(&doc), ["Lower + Cut"]);
assert!(warnings.is_empty(), "{warnings:?}");
for max_alloc in [128, 1 << 20] {
let (doc, warnings) = psdlayers::import(&stack([2, 2, 4, 4]), false, max_alloc, cms).unwrap().unwrap();
assert_eq!(names(&doc), ["Lower", "Cut"], "{max_alloc}");
assert!(warnings.is_empty(), "{max_alloc}: {warnings:?}");
}
}
/// A knockout that cuts nothing gives back what drawing the layers below it counted: here a
/// knockout at 0 fill beside a group, whose own knockout doesn't fit 192 bytes while the outer
/// knockout's canvas is held, but merges when the group comes in.
#[test]
fn a_knockout_that_cuts_nothing_doesnt_keep_what_drawing_below_it_counted() {
let cms = |c: [f32; 4]| [c[0], c[1], c[2]];
let layers = [
group_end(),
group_end(),
layer("Opaque", [0, 0, 2, 2], [255, 0, 0, 255]),
knockout(layer("Inner cut", [0, 0, 1, 2], [0, 0, 255, 255]), 1, 0),
group("Inner", b"norm"),
knockout(layer("Outer cut", [2, 2, 4, 4], [0, 0, 255, 255]), 1, 0),
group("Outer", b"norm"),
];
let (doc, warnings) = psdlayers::import(&file(4, 4, &layers, 8, false, false), false, 192, cms).unwrap().unwrap();
let outer = doc.layers[0].children().unwrap();
assert_eq!(outer.iter().map(|c| name(c)).collect::<Vec<_>>(), ["Inner", "Outer cut"], "{warnings:?}");
assert_eq!(outer[0].children().unwrap().iter().map(|c| name(c)).collect::<Vec<_>>(), ["Opaque + Inner cut"], "{warnings:?}");
assert!(warnings.is_empty(), "{warnings:?}");
}
/// A knockout merge that can't be made leaves the import the whole allowance for reading the layers
/// apart: here the merge decodes 22 layers over one another before the layer beside them makes its
/// canvas too large, which used up nearly all of eight times 64 KiB. The merge has that allowance
/// also after five layers below the group were read, and a knockout at 0 fill over 22 transparent
/// layers, which cuts no paint after they are drawn, leaves the same room.
#[test]
fn a_knockout_merge_not_made_leaves_room_to_read_the_layers() {
let cms = |c: [f32; 4]| [c[0], c[1], c[2]];
let mut layers = vec![group_end()];
layers.extend((0..22).map(|_| layer("Lower", [0, 0, 32, 32], [255, 0, 0, 255])));
layers.push(layer("Beside", [0, 64, 32, 96], [0, 255, 0, 255]));
layers.extend([knockout(layer("Cut", [0, 0, 32, 32], [0, 0, 255, 255]), 1, 0), group("Group", b"norm")]);
let (doc, warnings) = psdlayers::import(&file(96, 32, &layers, 8, false, false), false, 64 << 10, cms).unwrap().unwrap();
assert_eq!(doc.layers[0].children().unwrap().len(), 24, "{warnings:?}");
assert_eq!(warnings, ["the knockout of 1 layer wasn't applied"]);
let mut after_five = vec![layer("Outside", [0, 0, 32, 32], [0, 0, 0, 255]); 5];
after_five.extend(layers);
let (doc, warnings) = psdlayers::import(&file(96, 32, &after_five, 8, false, false), false, 64 << 10, cms).unwrap().unwrap();
assert_eq!((doc.layers.len(), doc.layers[5].children().unwrap().len()), (6, 24), "{warnings:?}");
assert_eq!(warnings, ["the knockout of 1 layer wasn't applied"]);
let mut layers = vec![group_end()];
layers.extend((0..22).map(|_| layer("Lower", [0, 0, 32, 32], [255, 0, 0, 0])));
layers.extend([knockout(layer("Cut", [0, 0, 32, 32], [0, 0, 255, 255]), 1, 0), group("Group", b"norm")]);
let (doc, warnings) = psdlayers::import(&file(32, 32, &layers, 8, false, false), false, 64 << 10, cms).unwrap().unwrap();
assert_eq!(doc.layers[0].children().unwrap().len(), 23, "{warnings:?}");
assert!(warnings.is_empty(), "{warnings:?}");
}
/// A hidden knockout in a mode VectorCraft lacks is left out without being drawn, hidden layers
/// asked for: here its pixels are larger than the memory allowed for one image.
#[test]
fn a_hidden_knockout_in_a_mode_vectorcraft_lacks_is_left_out_unread() {
let cms = |c: [f32; 4]| [c[0], c[1], c[2]];
let layers = [
group_end(),
layer("Lower", [0, 0, 2, 2], [255, 0, 0, 255]),
L { hidden: true, blend: b"diss", ..knockout(layer("Cut", [0, 0, 8, 8], [0, 0, 255, 255]), 1, 255) },
group("Group", b"norm"),
];
let (doc, warnings) = psdlayers::import(&file(8, 8, &layers, 8, false, false), true, 128, cms).unwrap().unwrap();
assert_eq!(doc.layers[0].children().unwrap().iter().map(|c| name(c)).collect::<Vec<_>>(), ["Lower"]);
assert_eq!(warnings, [HIDDEN_1]);
}
/// A Dissolve knockout at part opacity clears each pixel below it fully or not at all, at the share
/// its opacity gives, as a Dissolve layer merges.
#[test]
fn a_dissolve_knockout_at_part_opacity_clears_whole_pixels() {
let cut = knockout(L { blend: b"diss", opacity: 128, ..layer("Cut", [0, 0, 16, 16], [0, 0, 255, 255]) }, 1, 0);
let layers = [group_end(), layer("Lower", [0, 0, 16, 16], [255, 0, 0, 255]), cut, group("Group", b"norm")];
let (s, r) = open(&file(16, 16, &layers, 8, false, false), json!({}));
let d = &s.doc().unwrap().doc;
let (_, px) = image_of(&s, &d.layers[0].children().unwrap()[0]);
assert!(px.pixels().all(|p| p.0 == [255, 0, 0, 255] || p.0[3] == 0), "{r}");
let red = px.pixels().filter(|p| p.0 == [255, 0, 0, 255]).count();
assert!((32..=224).contains(&red), "{red} of 256 pixels keep the lower layer: {r}");
}
/// The knockout of a layer that another is clipped to isn't applied, also when the clipped layer's
/// merge with it needs more memory than allowed and the two come in apart.
#[test]
fn a_clipping_base_knockout_isnt_applied_when_its_clip_doesnt_fit() {
let cms = |c: [f32; 4]| [c[0], c[1], c[2]];
// The 4 × 4 clipped layer and its 2 × 2 base don't fit 320 bytes together for the clip; the
// base's knockout merge with the 2 × 2 layer below would.
let layers = [
group_end(),
layer("Lower", [0, 0, 2, 2], [255, 0, 0, 255]),
knockout(layer("Base", [0, 0, 2, 2], [0, 0, 255, 255]), 1, 0),
L { clipped: true, ..layer("Clipped", [0, 0, 4, 4], [0, 255, 0, 255]) },
group("Group", b"norm"),
];
let (doc, warnings) = psdlayers::import(&file(4, 4, &layers, 8, false, false), false, 320, cms).unwrap().unwrap();
assert_eq!(doc.layers[0].children().unwrap().iter().map(|c| name(c)).collect::<Vec<_>>(), ["Lower", "Base", "Clipped"], "{warnings:?}");
assert_eq!(
warnings,
["the knockout of 1 layer wasn't applied", "1 layer clipped to the layer below came in unclipped: the merge needs more memory than allowed"]
);
}
/// A knockout group that comes in as a layer counts each layer clipped in it once in the warnings,
/// though its layers are also drawn for the knockout: one clipped to a fill that isn't drawn, and
/// one that a merge past the memory allowed leaves unclipped.
#[test]
fn a_knockout_group_that_comes_in_as_a_layer_counts_its_clipped_layers_once() {
let cms = |c: [f32; 4]| [c[0], c[1], c[2]];
let empty = L { bare: true, ..layer("Empty", [0, 0, 2, 2], [0, 0, 0, 0]) };
// A fill whose shape is a vector mask, with a layer clipped to it: neither is drawn.
let mut soco = vec![0; 8];
for (key, v) in [(b"Rd doub", 255.0f64), (b"Grn doub", 0.0), (b"Bl doub", 51.0)] {
soco.extend(key);
soco.extend(v.to_be_bytes());
}
let mut outline = layer("Outline", [0, 0, 0, 0], [0; 4]);
outline.blocks.push((*b"SoCo", soco));
outline.blocks.push((*b"vsms", vec![0; 8]));
let on_outline = L { clipped: true, ..layer("On outline", [0, 0, 2, 2], [1, 1, 1, 255]) };
// Each 2 × 2 layer fits 128 bytes, and so do the two drawn together, but not the merge of the
// clipped one with the one below.
let base = layer("Base", [0, 0, 2, 2], [255, 0, 0, 255]);
let clipped = L { clipped: true, ..layer("Clipped", [0, 0, 2, 2], [0, 0, 255, 255]) };
for (inner, said) in [
(vec![outline, on_outline], "1 layer clipped to a fill layer that wasn't drawn was left out"),
(vec![base, clipped], "1 layer clipped to the layer below came in unclipped: the merge needs more memory than allowed"),
] {
let mut layers = vec![layer("Outside", [0, 0, 4, 4], [0, 255, 0, 255]), group_end(), empty.clone(), group_end()];
layers.extend(inner);
layers.extend([knockout(group("Cut", b"norm"), 1, 255), group("Group", b"norm")]);
let (doc, warnings) = psdlayers::import(&file(4, 4, &layers, 8, false, false), false, 128, cms).unwrap().unwrap();
assert_eq!(doc.layers.iter().map(|l| name(l)).collect::<Vec<_>>(), ["Outside", "Group"]);
assert!(warnings.iter().any(|w| w == said), "{said}: {warnings:?}");
}
}
/// A pass-through group that draws nothing still counts what its layers count in it, also when it
/// is drawn again inside a group that merges: a knockout above a Multiply layer isn't applied in a
/// pass-through group, though drawn alone it would be.
#[test]
fn a_pass_through_group_that_draws_nothing_still_counts_its_unapplied_knockouts() {
let cms = |c: [f32; 4]| [c[0], c[1], c[2]];
let empty = |name: &'static str, blend: &'static [u8; 4]| L { bare: true, blend, ..layer(name, [0, 0, 2, 2], [0, 0, 0, 0]) };
let layers = [
layer("Lower", [0, 0, 4, 4], [255, 0, 0, 255]),
group_end(),
empty("Empty", b"norm"),
group_end(),
empty("Multiplied", b"mul "),
knockout(empty("Cut", b"norm"), 1, 255),
knockout(group("Through", b"pass"), 1, 255),
group("Dissolved", b"diss"),
];
let (doc, warnings) = psdlayers::import(&file(4, 4, &layers, 8, false, false), false, 1 << 20, cms).unwrap().unwrap();
assert_eq!(doc.layers.iter().map(|l| name(l)).collect::<Vec<_>>(), ["Lower + Dissolved"], "{warnings:?}");
assert_eq!(warnings, ["the knockout of 1 layer wasn't applied".to_string(), psdlayers::MERGED_WARNING.replace("{modes}", "Dissolve")]);
}
/// A group that draws nothing is drawn once, however deep the groups like it nest: here each holds
/// a layer that stores no pixels and, above it, the next group, with a knockout. The import walks
/// at most as many layer lists as the file has records, with isolated groups, with groups that
/// alternate with pass-through ones, with pass-through groups inside the outermost one (whose
/// knockouts aren't applied), and with a layer in a mode VectorCraft lacks in each (a merge of
/// nothing, a canvas without pixels).
#[test]
fn groups_that_draw_nothing_are_drawn_once_however_deep_they_nest() {
const LEVELS: usize = 48;
let cms = |c: [f32; 4]| [c[0], c[1], c[2]];
let empty = |name: &'static str, blend: &'static [u8; 4]| L { bare: true, blend, ..layer(name, [0, 0, 2, 2], [0, 0, 0, 0]) };
// Which levels are pass-through groups.
let none: fn(usize) -> bool = |_| false;
let odd: fn(usize) -> bool = |k| k % 2 == 1;
let all: fn(usize) -> bool = |k| k > 0;
for (case, pass, dissolve, warned) in [
("isolated", none, false, vec![]),
("alternating", odd, false, vec![]),
("pass-through", all, false, vec![format!("the knockout of {} layers wasn't applied", LEVELS - 1)]),
("dissolved", none, true, vec![psdlayers::MERGED_WARNING.replace("{modes}", "Dissolve")]),
] {
let mut layers = vec![layer("Outside", [0, 0, 4, 4], [0, 255, 0, 255])];
for _ in 0..=LEVELS {
layers.push(group_end());
if dissolve {
layers.push(empty("Dissolved", b"diss"));
}
layers.push(empty("Empty", b"norm"));
}
for k in (0..=LEVELS).rev() {
let g = group("Group", if pass(k) { b"pass" } else { b"norm" });
layers.push(if k == 0 { g } else { knockout(g, 1, 255) });
}
psdlayers::WALKS.set((0, layers.len()));
let imported = psdlayers::import(&file(4, 4, &layers, 8, false, false), false, 1 << 20, cms);
let (walked, _) = psdlayers::WALKS.replace((0, usize::MAX));
let (doc, warnings) = imported.unwrap().unwrap();
assert!(walked <= layers.len(), "{case}: {walked} walks for {} records", layers.len());
assert_eq!(doc.layers.iter().map(|l| name(l)).collect::<Vec<_>>(), ["Outside", "Group"], "{case}");
let mut expected = warned;
expected.push(vectorcraft_doc::depth::merged_note());
assert_eq!(warnings, expected, "{case}");
}
}
#[test]
fn what_doesnt_come_in_is_said() {
let mut text = layer("Words", [0, 0, 2, 2], [0, 0, 0, 255]);
+1 -1
View File
@@ -305,7 +305,7 @@ pub fn specs() -> Vec<CommandSpec> {
"Live Shape Properties",
[],
None,
"{id?, ids?, radius?: pt (or % of each corner's maximum when `relativeRadii` is true), kind?: \"round\"|\"invertedRound\"|\"chamfer\", relativeRadii?: bool (Relative rounding, as in the reference app: store radii as fractions of each corner's maximum so they scale with the shape), corners?: [i…], items?: [{id, corners?: [i…]}] (several objects, each with its own corners, in place of ids and corners: the canvas's corner widgets across a selection), sides?: n, polygonAngle?: degrees (counter-clockwise from its first vertex straight up), polygonRadius?: pt (centre to vertex), sideLength?: pt (sets the radius), makeSidesEqual?: true (a polygon scaled unevenly: drops the uneven scale and shear, keeping its centre, angle and mean radius), pieStart?, pieEnd?: degrees (an ellipse's pie, counter-clockwise from 3 o'clock; 0 to 360 is the whole ellipse), invertPie?: true (swaps them: the other part of the ellipse), constrainPie?: bool (Constrain Pie Angle: with one of pieStart and pieEnd, not both and not with invertPie, the other angle moves by as much, so each ellipse keeps its span), lineLength?: pt (a live line's length, above 0; its first end stays), lineAngle?: degrees (a live line's angle, counter-clockwise from 3 o'clock, from its first end to its second; it turns about its midpoint)} (Live Corners on any path: radius and kind set its corners (anchors that aren't smooth, where two sides, straight or curved (#1144), meet at an angle): `corners` (anchor indices of the path with its corners uncut, counting every subpath's anchors in order: a rectangle's 0 top-left, 1 top-right, 2 bottom-right, 3 bottom-left; a polygon's from the first vertex clockwise), else the corners with a Direct-Selected anchor, else every corner; each radius is drawn no larger than half the corner's shorter side allows; a path that isn't a live shape keeps its uncut outline so its corners stay editable, and is plain again once none is cut; sides: a polygon's, which keep the radius they shared; the polygon params apply in that order: sides, makeSidesEqual, polygonAngle, then sideLength or else polygonRadius; a line's lineLength applies before its lineAngle)",
"{id?, ids?, radius?: pt (or % of each corner's maximum when `relativeRadii` is true), kind?: \"round\"|\"invertedRound\"|\"chamfer\", relativeRadii?: bool (Relative rounding, as in the reference app: store radii as fractions of each corner's maximum so they scale with the shape), corners?: [i…], items?: [{id, corners?: [i…]}] (several objects, each with its own corners, in place of ids and corners: the canvas's corner widgets across a selection), sides?: n, polygonAngle?: degrees (counter-clockwise from its first vertex straight up), polygonRadius?: pt (centre to vertex), sideLength?: pt (sets the radius), makeSidesEqual?: true (a polygon scaled unevenly: drops the uneven scale and shear, keeping its centre, angle and mean radius), pieStart?, pieEnd?: degrees (an ellipse's pie, counter-clockwise from 3 o'clock; 0 to 360 is the whole ellipse), invertPie?: true (swaps them: the other part of the ellipse), constrainPie?: bool (Constrain Pie Angle: with one of pieStart and pieEnd, not both and not with invertPie, the other angle moves by as much, so each ellipse keeps its span), lineLength?: pt (a live line's length, above 0; its first end stays), lineAngle?: degrees (a live line's angle, counter-clockwise from 3 o'clock, from its first end to its second; it turns about its midpoint), rectangleAngle?: degrees (a live rectangle's, counterclockwise from level), ellipseAngle?: degrees (a live ellipse's, counterclockwise from level; its pie turns with it)} (rectangleAngle, ellipseAngle and polygonAngle turn each shape of that kind about its own center and leave other objects as they are; a pixel-aligned shape then goes back on the pixel grid, as after other edits, which can move its center or change its size; an angle that is not a number is an error, and `null` counts as an omitted key; a shape that a turn would take past the coordinate limit (±4,000,000 pt) is an error that changes nothing; Live Corners on any path: radius and kind set its corners (anchors that aren't smooth, where two sides, straight or curved (#1144), meet at an angle): `corners` (anchor indices of the path with its corners uncut, counting every subpath's anchors in order: a rectangle's 0 top-left, 1 top-right, 2 bottom-right, 3 bottom-left; a polygon's from the first vertex clockwise), else the corners with a Direct-Selected anchor, else every corner; each radius is drawn no larger than half the corner's shorter side allows; a path that isn't a live shape keeps its uncut outline so its corners stay editable, and is plain again once none is cut; sides: a polygon's, which keep the radius they shared; the polygon params apply in that order: sides, makeSidesEqual, polygonAngle, then sideLength or else polygonRadius; a line's lineLength applies before its lineAngle)",
has_selection,
set_live_shape
),
+31 -4
View File
@@ -202,6 +202,16 @@ pub(super) fn set_live_shape(s: &mut Session, p: &Value) -> Result<Value> {
// A polygon's Polygon Properties: its angle, radius or side length, Make Sides Equal.
let (polygon_angle, polygon_radius, side) = (angle("polygonAngle")?, length("polygonRadius")?, length("sideLength")?);
let equal = p.get("makeSidesEqual").and_then(Value::as_bool) == Some(true);
// A rectangle's Rectangle Angle and an ellipse's Ellipse Angle, as `polygonAngle` turns a polygon.
let (rectangle_angle, ellipse_angle) = (angle("rectangleAngle")?, angle("ellipseAngle")?);
// Whether a shape at `now` already stands at `a`: a turn the rounding of an earlier one left
// (89.999999999°, or 359.9999999999° against 0°) counts as no change.
let at_angle = |now: Option<f64>, a: f64| {
now.is_some_and(|n| {
let d = (n - a).rem_euclid(360.0);
d.min(360.0 - d) < 1e-9
})
};
// A line's Line Properties: its length (its first end stays) and its angle (about its midpoint).
// A line's length can reach across the whole canvas, past `MAX_COORD`: its ends are checked below.
let line_length = number("lineLength", |x| x > 0.0, "a length in points above 0")?;
@@ -249,12 +259,15 @@ pub(super) fn set_live_shape(s: &mut Session, p: &Value) -> Result<Value> {
Some(l @ LiveShape::Polygon { sides: now, .. })
if !(sides.is_none_or(|n| n.clamp(3, 1000) == u64::from(*now))
&& (!equal || l.polygon_sides_equal())
&& polygon_angle.is_none_or(|a| l.polygon_angle() == Some(a))
&& polygon_angle.is_none_or(|a| at_angle(l.polygon_angle(), a))
&& side.and_then(|len| l.polygon_radius_for_side(len)).or(polygon_radius).is_none_or(|r| l.polygon_radius() == Some(r))) =>
{
return false;
}
Some(LiveShape::Ellipse { pie, .. }) if pie_of(*pie) != *pie => return false,
Some(l @ LiveShape::Ellipse { pie, .. }) if pie_of(*pie) != *pie || ellipse_angle.is_some_and(|a| !at_angle(l.shape_angle(), a)) => {
return false;
}
Some(l @ LiveShape::Rectangle { .. }) if rectangle_angle.is_some_and(|a| !at_angle(l.shape_angle(), a)) => return false,
_ => {}
}
if relative_radii.is_some_and(|on| live.as_deref().map(|l| l.radii_relative()) != Some(on)) {
@@ -298,9 +311,18 @@ pub(super) fn set_live_shape(s: &mut Session, p: &Value) -> Result<Value> {
}
*path = l.to_path();
}
if let Some(l @ LiveShape::Ellipse { .. }) = live.as_deref_mut()
&& (pie_start.is_some() || pie_end.is_some() || invert)
if let Some(a) = rectangle_angle
&& let Some(l @ LiveShape::Rectangle { .. }) = live.as_deref_mut()
{
l.set_shape_angle(a);
*path = l.to_path();
}
if let Some(l @ LiveShape::Ellipse { .. }) = live.as_deref_mut()
&& (pie_start.is_some() || pie_end.is_some() || invert || ellipse_angle.is_some())
{
if let Some(a) = ellipse_angle {
l.set_shape_angle(a);
}
if let LiveShape::Ellipse { pie, .. } = l {
*pie = pie_of(*pie);
}
@@ -339,6 +361,11 @@ pub(super) fn set_live_shape(s: &mut Session, p: &Value) -> Result<Value> {
for id in &ids {
super::pixelgrid::resnap(d, *id);
}
// A shape named in `ids` and not selected is not checked after the edit: one that a turn or
// a new radius would take past the coordinate limit is an error here, and nothing changes.
if !crate::sanity::objects_in_range(d, &ids) {
return Err(bad("object.setLiveShape", format!("coordinate out of range (limit ±{MAX_COORD} pt)")));
}
Ok(())
})?;
ok()
+114 -1
View File
@@ -9,12 +9,13 @@
//! **Repeat** objects are live nodes (`NodeKind::Repeat`) holding the source art and the
//! arrangement; `vectorcraft_doc::pattern` evaluates the instances.
use std::collections::HashSet;
use std::sync::Arc;
use serde_json::{Value, json};
use vectorcraft_color::Paint;
use vectorcraft_doc::pattern::{self, Overlap, PATTERN_EDIT_LAYER, PatternDef, PatternEdit, RepeatKind, RepeatSpec, TileType, pattern_paint};
use vectorcraft_doc::swatches::PaintFn;
use vectorcraft_doc::swatches::{PaintFn, graph_paints, node_paints, override_paints, walk_with_masks};
use vectorcraft_doc::{Document, Node, NodeId, NodeKind, Selection};
use vectorcraft_geom::{Point, Rect};
@@ -37,6 +38,15 @@ pub fn specs() -> Vec<CommandSpec> {
can_make_pattern,
pattern_make
),
cmd!(
"object.pattern.replaceArt",
"Replace Pattern Art",
[],
None,
"{name, ids?} make copies of the selected art the tile art of pattern `name`, as Alt-dragging (Option-dragging on macOS) art onto its swatch in the Swatches panel does; the pattern keeps its name, swatch, tile and options (with Size Tile to Art on, the tile fits the new art), every fill and stroke painted with it draws the new tile, and the art stays on the canvas, selected; one undo step, none when the art matches the tile art already; refused while a pattern is edited, with nothing selected, and for art painted with the pattern itself → {name}",
can_replace_pattern_art,
pattern_replace_art
),
cmd!(
"object.pattern.edit",
"Edit Pattern",
@@ -198,6 +208,12 @@ fn has_selection_or_ids(s: &Session) -> std::result::Result<(), String> {
has_doc(s)
}
/// Replace Pattern Art: a document, and no pattern is being edited.
fn can_replace_pattern_art(s: &Session) -> std::result::Result<(), String> {
has_doc(s)?;
if editing(s).is_some() { Err("finish editing the pattern first".into()) } else { Ok(()) }
}
/// The repeats of the selection: selected ones, and those around a selected object. None while
/// an object of a dynamic symbol instance's art is selected.
fn selected_repeats(s: &Session) -> Vec<NodeId> {
@@ -412,6 +428,103 @@ pub(crate) fn finish_edit(d: &mut Document, sel: &mut Selection) -> Result<Strin
Ok(pe.pattern)
}
/// Give pattern `name` fresh-id copies of the selected art (or of `ids`) as its tile art, as one
/// undo step (`object.pattern.replaceArt`). The pattern keeps its name, swatch, tile and options,
/// and its tile fits the new art when its Size Tile to Art is on; paints refer to a pattern by
/// name, so every fill and stroke of it draws the new tile. The art stays where it is, selected as
/// before. Art that matches the tile art already records nothing.
fn pattern_replace_art(s: &mut Session, p: &Value) -> Result<Value> {
const C: &str = "object.pattern.replaceArt";
let name = text_param(p, "name", C)?.ok_or_else(|| bad(C, "missing name"))?.to_string();
let roots = roots(s, p, C)?;
let d = &s.doc()?.doc;
let old = d.pattern(&name).map(|def| def.art.clone()).ok_or_else(|| bad(C, format!("no pattern `{name}`")))?;
if roots.is_empty() {
return Err(bad(C, "select the art for the pattern tile"));
}
let src: Vec<Arc<Node>> = roots.iter().filter_map(|id| d.node(*id).cloned()).map(Arc::new).collect();
if paints_pattern(d, &src, &name) {
return Err(bad(C, format!("art painted with `{name}` can't be its tile")));
}
// Copies made from the same next id are equal when the art matches the tile art.
let fresh = |art: &[Arc<Node>]| copies(&mut Document::clone(d), art);
if fresh(&old) == fresh(&src) {
return Ok(json!({ "name": name }));
}
s.edit("Replace Pattern Art", |d, _| {
let art: Vec<Arc<Node>> = copies(d, &src).into_iter().map(Arc::new).collect();
if let Some(def) = d.pattern_mut(&name) {
def.art = art;
if def.size_tile_to_art {
def.fit_tile_to_art();
}
}
Ok(())
})?;
Ok(json!({ "name": name }))
}
/// What a piece of art uses by name, for [`paints_pattern`].
#[derive(Clone, Copy, PartialEq, Eq, Hash)]
enum Uses<'a> {
Symbol(&'a str),
Pattern(&'a str),
GraphDesign(&'a str),
Brush(&'a str),
}
/// Does `art` paint pattern `name`, itself or through the symbols (of its instances and of the
/// inline graphics in its type), patterns, graph designs and brushes it uses? A graph's stored
/// series and label paints count, since its marks and labels take them each time it is drawn again.
fn paints_pattern(d: &Document, art: &[Arc<Node>], name: &str) -> bool {
let brushes = vectorcraft_brush::library(d);
// What was already looked into, and the art left to look at.
let mut seen: HashSet<Uses> = HashSet::new();
let mut left: Vec<&Node> = art.iter().map(|a| &**a).collect();
while let Some(n) = left.pop() {
let mut used = vec![];
walk_with_masks(n, &mut |c| {
match &c.kind {
NodeKind::SymbolInstance { symbol, .. } => used.push(Uses::Symbol(symbol.as_str())),
// The symbol of every inline graphic in type counts, overset or not.
NodeKind::Text(t) => used.extend(t.runs.iter().filter_map(|r| r.inline.as_ref()).map(|a| Uses::Symbol(a.symbol.as_str()))),
_ => {}
}
for it in &c.appearance.items {
if let vectorcraft_doc::AppearanceItem::Stroke(sk) = it
&& let Some(b) = &sk.brush
{
used.push(Uses::Brush(b.as_str()));
}
}
for p in node_paints(c).chain(override_paints(c)).chain(graph_paints(c)) {
if let Paint::Pattern { pattern, .. } = p {
used.push(Uses::Pattern(pattern.as_str()));
}
}
if let Some(g) = c.extras().graph.as_deref() {
used.extend(g.series_markers.iter().flatten().map(|m| Uses::GraphDesign(m.as_str())));
used.extend(g.series_columns.iter().flatten().map(|c| Uses::GraphDesign(c.design.as_str())));
}
});
for u in used {
if u == Uses::Pattern(name) {
return true;
}
if !seen.insert(u) {
continue;
}
match u {
Uses::Symbol(symbol) => left.extend(d.symbols.iter().find(|x| x.name == symbol).map(|x| &*x.art)),
Uses::Pattern(pattern) => left.extend(d.pattern(pattern).into_iter().flat_map(|x| x.art.iter().map(|a| &**a))),
Uses::GraphDesign(design) => left.extend(d.graph_designs.iter().find(|x| x.name == design).map(|x| &*x.art)),
Uses::Brush(brush) => left.extend(brushes.iter().filter(|x| x.name == brush).flat_map(|x| x.art())),
}
}
}
false
}
/// Leave pattern editing mode, discarding the changes (`object.pattern.cancel`). An existing
/// pattern gets its definition back, its name included when Pattern Options renamed it while it was
/// edited and no other pattern, swatch or color group has taken that name since. A new pattern is
@@ -363,6 +363,7 @@ pub(super) const ALLOWED: &[&str] = &[
"object.pattern.done",
"object.pattern.edit",
"object.pattern.make",
"object.pattern.replaceArt",
"object.puppetWarp",
"object.puppetWarp.pins",
"object.rasterize",
+1 -1
View File
@@ -32,7 +32,7 @@ pub fn specs() -> Vec<CommandSpec> {
"Run Script",
[],
None,
"{path?: a .js or .jsx file | source?: the script's text (exactly one of the two), installed?: true or false (default false; true with a path that script.listInstalled gave: the file is read once, checked as File › Scripts checks it, and that text runs, its #include lines and $.evalFile reading in the folder that read found; a file that is no longer a listed script ends with \"the script is no longer in the Scripts folder\" and nothing runs), name?: the name errors and the report use (default: the script's #script line, else the path's file name, or \"script\"), args?: {…} (at most 1 MiB as JSON; vc.args in the script), answers?: [{kind: alert|confirm|prompt, value: \"ok\" (alert) | true or false (confirm) | text or null (prompt)}] (for a run with nobody to ask: the answers to its dialogs, in order; at most 10000 and 1 MiB as JSON; refused in the app, where the person answers; an empty object is an empty list), maxFuel?: whole number from 1 to 100000000000 (instructions in all; default 1000000000)} run a JavaScript file against the open documents, through the vc object: vc.run(id, params) runs a command and returns its result, a failed command throws an error the script can catch and puts back the documents and the session state it changed, while any file it wrote stays written and is named; vc.document is a snapshot of the active document or null; vc.commands lists the commands a script may run; vc.log(value) adds to the report and the Script Console (script.console); $.write(...values) writes the values to the Script Console as String(value) gives them, and $.writeln(...values) does the same and ends the line; $.evalFile(path, timeout?) runs a file with the same globals and returns its last value (timeout, in milliseconds from 0, is taken and not waited on), $.fileName is the file of the code that reads it (the file being run for code that eval or Function compiled; empty for code compiled from a script given as text), $.includePath the #includepath list and $.engineName the engine's name (VectorCraft without #targetengine); alert(message[, title, errorIcon]), confirm(message[, noAsDflt, title]) and prompt(message, preset[, title]) open a dialog with a Stop button (default title \"Script Alert\"; message and preset as String(value) gives them; errorIcon and noAsDflt as Boolean(value) gives them; No is the default with noAsDflt): alert returns undefined, confirm true for Yes and false for No, prompt the field's text for OK and null for Cancel; in the app the run waits at the call for the person's answer and Stop ends it as script.stop does, a dialog cannot open inside a callback of a built-in, a getter, a conversion or a file $.evalFile runs and throws there (an #include file's code is the script's own and can), and a run with nobody to ask takes the next of answers, and ends when none is left or the next is for another kind of dialog, or when the script ends with answers unused; vc.args is args. Before anything runs, the script's preprocessor lines (# or //@ at the start of a line, outside strings and comments) are read: #include \"file\" and //@include put that file's text in place of the line, looked for beside the file that includes it, then in each #includepath folder in turn (separated by ;, relative to that file's folder; a later #includepath replaces the list), then in each JSINCLUDE folder; #script names the run; #target takes any value and changes nothing; #strict on makes an assignment to a read-only or getter-only property, or a new property on an object that is not extensible (preventExtensions, seal, freeze, vc, $), throw a TypeError, without the rest of ES5 strict mode, and #strict off turns that off (the last #strict line of the script and its includes sets the run; off without one; a $.evalFile file's own line holds for its code); #targetengine name runs the script in the named engine, whose globals and functions stay for the next run that names it until script.engine.drop drops it or the session ends (script.engines lists them; a name of letters, digits and _ not starting with a digit, or a quoted one of 1 to 64 bytes without control characters, matched as written; only in the script itself, once, before its code and #include lines; main, and a script without the line, get a new engine each run; a session keeps 8 named engines, a ninth name is refused, each has 64 MiB of heap, and an uncaught error, a limit or script.stop keeps the globals the run set while the documents go back; host functions kept in a global act for the run that calls them; an error in code an earlier run compiled is at that run's file, line and column, within 8 MiB of source maps kept for each engine, the oldest going first; not on the web); #engine is refused as unsupported, any other #name as unknown, and another //@name is a comment. A script run from a file reads its includes and $.evalFile's files only in that file's folder and the folders below it, refusing a path with a .. name or a link that l Line truncated
"{path?: a .js or .jsx file | source?: the script's text (exactly one of the two), installed?: true or false (default false; true with a path that script.listInstalled gave: the file is read once, checked as File › Scripts checks it, and that text runs, its #include lines and $.evalFile reading in the folder that read found; a file that is no longer a listed script ends with \"the script is no longer in the Scripts folder\" and nothing runs), name?: the name errors and the report use (default: the script's #script line, else the path's file name, or \"script\"), args?: {…} (at most 1 MiB as JSON; vc.args in the script), answers?: [{kind: alert|confirm|prompt, value: \"ok\" (alert) | true or false (confirm) | text or null (prompt)}] (for a run with nobody to ask: the answers to its dialogs, in order; at most 10000 and 1 MiB as JSON; refused in the app, where the person answers; an empty object is an empty list), maxFuel?: whole number from 1 to 100000000000 (instructions in all; default 1000000000)} run a JavaScript file against the open documents, through the vc object: vc.run(id, params) runs a command and returns its result, a failed command throws an error the script can catch and puts back the documents and the session state it changed, while any file it wrote stays written and is named; vc.document is a snapshot of the active document or null; vc.commands lists the commands a script may run; vc.log(value) adds to the report and the Script Console (script.console); $.write(...values) writes the values to the Script Console as String(value) gives them, and $.writeln(...values) does the same and ends the line; $.evalFile(path, timeout?) runs a file with the same globals and returns its last value (timeout, in milliseconds from 0, is taken and not waited on), $.fileName is the file of the code that reads it (the file being run for code that eval or Function compiled; empty for code compiled from a script given as text), $.includePath the #includepath list and $.engineName the engine's name (VectorCraft without #targetengine); alert(message[, title, errorIcon]), confirm(message[, noAsDflt, title]) and prompt(message, preset[, title]) open a dialog with a Stop button (default title \"Script Alert\"; message and preset as String(value) gives them; errorIcon and noAsDflt as Boolean(value) gives them; No is the default with noAsDflt): alert returns undefined, confirm true for Yes and false for No, prompt the field's text for OK and null for Cancel; in the app the run waits at the call for the person's answer and Stop ends it as script.stop does, a dialog cannot open inside a callback of a built-in, a getter, a conversion or a file $.evalFile runs and throws there (an #include file's code is the script's own and can), and a run with nobody to ask takes the next of answers, and ends when none is left or the next is for another kind of dialog, or when the script ends with answers unused; vc.args is args. Before anything runs, the script's preprocessor lines (# or //@ at the start of a line, outside strings and comments) are read: #include \"file\" and //@include put that file's text in place of the line, looked for beside the file that includes it, then in each #includepath folder in turn (separated by ;, relative to that file's folder; a later #includepath replaces the list), then in each JSINCLUDE folder; #script names the run; #target takes any value and changes nothing; #strict on makes an assignment to a read-only or getter-only property, or a new property on an object that is not extensible (preventExtensions, seal, freeze, vc, $), throw a TypeError, without the rest of ES5 strict mode, and #strict off turns that off (the last #strict line of the script and its includes sets the run; off without one; a $.evalFile file's own line holds for its code); #targetengine name runs the script in the named engine, whose globals and functions stay for the next run that names it until script.engine.drop drops it or the session ends (script.engines lists them; a name of letters, digits and _ not starting with a digit, or a quoted one of 1 to 64 bytes without control characters, matched as written; only in the script itself, once, before its code and #include lines; main, and a script without the line, get a new engine each run; a session keeps 8 named engines, a ninth name is refused, each has 64 MiB of heap, and an uncaught error, a limit or script.stop keeps the globals the run set while the documents go back; host functions kept in a global act for the run that calls them; an error in code an earlier run compiled is at that run's file, line and column, within 8 MiB of source maps kept for each engine, the oldest going first; not on the web); #engine is refused as unsupported, any other #name as unknown, and another //@name is a comment. A script run from a file reads its includes and $.evalFile's files only in that file's folder and the folders below it, refusing a path with a .. name or a link that l Line truncated
always,
run
),
+1
View File
@@ -105,6 +105,7 @@ const WAIT_FOR_TOOL_EDIT: &[&str] = &[
"symbol.selectInstances",
"view.guides.lock",
"view.proofSetup",
"view.proofSetup.load",
"view.proofColors",
"view.overprintPreview",
"view.separationsPreview",
+5
View File
@@ -189,6 +189,11 @@ pub struct Session {
/// The folder of the New Document profiles `file.new` starts documents from; `None`: none,
/// every document starts with the defaults ([`Session::attach_new_doc_profiles`]).
new_doc_profile_dir: Option<std::path::PathBuf>,
/// The folder of the proof setups `view.proofSetup.save` saves by name and View → Proof Setup
/// lists; `None`: no folder ([`Session::attach_proof_setups`]).
proof_setup_dir: Option<std::path::PathBuf>,
/// How many proof setup files `view.proofSetup.save` wrote ([`Session::proof_setup_saves`]).
proof_setup_saves: u64,
/// The folder of each script's data folder (`Folder.userData`), beside which the grants file
/// keeps the file access people allowed scripts; `None`: no folder
/// ([`Session::attach_script_data`]).
+2
View File
@@ -168,6 +168,8 @@ pub fn refused_to_scripts(id: &str) -> bool {
"color.removeProfile",
"file.print",
"view.proofSetup",
"view.proofSetup.save",
"view.proofSetup.load",
"view.proofColors",
"view.overprintPreview",
"view.separationsPreview",
+2
View File
@@ -99,6 +99,8 @@ impl Session {
scripts_dir: None,
metadata_templates_dir: None,
new_doc_profile_dir: None,
proof_setup_dir: None,
proof_setup_saves: 0,
script_data_dir: None,
plugin_output: None,
plugin_install_approval: None,
+25
View File
@@ -119,6 +119,7 @@ fn the_builtin_libraries_are_original_brushes_generated_in_code() {
"energy-beams",
"dry-media",
"tech-circuit",
"engraving",
"arrows",
"image-brush"
]
@@ -272,6 +273,30 @@ fn black_stroke() -> vectorcraft_doc::StrokeLayer {
vectorcraft_doc::StrokeLayer::new(vectorcraft_color::Paint::solid(vectorcraft_color::Color::BLACK), 1.0)
}
#[test]
fn engraving_library_draws_fine_parallel_strokes_and_survives_save() {
let mut s = session();
let listed = run(&mut s, "brush.libraries", json!({}));
let entry = listed["libraries"].as_array().unwrap().iter().find(|l| l["id"] == "engraving").unwrap();
assert_eq!((entry["name"].as_str(), entry["category"].as_str(), entry["count"].as_u64()), (Some("Engraving"), Some("builtIn"), Some(4)));
let (_, lib) = cmd::brushlib::library(&s, "Engraving").unwrap();
for b in &lib.brushes {
for length in [2.0, 200.0] {
let pieces = vectorcraft_brush::stroke_pieces(&lib.doc, b, &line_to(length), &black_stroke());
let pts = anchors(&pieces.iter().collect::<Vec<_>>());
assert!(!pts.is_empty() && pts.iter().all(|p| p.x.is_finite() && p.y.is_finite()), "{} at {length} pt", b.name);
}
}
let path = run(&mut s, "shape.line", json!({"x1": 10, "y1": 20, "x2": 210, "y2": 20}))["id"].as_u64().unwrap();
let added = run(&mut s, "brush.addFromLibrary", json!({"library": "engraving", "name": "Fine Hatching", "apply": true, "ids": [path]}));
assert_eq!(strs(&added["added"]), ["Fine Hatching"]);
assert_eq!(added["applied"], json!([path]));
let saved = run(&mut s, "brush.saveLibrary", json!({"names": ["Fine Hatching"]}));
let bytes = vectorcraft_format::base64_decode(saved["dataBase64"].as_str().unwrap()).unwrap();
let reopened = vectorcraft_format::load(&bytes).unwrap();
assert_eq!(vectorcraft_brush::find(&reopened, "Fine Hatching").unwrap(), lib.brushes[0]);
}
#[test]
fn stipple_library_draws_dot_textures_and_survives_save() {
let mut s = session();
+267
View File
@@ -682,6 +682,273 @@ fn proof_setup_simulates_tritanopia() {
s.execute("view.proofSetup", &json!({"target": "workingCmyk", "proof": false})).unwrap();
}
/// View › Proof Setup › Customize's settings: an RGB profile as the device, Preserve Numbers and
/// Simulate Black Ink, kept in the proof view, read back and drawn; bad values are refused and
/// leave the view as it was.
#[test]
fn proof_setup_takes_the_custom_proof_settings() {
let _g = GLOBAL.lock().unwrap_or_else(|e| e.into_inner());
let _v = DefaultView::new();
let mut s = session();
rect(&mut s, 0.0, 0.0, 100.0, 100.0, json!("#000000"));
let r = s.execute("view.proofSetup", &json!({})).unwrap();
assert_eq!((r["preserveNumbers"].as_bool(), r["simulateBlack"].as_bool()), (Some(false), Some(false)));
let device = format!("cmyk:{}", cms::GENERIC_CMYK);
let r = s.execute("view.proofSetup", &json!({"target": device, "simulateBlack": true, "proof": true})).unwrap();
assert_eq!((r["target"].as_str(), r["simulateBlack"].as_bool(), r["proofColors"].as_bool()), (Some(device.as_str()), Some(true), Some(true)));
let setup = vectorcraft_render::proof::active_proof().unwrap();
assert!(setup.simulate_black && !setup.preserve_numbers);
let doc = s.doc().unwrap().doc.clone();
let gray = render(&doc, RenderOptions { proof: Some(setup.clone()), ..Default::default() }).pixel(50, 50);
let black = render(&doc, RenderOptions { proof: Some(ProofSetup { simulate_black: false, ..setup }), ..Default::default() }).pixel(50, 50);
assert!(gray[0] > black[0] + 10, "the press black shows as a gray: {gray:?} vs {black:?}");
let rgb = format!("rgb:{}", cms::DISPLAY_P3);
let r = s.execute("view.proofSetup", &json!({"target": rgb, "preserveNumbers": true})).unwrap();
assert_eq!((r["target"].as_str(), r["preserveNumbers"].as_bool()), (Some(rgb.as_str()), Some(true)));
assert_eq!(vectorcraft_render::proof::view().setup.target, ProofTarget::Rgb(cms::DISPLAY_P3.into()));
// Unchanged settings leave the revision alone.
let rev = s.doc().unwrap().revision;
s.execute("view.proofSetup", &json!({"target": rgb, "preserveNumbers": true, "simulateBlack": true})).unwrap();
assert_eq!(s.doc().unwrap().revision, rev);
let view = vectorcraft_render::proof::view();
refused(&mut s, "view.proofSetup", json!({"target": "rgb:Nope"}), "unknown RGB profile `Nope`");
refused(&mut s, "view.proofSetup", json!({"target": format!("rgb:{}", cms::GENERIC_CMYK)}), "unknown RGB profile");
refused(&mut s, "view.proofSetup", json!({"target": "rgb:"}), "unknown RGB profile");
refused(&mut s, "view.proofSetup", json!({"target": "workingCmyk", "preserveNumbers": "yes"}), "`preserveNumbers` must be true or false");
refused(&mut s, "view.proofSetup", json!({"simulateBlack": 1}), "`simulateBlack` must be true or false");
assert_eq!(vectorcraft_render::proof::view(), view, "the proof view is unchanged");
assert_eq!(s.doc().unwrap().revision, rev, "nothing redraws");
}
/// A custom proof setup saved to a file loads back as the same setup with Proof Colors on; saving
/// leaves the proof view as it is, and `view.proofSetup.read` only reads the file.
#[test]
fn a_saved_proof_setup_loads_back() {
let _g = GLOBAL.lock().unwrap_or_else(|e| e.into_inner());
let _v = DefaultView::new();
let dir = vectorcraft_testkit::TempDir::new("proof-setup-file");
let path = dir.join("press.vcproof").to_string_lossy().to_string();
let mut s = session();
let device = format!("cmyk:{}", cms::GENERIC_CMYK);
let r = s
.execute(
"view.proofSetup.save",
&json!({"path": path, "target": device, "intent": "perceptual", "preserveNumbers": true, "simulateBlack": true}),
)
.unwrap();
assert_eq!((r["path"].as_str(), r["target"].as_str(), r["intent"].as_str()), (Some(path.as_str()), Some(device.as_str()), Some("perceptual")));
assert_eq!(vectorcraft_render::proof::view(), Default::default(), "saving leaves the proof view alone");
let text = std::fs::read_to_string(&path).unwrap();
assert!(text.contains("\"format\": \"vectorcraft-proof-setup\"") && text.contains("\"version\": 1"), "{text}");
let r = s.execute("view.proofSetup.read", &json!({"path": path})).unwrap();
assert_eq!((r["target"].as_str(), r["preserveNumbers"].as_bool(), r["simulateBlack"].as_bool()), (Some(device.as_str()), Some(true), Some(true)));
assert_eq!(vectorcraft_render::proof::view(), Default::default(), "reading changes nothing");
assert!(!crate::waits_for_tool_edit("view.proofSetup.read"), "reading does not finish a tool's edit");
let rev = s.doc().unwrap().revision;
let r = s.execute("view.proofSetup.load", &json!({"path": path})).unwrap();
assert_eq!((r["proofColors"].as_bool(), r["path"].as_str()), (Some(true), Some(path.as_str())));
let v = vectorcraft_render::proof::view();
assert!(v.proof_colors);
let want = ProofSetup {
target: ProofTarget::Cmyk(cms::GENERIC_CMYK.into()),
intent: Intent::Perceptual,
simulate_paper: false,
preserve_numbers: true,
simulate_black: true,
..Default::default()
};
assert_eq!(v.setup, want);
assert!(s.doc().unwrap().revision > rev, "the canvas redraws");
// Saved from the current setup, the file holds that setup: the round trip keeps every field.
let again = dir.join("again.vcproof").to_string_lossy().to_string();
s.execute("view.proofSetup.save", &json!({"path": again, "simulatePaper": true})).unwrap();
s.execute("view.proofSetup", &json!({"target": "workingCmyk"})).unwrap();
s.execute("view.proofSetup.load", &json!({"path": again})).unwrap();
assert_eq!(vectorcraft_render::proof::view().setup, ProofSetup { simulate_paper: true, ..want });
}
/// Saving refuses a target that is not a device, bad params, a bad name and a file larger than
/// loading reads; loading refuses a file
/// that is too large, not a proof setup, newer, or whose device is a profile that is not loaded,
/// and the proof view stays as it was.
#[test]
fn proof_setup_files_refuse_what_they_cannot_use() {
let _g = GLOBAL.lock().unwrap_or_else(|e| e.into_inner());
let _v = DefaultView::new();
let dir = vectorcraft_testkit::TempDir::new("proof-setup-refused");
let file = |n: &str| dir.join(n).to_string_lossy().to_string();
let mut s = session();
let path = file("a.vcproof");
refused(&mut s, "view.proofSetup.save", json!({"path": path, "target": "protanopia"}), "`protanopia` is not a device to simulate");
refused(&mut s, "view.proofSetup.save", json!({"path": path, "target": "rgb:Nope"}), "unknown RGB profile `Nope`");
refused(&mut s, "view.proofSetup.save", json!({"path": path, "simulateBlack": "yes"}), "`simulateBlack` must be true or false");
refused(&mut s, "view.proofSetup.save", json!({}), "missing `path` or `name`");
refused(&mut s, "view.proofSetup.save", json!({"path": path, "name": "x"}), "not both");
refused(&mut s, "view.proofSetup.save", json!({"path": " "}), "`path` is empty");
refused(&mut s, "view.proofSetup.save", json!({"name": "x"}), "need the preferences folder");
assert!(!std::path::Path::new(&path).exists(), "nothing is written");
s.attach_proof_setups(dir.join("Proof Setups"));
for bad_name in ["", " ", "../up", "a/b", "a\\b", ".hidden", "c:d"] {
refused(&mut s, "view.proofSetup.save", json!({"name": bad_name}), "`name`");
}
refused(&mut s, "view.proofSetup.save", json!({"name": "x".repeat(101)}), "longer than 100 characters");
// A device whose name makes the file larger than load reads is refused, and nothing is written.
let long = "Long Profile Name ".repeat(4000);
cms::register_icc(&cms::icc_bytes(cms::DISPLAY_P3).unwrap(), Some(long.clone())).unwrap();
let refusal = s.execute("view.proofSetup.save", &json!({"path": path, "target": format!("rgb:{long}")}));
cms::unregister_icc(&long);
assert!(refusal.unwrap_err().to_string().contains("larger than 65536 bytes"), "a setup load can't read is refused");
assert!(!std::path::Path::new(&path).exists(), "nothing is written");
let before = vectorcraft_render::proof::view();
let write = |n: &str, text: &str| {
let p = file(n);
std::fs::write(&p, text).unwrap();
p
};
let ok = r#"{"format": "vectorcraft-proof-setup", "version": 1, "target": "workingCmyk", "intent": "relative"}"#;
let cases = [
(write("big.vcproof", &format!("{ok}{}", " ".repeat(64 << 10))), "larger than 65536 bytes"),
(write("junk.vcproof", "not json"), "not a proof setup file"),
(write("other.vcproof", r#"{"format": "other", "version": 1}"#), "not a VectorCraft proof setup file"),
(write("newer.vcproof", &ok.replace("\"version\": 1", "\"version\": 2")), "made by a newer VectorCraft"),
(write("missing.vcproof", &ok.replace("workingCmyk", "cmyk:Not Loaded")), "the CMYK profile `Not Loaded`, which is not loaded"),
(write("blind.vcproof", &ok.replace("workingCmyk", "deuteranopia")), "not a device to simulate"),
(write("intent.vcproof", &ok.replace("relative", "vivid")), "unknown intent `vivid`"),
(write("flag.vcproof", &ok.replace("}", r#", "simulatePaper": 1}"#)), "`simulatePaper` must be true or false"),
];
for (p, msg) in cases {
for cmd in ["view.proofSetup.load", "view.proofSetup.read"] {
refused(&mut s, cmd, json!({"path": p}), msg);
}
}
refused(&mut s, "view.proofSetup.load", json!({"path": file("gone.vcproof")}), "gone.vcproof");
assert_eq!(vectorcraft_render::proof::view(), before, "the proof view is unchanged");
// A file of the limit's size is read.
let padded = format!("{ok}{}", " ".repeat((64 << 10) - ok.len()));
s.execute("view.proofSetup.load", &json!({"path": write("limit.vcproof", &padded)})).unwrap();
}
/// Setups saved by name go in the Proof Setups folder, made on the first save, and are listed by
/// name; other files there are left out, and a run without the folder lists none.
#[test]
fn proof_setups_saved_by_name_are_listed() {
let _g = GLOBAL.lock().unwrap_or_else(|e| e.into_inner());
let _v = DefaultView::new();
let mut s = session();
assert_eq!(s.execute("view.proofSetup.list", &json!({})).unwrap(), json!({"folder": null, "setups": [], "truncated": false}));
let dir = vectorcraft_testkit::TempDir::new("proof-setup-list");
let folder = dir.join("Proof Setups");
s.attach_proof_setups(folder.clone());
let r = s.execute("view.proofSetup.list", &json!({})).unwrap();
assert_eq!(r["setups"], json!([]), "no folder yet: none saved");
let r = s.execute("view.proofSetup.save", &json!({"name": " Coated Press ", "target": format!("rgb:{}", cms::DISPLAY_P3)})).unwrap();
let saved = folder.join("Coated Press.vcproof");
assert_eq!(r["path"].as_str(), Some(saved.to_string_lossy().as_ref()));
s.execute("view.proofSetup.save", &json!({"name": "Bright"})).unwrap();
std::fs::write(folder.join("notes.txt"), "x").unwrap();
std::fs::create_dir(folder.join("Sub.vcproof")).unwrap();
let r = s.execute("view.proofSetup.list", &json!({})).unwrap();
let names: Vec<&str> = r["setups"].as_array().unwrap().iter().filter_map(|e| e["name"].as_str()).collect();
assert_eq!(names, ["Bright", "Coated Press"]);
assert_eq!(r["truncated"], false);
s.execute("view.proofSetup.load", &json!({"name": "Coated Press"})).unwrap();
assert_eq!(vectorcraft_render::proof::view().setup.target, ProofTarget::Rgb(cms::DISPLAY_P3.into()));
for i in 0..101 {
std::fs::write(folder.join(format!("z{i:03}.vcproof")), "x").unwrap();
}
let r = s.execute("view.proofSetup.list", &json!({})).unwrap();
assert_eq!((r["setups"].as_array().unwrap().len(), r["truncated"].as_bool()), (100, Some(true)));
assert_eq!((r["setups"][0]["name"].as_str(), r["setups"][99]["name"].as_str()), (Some("Bright"), Some("z097")), "the first 100 by name");
}
/// Other files in the Proof Setups folder, however many, do not keep its setups from the listing.
#[test]
fn proof_setups_are_listed_among_many_other_files() {
let _g = GLOBAL.lock().unwrap_or_else(|e| e.into_inner());
let _v = DefaultView::new();
let mut s = session();
let dir = vectorcraft_testkit::TempDir::new("proof-setup-list-crowded");
let folder = dir.join("Proof Setups");
std::fs::create_dir_all(&folder).unwrap();
for i in 0..5000 {
std::fs::write(folder.join(format!("a{i:04}.txt")), "").unwrap();
}
s.attach_proof_setups(folder.clone());
s.execute("view.proofSetup.save", &json!({"name": "Press"})).unwrap();
let r = s.execute("view.proofSetup.list", &json!({})).unwrap();
assert_eq!((r["setups"].as_array().unwrap().len(), r["truncated"].as_bool()), (1, Some(false)));
assert_eq!(r["setups"][0]["name"], "Press");
}
/// The listing names only files that `name` loads (`<name>.vcproof`, a name `save` can give), in
/// the order of those names, and the limit keeps the first by name; a folder that can't be read is
/// an error, not an empty listing.
#[test]
fn proof_setups_are_listed_by_names_that_load_them() {
let _g = GLOBAL.lock().unwrap_or_else(|e| e.into_inner());
let _v = DefaultView::new();
let mut s = session();
let dir = vectorcraft_testkit::TempDir::new("proof-setup-list-names");
let folder = dir.join("Proof Setups");
std::fs::create_dir_all(&folder).unwrap();
s.attach_proof_setups(folder.clone());
let ok = r#"{"format": "vectorcraft-proof-setup", "version": 1, "target": "workingCmyk", "intent": "relative"}"#;
for file in ["Press.vcproof", "Press Matte.vcproof", "Loud.VCPROOF", " Lead.vcproof"] {
std::fs::write(folder.join(file), ok).unwrap();
}
let names = |r: &Value| r["setups"].as_array().unwrap().iter().filter_map(|e| e["name"].as_str().map(str::to_string)).collect::<Vec<_>>();
let r = s.execute("view.proofSetup.list", &json!({})).unwrap();
assert_eq!((names(&r), r["truncated"].as_bool()), (vec!["Press".to_string(), "Press Matte".to_string()], Some(false)));
for name in names(&r) {
s.execute("view.proofSetup.read", &json!({ "name": name })).unwrap();
}
// `Press` and `Press Matte` compete for the last place: the first by name keeps it.
for i in 0..99 {
std::fs::write(folder.join(format!("A{i:02}.vcproof")), "x").unwrap();
}
let r = s.execute("view.proofSetup.list", &json!({})).unwrap();
let listed = names(&r);
assert_eq!((listed.len(), listed.last().map(String::as_str), r["truncated"].as_bool()), (100, Some("Press"), Some(true)));
// A folder that is not one can't be listed.
let file = dir.join("not a folder");
std::fs::write(&file, "x").unwrap();
s.attach_proof_setups(file);
refused(&mut s, "view.proofSetup.list", json!({}), "not a folder");
}
/// A file name that is not valid Unicode is left out of the listing, which then says it is
/// incomplete: a path made from a lossy copy of the name would name another file.
#[test]
fn proof_setup_names_that_are_not_unicode_are_left_out() {
let _g = GLOBAL.lock().unwrap_or_else(|e| e.into_inner());
let _v = DefaultView::new();
let mut s = session();
let dir = vectorcraft_testkit::TempDir::new("proof-setup-list-bytes");
let folder = dir.join("Proof Setups");
std::fs::create_dir_all(&folder).unwrap();
#[cfg(unix)]
let odd = {
use std::os::unix::ffi::OsStringExt;
std::ffi::OsString::from_vec(b"Odd\xff.vcproof".to_vec())
};
#[cfg(windows)]
let odd = {
use std::os::windows::ffi::OsStringExt;
std::ffi::OsString::from_wide(&"Odd?.vcproof".encode_utf16().map(|u| if u == u16::from(b'?') { 0xD800 } else { u }).collect::<Vec<_>>())
};
// A file system that refuses such a name has nothing to leave out.
if std::fs::write(folder.join(odd), "x").is_err() {
return;
}
std::fs::write(folder.join("Press.vcproof"), "x").unwrap();
s.attach_proof_setups(folder);
let r = s.execute("view.proofSetup.list", &json!({})).unwrap();
assert_eq!(
(r["setups"].as_array().map(Vec::len), r["setups"][0]["name"].as_str(), r["truncated"].as_bool()),
(Some(1), Some("Press"), Some(true))
);
}
/// Whether the content has a DeviceCMYK fill/stroke operator (`c m y k k` / `K`).
fn has_cmyk_op(pdf: &str) -> bool {
let toks: Vec<&str> = pdf.split_ascii_whitespace().collect();
+100
View File
@@ -585,6 +585,106 @@ fn a_polygon_takes_its_angle_radius_side_length_and_equal_sides() {
}
}
/// Rectangle Angle and Ellipse Angle: `rectangleAngle` and `ellipseAngle` turn each selected live
/// rectangle or ellipse about its own center, keeping its size, corners and pie, as one undo step.
/// The angle it already has records no step, each key leaves the other kind as it is, and a value
/// that is not a number is an error.
#[test]
fn a_rectangle_and_an_ellipse_take_their_angle() {
let (mut s, rect) = session();
run(&mut s, json!({"radius": 8}));
let ellipse = NodeId(s.execute("shape.ellipse", &json!({"x": 200, "y": 200, "width": 120, "height": 80})).unwrap()["id"].as_u64().unwrap());
run(&mut s, json!({"pieStart": 30, "pieEnd": 120}));
let live = |s: &Session, id: NodeId| {
let n = s.doc().unwrap().doc.node(id).unwrap();
(n.live_shape().unwrap().clone(), n.geometric_bounds().unwrap())
};
let steps = |s: &Session| s.doc().unwrap().history.undo.len();
let close = |a: f64, b: f64| (a - b).abs() < 1e-6;
let angle = |s: &Session, id: NodeId| live(s, id).0.shape_angle().unwrap();
// The ellipse's center: the middle of its untransformed box, wherever its pie leaves the path.
let ellipse_center = |s: &Session| match live(s, ellipse).0 {
LiveShape::Ellipse { w, h, xf, .. } => xf * vectorcraft_geom::Point::new(w / 2.0, h / 2.0),
l => panic!("{l:?}"),
};
let center = ellipse_center(&s);
s.execute("select.set", &json!({"ids": [rect.0]})).unwrap();
let n = steps(&s);
run(&mut s, json!({"rectangleAngle": 90}));
let (l, b) = live(&s, rect);
assert!(close(angle(&s, rect), 90.0), "{l:?}");
// 100 × 60 at (10, 10) turned about (60, 40): 60 wide, 100 tall, same center.
assert!(close(b.width(), 60.0) && close(b.height(), 100.0) && close(b.center().x, 60.0) && close(b.center().y, 40.0), "{b:?}");
let LiveShape::Rectangle { w, h, radii, .. } = &l else { panic!("{l:?}") };
assert!(close(*w, 100.0) && close(*h, 60.0) && *radii == [8.0; 4], "{w} {h} {radii:?}");
assert_eq!(steps(&s), n + 1, "one undo step");
for same in [json!({"rectangleAngle": 90}), json!({"rectangleAngle": 450}), json!({"rectangleAngle": -270}), json!({"ellipseAngle": 10})] {
run(&mut s, same.clone());
assert_eq!(steps(&s), n + 1, "{same} records no undo step");
}
// A turn the field gives back rounded is the angle the shape has: typing it again records no step.
run(&mut s, json!({"rectangleAngle": 33.3}));
let now = angle(&s, rect);
run(&mut s, json!({"rectangleAngle": now}));
run(&mut s, json!({"rectangleAngle": 33.3}));
assert_eq!(steps(&s), n + 2);
for bad in [json!({"rectangleAngle": "left"}), json!({"ellipseAngle": "up"}), json!({"rectangleAngle": true})] {
assert!(s.execute("object.setLiveShape", &bad).is_err(), "{bad}");
assert_eq!(steps(&s), n + 2, "{bad} changes nothing");
}
// The ellipse turns about its center and keeps its pie.
s.execute("select.set", &json!({"ids": [ellipse.0]})).unwrap();
run(&mut s, json!({"ellipseAngle": 90}));
let (l, b) = live(&s, ellipse);
assert!(close(angle(&s, ellipse), 90.0), "{l:?}");
let LiveShape::Ellipse { pie, .. } = &l else { panic!("{l:?}") };
assert_eq!(*pie, (30.0, 120.0));
let now = ellipse_center(&s);
assert!(close(now.x, center.x) && close(now.y, center.y), "{center:?} → {now:?}");
assert!(b.width() < b.height(), "120 × 80 turned a quarter turn: {b:?}");
// Both selected: each key turns its own kind only, each about its own center.
s.execute("select.set", &json!({"ids": [rect.0, ellipse.0]})).unwrap();
run(&mut s, json!({"rectangleAngle": 45}));
assert!(close(angle(&s, rect), 45.0) && close(angle(&s, ellipse), 90.0));
let b = live(&s, rect).1;
assert!(close(b.center().x, 60.0) && close(b.center().y, 40.0), "{b:?}");
s.execute("edit.undo", &json!({})).unwrap();
assert!(close(angle(&s, rect), 33.3));
// A reflected rectangle takes the angle too, about its center.
s.execute("select.set", &json!({"ids": [rect.0]})).unwrap();
s.execute("object.reflect", &json!({"axis": "vertical"})).unwrap();
let before = live(&s, rect).1.center();
run(&mut s, json!({"rectangleAngle": 20}));
let after = live(&s, rect).1.center();
assert!(close(angle(&s, rect), 20.0) && close(before.x, after.x) && close(before.y, after.y), "{before:?} → {after:?}");
}
/// A shape named in `ids` that a turn would take past the coordinate limit (±4,000,000 pt) is an
/// error that changes nothing, whether or not it is selected.
#[test]
fn a_turn_past_the_coordinate_limit_is_an_error() {
let mut s = Session::new();
s.execute("file.new", &json!({"width": 400, "height": 400})).unwrap();
let mut add = |cmd: &str, p: Value| s.execute(cmd, &p).unwrap()["id"].as_u64().unwrap();
// Each reaches within 10 pt of the limit and past it when turned.
let rect = add("shape.rectangle", json!({"x": 3_999_890, "y": 100, "width": 100, "height": 100}));
let ellipse = add("shape.ellipse", json!({"x": 3_999_950, "y": 100, "width": 40, "height": 100}));
let polygon = add("shape.polygon", json!({"cx": 3_999_955, "cy": 200, "radius": 50, "sides": 6}));
for (id, key, angle) in [(rect, "rectangleAngle", 45), (ellipse, "ellipseAngle", 90), (polygon, "polygonAngle", 90)] {
for selected in [false, true] {
s.execute("select.set", &json!({"ids": if selected { vec![id] } else { vec![] }})).unwrap();
let (doc, steps) = (s.doc().unwrap().doc.clone(), s.doc().unwrap().history.undo.len());
let e = s.execute("object.setLiveShape", &json!({"ids": [id], key: angle})).unwrap_err();
assert!(e.to_string().contains("out of range"), "{key}, selected {selected}: {e}");
assert!(*s.doc().unwrap().doc == *doc && s.doc().unwrap().history.undo.len() == steps, "{key}, selected {selected}: changed");
}
}
}
/// A live line's Line Properties: Line Length keeps its first end in place, Line Angle (degrees
/// counterclockwise, any finite value brought into 0 to 360) turns it about its midpoint, the
/// length applies before the angle, every selected line takes them in one undo step, and a value
+147
View File
@@ -212,6 +212,153 @@ fn cancel_new_pattern_removes_it() {
assert_eq!(doc(&s).layers.len(), 1);
}
/// A 30×40 blue rectangle at (100, 100) with no stroke, selected.
fn blue_rect(s: &mut Session) -> NodeId {
let b = rect(s, 100.0, 100.0, 30.0, 40.0);
s.execute("paint.setFill", &json!({"ids": [b.0], "color": "#0000ff"})).unwrap();
s.execute("paint.setStroke", &json!({"ids": [b.0], "none": true})).unwrap();
sel(s, &[b]);
b
}
/// Replace Pattern Art gives the pattern copies of the selected art as its tile art in one undo
/// step: the pattern keeps its name, swatch, place, tile and options, art painted with it keeps the
/// paint, and the selected art stays on the canvas, selected. Undo and Redo swap the two tiles.
#[test]
fn replace_art_gives_a_pattern_new_tile_art() {
let mut s = session();
let red = make_dots(&mut s);
let filled = rect(&mut s, 200.0, 200.0, 100.0, 100.0);
s.execute("paint.setFill", &json!({"ids": [filled.0], "swatch": "Dots"})).unwrap();
s.execute("pattern.options", &json!({"name": "Dots", "tileType": "hexByRow"})).unwrap();
let blue = blue_rect(&mut s);
let old = doc(&s).pattern("Dots").unwrap().clone();
let place = |s: &Session| doc(s).swatches_iter().position(|w| w.name == "Dots");
let (at, swatches, steps) = (place(&s), doc(&s).swatches_iter().count(), s.doc().unwrap().history.undo.len());
let v = s.execute("object.pattern.replaceArt", &json!({"name": "Dots"})).unwrap();
assert_eq!(v["name"], "Dots");
let d = doc(&s);
let def = d.pattern("Dots").unwrap();
assert_eq!(def.art.len(), 1);
assert_eq!(def.art[0].kind, node(&s, blue).kind, "the tile art is the blue rectangle");
assert_eq!(def.art[0].appearance, node(&s, blue).appearance);
assert_ne!(def.art[0].id, blue, "a copy with an id of its own");
assert_eq!((def.tile, def.tile_type, &def.name), (old.tile, old.tile_type, &old.name), "the tile and options stay");
assert_eq!((d.patterns.len(), place(&s), d.swatches_iter().count()), (1, at, swatches), "no new pattern or swatch");
assert!(is_pattern(&node(&s, filled).appearance.fill_paint(), "Dots"), "the filled art keeps the pattern");
assert!(d.node(blue).is_some() && d.node(red).is_some(), "the art stays");
assert_eq!(s.doc().unwrap().selection.objects.to_vec(), vec![blue], "the art stays selected");
let st = s.doc().unwrap();
assert_eq!((st.history.undo.len(), st.history.undo.last().map(|e| e.label.as_str())), (steps + 1, Some("Replace Pattern Art")));
let new = def.art.clone();
s.execute("edit.undo", &json!({})).unwrap();
assert_eq!(doc(&s).pattern("Dots").unwrap(), &old, "Undo gives the old tile art back");
s.execute("edit.redo", &json!({})).unwrap();
assert_eq!(doc(&s).pattern("Dots").unwrap().art, new, "Redo gives the new tile art");
}
/// With Size Tile to Art on, the tile fits the new art (and its spacing); `ids` names the art.
#[test]
fn replace_art_fits_the_tile_when_size_tile_to_art_is_on() {
let mut s = session();
make_dots(&mut s);
s.execute("pattern.options", &json!({"name": "Dots", "sizeTileToArt": true, "hSpacing": 4, "vSpacing": 6})).unwrap();
let blue = blue_rect(&mut s);
s.execute("select.set", &json!({"ids": []})).unwrap();
s.execute("object.pattern.replaceArt", &json!({"name": "Dots", "ids": [blue.0]})).unwrap();
assert_eq!(doc(&s).pattern("Dots").unwrap().tile, Rect::new(98.0, 97.0, 132.0, 143.0));
}
/// Art that matches the tile art already, its own ids aside, records no undo step.
#[test]
fn replace_art_that_matches_the_tile_art_records_nothing() {
let mut s = session();
make_dots(&mut s);
blue_rect(&mut s);
s.execute("object.pattern.replaceArt", &json!({"name": "Dots"})).unwrap();
let (before, steps) = (doc(&s).clone(), s.doc().unwrap().history.undo.len());
s.execute("object.pattern.replaceArt", &json!({"name": "Dots"})).unwrap();
assert_eq!(s.doc().unwrap().history.undo.len(), steps);
assert_eq!(doc(&s), &before);
}
/// Replace Pattern Art is refused, changing nothing, for a missing name or pattern, with no art,
/// while a pattern is edited, and for art painted with the pattern itself, directly, through
/// another pattern, through a symbol, through the paints a graph stores, through a graph design a
/// graph draws its columns with, through the art of a brush on a stroke and through the symbol of an
/// inline graphic in type.
#[test]
fn replace_art_is_refused_without_changing_anything() {
let mut s = session();
make_dots(&mut s);
// "Holds dots": a pattern whose tile is painted with Dots.
let other = rect(&mut s, 100.0, 100.0, 10.0, 10.0);
s.execute("paint.setFill", &json!({"ids": [other.0], "swatch": "Dots"})).unwrap();
sel(&mut s, &[other]);
s.execute("object.pattern.make", &json!({"name": "Holds dots", "edit": false})).unwrap();
let via = rect(&mut s, 150.0, 150.0, 10.0, 10.0);
s.execute("paint.setFill", &json!({"ids": [via.0], "swatch": "Holds dots"})).unwrap();
let stroked = rect(&mut s, 200.0, 200.0, 10.0, 10.0);
s.execute("paint.setStroke", &json!({"ids": [stroked.0], "swatch": "Dots"})).unwrap();
sel(&mut s, &[stroked]);
let instance = id_of(&s.execute("symbol.new", &json!({"name": "Dotted"})).unwrap());
let graph = graph_painted_with(&mut s, "Dots");
// A graph whose stored columns name design "Dotted columns", drawn with Dots, before it is drawn
// again.
let design = rect(&mut s, 300.0, 300.0, 10.0, 10.0);
s.execute("paint.setFill", &json!({"ids": [design.0], "swatch": "Dots"})).unwrap();
s.execute("graph.design", &json!({"new": "Dotted columns", "ids": [design.0]})).unwrap();
let v = s.execute("graph.create", &json!({"type": "column", "x": 300, "y": 200, "width": 60, "height": 40, "csv": ",2024\nQ1,3"}));
let designed = id_of(&v.unwrap());
let mut extras = doc_mut(&mut s).node_mut(designed).unwrap().extras_mut();
extras.graph.as_mut().unwrap().series_columns =
vec![Some(vectorcraft_doc::ColumnDesign { design: "Dotted columns".into(), ..Default::default() })];
drop(extras);
// A path stroked with an art brush whose art is filled with Dots.
let brush_art = rect(&mut s, 300.0, 350.0, 20.0, 5.0);
s.execute("paint.setFill", &json!({"ids": [brush_art.0], "swatch": "Dots"})).unwrap();
s.execute("brush.new", &json!({"type": "art", "name": "Dotted brush", "ids": [brush_art.0]})).unwrap();
let brushed = rect(&mut s, 300.0, 380.0, 40.0, 10.0);
s.execute("paint.setFill", &json!({"ids": [brushed.0], "none": true})).unwrap();
s.execute("paint.setStroke", &json!({"ids": [brushed.0], "color": "#000000"})).unwrap();
s.execute("brush.apply", &json!({"name": "Dotted brush", "ids": [brushed.0]})).unwrap();
// Type that shows symbol "Dotted" as an inline graphic.
let typed = id_of(&s.execute("text.create", &json!({"x": 20, "y": 420, "text": "Hi"})).unwrap());
s.execute("text.insertInline", &json!({"id": typed.0, "at": 0, "symbol": "Dotted"})).unwrap();
let plain = blue_rect(&mut s);
let unchanged = |s: &Session, before: &vectorcraft_doc::Document, steps: usize, case: &str| {
assert_eq!(doc(s), before, "{case}: the document stays");
assert_eq!(s.doc().unwrap().history.undo.len(), steps, "{case}: no undo step");
};
let (before, steps) = (doc(&s).clone(), s.doc().unwrap().history.undo.len());
for (case, p, why) in [
("no name", json!({}), "missing name".to_string()),
("no pattern", json!({"name": "Stripes"}), "no pattern `Stripes`".into()),
("no art", json!({"name": "Dots", "ids": [9999]}), "select the art for the pattern tile".into()),
("painted with it", json!({"name": "Dots", "ids": [other.0]}), "art painted with `Dots` can't be its tile".into()),
("through a pattern", json!({"name": "Dots", "ids": [via.0]}), "art painted with `Dots` can't be its tile".into()),
("through a symbol", json!({"name": "Dots", "ids": [instance.0]}), "art painted with `Dots` can't be its tile".into()),
("through a graph's paints", json!({"name": "Dots", "ids": [graph.0]}), "art painted with `Dots` can't be its tile".into()),
("through a graph design", json!({"name": "Dots", "ids": [designed.0]}), "art painted with `Dots` can't be its tile".into()),
("through a brush", json!({"name": "Dots", "ids": [brushed.0]}), "art painted with `Dots` can't be its tile".into()),
("through an inline graphic", json!({"name": "Dots", "ids": [typed.0]}), "art painted with `Dots` can't be its tile".into()),
] {
let err = s.execute("object.pattern.replaceArt", &p).unwrap_err();
assert!(err.to_string().contains(&why), "{case}: {err}");
unchanged(&s, &before, steps, case);
}
s.execute("select.set", &json!({"ids": []})).unwrap();
let (before, steps) = (doc(&s).clone(), s.doc().unwrap().history.undo.len());
let err = s.execute("object.pattern.replaceArt", &json!({"name": "Dots"})).unwrap_err();
assert!(err.to_string().contains("select the art for the pattern tile"), "nothing selected: {err}");
unchanged(&s, &before, steps, "nothing selected");
s.execute("object.pattern.edit", &json!({"name": "Holds dots"})).unwrap();
let (before, steps) = (doc(&s).clone(), s.doc().unwrap().history.undo.len());
let err = s.execute("object.pattern.replaceArt", &json!({"name": "Dots", "ids": [plain.0]})).unwrap_err();
assert!(matches!(&err, EngineError::Disabled(_, w) if w == "finish editing the pattern first"), "while editing: {err}");
unchanged(&s, &before, steps, "while editing");
}
fn doc_mut(s: &mut Session) -> &mut vectorcraft_doc::Document {
Arc::make_mut(&mut s.doc_mut().unwrap().doc)
}
+15
View File
@@ -836,6 +836,21 @@ fn a_null_in_group_colors_removes_that_swatch_and_the_ones_after_it_keep_their_p
assert_eq!(link(&s, green), ("#00ff00".into(), Some(names[2].clone())), "art linked to a swatch that stays keeps its link");
}
/// "keep" in `groupColors` leaves the group's swatch at its place as it is, without Global Adjust,
/// and past the group's swatches it adds none.
#[test]
fn keep_in_group_colors_leaves_that_swatch_as_it_is() {
let mut s = session();
run(&mut s, "swatch.newGroup", json!({"name": "Brand", "colors": ["#2878f0", "#ff0000"]}));
let p = json!({"map": [], "group": "Brand", "groupColors": ["keep", "#00ff00", "keep"], "globalAdjust": {"brightness": -50}});
run(&mut s, "recolor.apply", p);
let g = &s.doc().unwrap().doc.swatch_groups.iter().find(|g| g.name == "Brand").unwrap().swatches;
let g: Vec<String> = g.iter().map(|w| w.paint.color().unwrap().to_hex()).collect();
assert_eq!(g.len(), 2, "{g:?}");
assert_eq!(g[0], "#2878f0", "the kept swatch takes no Global Adjust");
assert_ne!(g[1], "#00ff00", "the other new color takes it");
}
/// A gradient or pattern swatch of the group keeps its place and its paint when `recolor.apply`
/// rewrites the group: the group's colors, from the rows or from `groupColors`, go to its color
/// swatches in order.
+31
View File
@@ -160,6 +160,37 @@ fn save_and_load_round_trip_keeps_cmyk_spot_and_groups() {
assert!(s.execute("swatch.library.save", &json!({"user": true})).is_err(), "no user folder in a headless session");
}
/// A library color group that holds a gradient comes into the document whole, the gradient at its
/// place in the group, as a `.ai` library's pattern swatch comes in its color group.
#[test]
fn add_brings_a_library_color_group_holding_a_gradient_whole() {
let mut s = session();
run(&mut s, "swatch.newGroup", json!({"name": "Brand", "colors": ["#123456", "#abcdef"]}));
let r = run(&mut s, "swatch.library.save", json!({"names": ["Brand", "Sunset"], "name": "Mixed"}));
// Move the Sunset gradient into the library's Brand group, as a hand-edited file can.
let mut lib: Value = serde_json::from_str(r["data"].as_str().unwrap()).unwrap();
let swatches = lib["swatches"].as_array_mut().unwrap();
let at = swatches.iter().position(|w| w["name"] == "Sunset").unwrap();
let sunset = swatches.remove(at);
lib["groups"][0]["swatches"].as_array_mut().unwrap().insert(1, sunset);
let r = run(&mut s, "swatch.library.load", json!({"data": lib.to_string(), "name": "mixed.vcswatches"}));
let id = r["library"].as_str().unwrap().to_string();
let (_, loaded) = cmd::swatchlib::library(&s, &id).unwrap();
assert!(matches!(loaded.groups[0].swatches[1].paint, Paint::Gradient(_)), "the reader keeps the gradient in the group");
run(&mut s, "swatch.delete", json!({"names": ["Brand", "Sunset"]}));
for p in [json!({"library": id}), json!({"library": id, "names": ["Brand"]})] {
let undo = undo_len(&s);
let r = run(&mut s, "swatch.library.add", p.clone());
assert!(r["added"].as_array().unwrap().iter().any(|n| n == "Sunset"), "{p}: {r}");
let brand = doc(&s).swatch_groups.iter().find(|g| g.name == "Brand").map(|g| g.swatches.clone()).unwrap_or_default();
let kinds: Vec<(&str, bool)> = brand.iter().map(|w| (w.name.as_str(), matches!(w.paint, Paint::Gradient(_)))).collect();
assert_eq!(kinds.len(), 3, "{p}: {kinds:?}");
assert_eq!(kinds[1], ("Sunset", true), "{p}: the gradient keeps its place in the group");
assert_eq!(undo_len(&s), undo + 1, "{p}: one undo step");
run(&mut s, "edit.undo", json!({}));
}
}
/// The swatch library commands, and the graphic style library save and load that share their file
/// handling, refuse a parameter of the wrong form, such as `user: "true"` or `names: "Grays"`, with
/// an error that names it; the document keeps its swatches and no undo step is recorded. A null
+125 -1
View File
@@ -6,7 +6,7 @@
use std::sync::{Mutex, MutexGuard};
use serde_json::json;
use vectorcraft_color::cms;
use vectorcraft_color::{Color, cms};
use vectorcraft_engine::Session;
use vectorcraft_engine::cmd::colormgmt::{PROFILES_KEY, ProfileChoice, ProfileIssue, doc_profiles};
use vectorcraft_engine::store::MAX_PRESET_FILE;
@@ -20,6 +20,22 @@ fn settings() -> MutexGuard<'static, ()> {
SETTINGS.lock().unwrap_or_else(|e| e.into_inner())
}
/// The working Color Settings as a test found them, put back when it ends (a failing one too)
/// before the next test takes its turn.
struct Restored(cms::ColorSettings, #[allow(dead_code)] MutexGuard<'static, ()>);
impl Drop for Restored {
fn drop(&mut self) {
let _ = cms::set_active(&self.0);
}
}
/// [`settings`], with the working Color Settings put back afterwards.
fn restored_settings() -> Restored {
let g = settings();
Restored(cms::working_settings(), g)
}
#[test]
fn color_settings_lists_profiles_and_validates() {
let _g = settings();
@@ -923,6 +939,114 @@ fn saved_color_settings_that_cannot_be_used_leave_the_defaults() {
}
}
/// View › Proof Setup › Customize's Preserve CMYK Numbers proofs each color from its own inks:
/// with Device CMYK as the working space, C50 M50 Y50 and K50 show as the same gray, and on
/// VectorCraft Generic CMYK they print, and so proof, as different grays; a pattern's tile art
/// proofs the same way. Without it the proof starts from the drawn pixels, which are the same.
#[test]
fn preserve_cmyk_numbers_proofs_each_color_from_its_inks() {
let _g = restored_settings();
let mut s = session();
s.execute("edit.colorSettings", &json!({"cmyk": cms::DEVICE_CMYK})).unwrap();
let k50 = json!({"c": 0, "m": 0, "y": 0, "k": 50});
let cmy = rect(&mut s, 0.0, 0.0, 100.0, 100.0);
exec(&mut s, "paint.setFill", json!({"ids": [cmy.0], "color": {"c": 50, "m": 50, "y": 50, "k": 0}}));
let k = rect(&mut s, 100.0, 0.0, 100.0, 100.0);
exec(&mut s, "paint.setFill", json!({"ids": [k.0], "color": k50}));
// A pattern whose tile is all K50, filling a band below the squares.
let tile = rect(&mut s, 300.0, 0.0, 10.0, 10.0);
exec(&mut s, "paint.setFill", json!({"ids": [tile.0], "color": k50}));
exec(&mut s, "object.pattern.make", json!({"ids": [tile.0], "name": "K50 Tile", "edit": false}));
let band = rect(&mut s, 0.0, 130.0, 200.0, 40.0);
exec(&mut s, "paint.setFill", json!({"ids": [band.0], "swatch": "K50 Tile"}));
let proof = |preserve_numbers| vectorcraft_render::proof::ProofSetup {
target: vectorcraft_render::proof::ProofTarget::Cmyk(cms::GENERIC_CMYK.into()),
preserve_numbers,
..Default::default()
};
let doc = s.doc().unwrap().doc.clone();
let pixel = |px: &[u8], x: usize, y: usize| [px[(y * 200 + x) * 4], px[(y * 200 + x) * 4 + 1], px[(y * 200 + x) * 4 + 2]];
// The pixels at the centers of the two squares and in the patterned band.
let shown = |proof: Option<vectorcraft_render::proof::ProofSetup>| {
let opts = RenderOptions { proof, background: Some([255, 255, 255, 255]), ..Default::default() };
let px = Renderer::new().render(&doc, 200, 200, Affine::IDENTITY, &opts).pixels;
(pixel(&px, 50, 50), pixel(&px, 150, 50), pixel(&px, 55, 155))
};
let (a, b, _) = shown(None);
let (pa, pb, _) = shown(Some(proof(false)));
let (ca, cb, cp) = shown(Some(proof(true)));
let want = |c: Color| cms::active().proof_color(&c, &proof(true)).map(|v| (v * 255.0).round() as i32);
let cmy_want = want(Color::cmyk(0.5, 0.5, 0.5, 0.0));
let k_want = want(Color::cmyk(0.0, 0.0, 0.0, 0.5));
// With Simulate Paper Color the art sits on the device's paper, not on white.
let paper = vectorcraft_render::proof::ProofSetup { simulate_paper: true, ..proof(true) };
let tint = cms::active().proof_srgb([1.0; 3], &paper).map(|v| (v * 255.0).round() as i32);
let opts = RenderOptions { proof: Some(paper), background: Some([255, 255, 255, 255]), ..Default::default() };
let bare = pixel(&Renderer::new().render(&doc, 200, 200, Affine::IDENTITY, &opts).pixels, 50, 115);
assert_eq!(a, b, "the two builds show as one gray in Device CMYK");
assert_eq!(pa, pb, "proofed from the pixels, they stay one gray");
assert!(ca != cb, "proofed from their inks, they print differently: {ca:?} vs {cb:?}");
let near = |got: [u8; 3], want: [i32; 3]| got.iter().zip(want).all(|(g, w)| (i32::from(*g) - w).abs() <= 2);
assert!(near(ca, cmy_want) && near(cb, k_want), "{ca:?} {cmy_want:?}, {cb:?} {k_want:?}");
assert!(near(cp, k_want), "the pattern's tile proofs from its inks: {cp:?} vs {k_want:?}");
assert!(tint != [255; 3] && near(bare, tint), "the bare page shows the paper: {bare:?} vs {tint:?}");
}
/// With Preserve CMYK Numbers, an image in an opacity mask keeps its pixels as they are, so the
/// mask covers the same in a pattern's tile as outside one.
#[test]
fn preserve_cmyk_numbers_leaves_mask_images_in_pattern_tiles_as_they_are() {
let _g = restored_settings();
let mut s = session();
// A K100 square masked by a blue image, the same at (0, 0) and as a pattern's tile.
let masked = |s: &mut Session, x: f64| {
let obj = rect(s, x, 0.0, 20.0, 20.0);
exec(s, "paint.setFill", json!({"ids": [obj.0], "color": {"c": 0, "m": 0, "y": 0, "k": 100}}));
let blue = rect(s, x, 0.0, 20.0, 20.0);
exec(s, "paint.setFill", json!({"ids": [blue.0], "color": "#0000ff"}));
select(s, &[blue]);
exec(s, "object.rasterize", json!({"ppi": 72}));
let image = s.doc().unwrap().selection.objects[0];
select(s, &[obj, image]);
exec(s, "transparency.makeOpacityMask", json!({"clip": true}));
obj
};
masked(&mut s, 0.0);
let tile = masked(&mut s, 300.0);
exec(&mut s, "object.pattern.make", json!({"ids": [tile.0], "name": "Masked Tile", "edit": false}));
let band = rect(&mut s, 0.0, 100.0, 200.0, 40.0);
exec(&mut s, "paint.setFill", json!({"ids": [band.0], "swatch": "Masked Tile"}));
// An unmasked K100 square, for the color the masked one covers the page with.
let solid = rect(&mut s, 100.0, 0.0, 20.0, 20.0);
exec(&mut s, "paint.setFill", json!({"ids": [solid.0], "color": {"c": 0, "m": 0, "y": 0, "k": 100}}));
let proof = vectorcraft_render::proof::ProofSetup {
target: vectorcraft_render::proof::ProofTarget::Cmyk(cms::GENERIC_CMYK.into()),
preserve_numbers: true,
..Default::default()
};
let doc = s.doc().unwrap().doc.clone();
let pixel = |px: &[u8], x: usize, y: usize| [px[(y * 200 + x) * 4], px[(y * 200 + x) * 4 + 1], px[(y * 200 + x) * 4 + 2]];
// The masked square, the middle of a tile (the tiles start at the art's left and top edges,
// every 20 points), the unmasked square and the bare page.
let shown = |proof: Option<vectorcraft_render::proof::ProofSetup>| {
let opts = RenderOptions { proof, background: Some([255, 255, 255, 255]), ..Default::default() };
let px = Renderer::new().render(&doc, 200, 200, Affine::IDENTITY, &opts).pixels;
(pixel(&px, 10, 10), pixel(&px, 50, 130), pixel(&px, 110, 10), pixel(&px, 190, 60))
};
let (plain, plain_tile, plain_k, plain_page) = shown(None);
let (proofed, proofed_tile, proofed_k, proofed_page) = shown(Some(proof));
let near = |a: [u8; 3], b: [u8; 3]| a.iter().zip(b).all(|(a, b)| (i32::from(*a) - i32::from(b)).abs() <= 2);
assert!(plain != [255; 3] && near(plain, plain_tile), "the tile shows the masked square: {plain:?} vs {plain_tile:?}");
assert!(near(proofed, proofed_tile), "the tile's mask covers as the square's does: {proofed:?} vs {proofed_tile:?}");
// The proof changes the ink's color but not how much of the page the mask lets it cover.
let channel = |v: [u8; 3], i: usize| f32::from(v[i]);
let cover = (0..3).map(|i| (channel(plain_page, i) - channel(plain, i)) / (channel(plain_page, i) - channel(plain_k, i))).sum::<f32>() / 3.0;
assert!(cover > 0.02 && cover < 0.98, "the mask covers part of the square: {cover}");
let want: [u8; 3] =
std::array::from_fn(|i| (channel(proofed_page, i) + cover * (channel(proofed_k, i) - channel(proofed_page, i))).round() as u8);
assert!(near(proofed, want), "the proofed square keeps the mask's coverage: {proofed:?} vs {want:?}");
}
/// Edit › Color Settings' color management policies decide what opening a document tagged with
/// profiles other than the working spaces does with them: Preserve Embedded Profiles keeps them,
/// Off and Preserve Numbers take them off and keep the color numbers, and Convert to Working Space
+33
View File
@@ -1278,6 +1278,39 @@ fn polygon_properties_junk() {
assert!(failures.is_empty(), "{} failures:\n{}", failures.len(), failures.join("\n"));
}
/// A live rectangle's and ellipse's Rectangle and Ellipse Angle with junk values, drawn plain,
/// scaled unevenly, flattened to nothing and sheared: never a panic, and the document stays sound.
#[test]
fn rectangle_and_ellipse_angle_junk() {
let mut failures = vec![];
for (shape, key) in [("shape.rectangle", "rectangleAngle"), ("shape.ellipse", "ellipseAngle")] {
for xf in [
None,
Some(("object.scale", json!({"sx": 300, "sy": 20}))),
Some(("object.scale", json!({"sx": 1e-300, "sy": 100}))),
Some(("object.shear", json!({"angle": 40}))),
] {
for v in junk_values() {
let p = json!({ key: v });
let mut s = Fixture::Multi.session();
let Ok(_) = no_panic(s.execute(shape, &json!({"x": 60, "y": 60, "width": 80, "height": 50}))) else { continue };
if let Some((cmd, q)) = &xf {
let _ = no_panic(s.execute(cmd, q));
}
match catch_quiet(|| no_panic(s.execute("object.setLiveShape", &p))) {
Err(m) => failures.push(format!("PANIC object.setLiveShape {p} [{xf:?}]: {m}")),
Ok(_) => {
if let Err(e) = catch_quiet(|| check_all(&mut s)).unwrap_or_else(|m| Err(format!("panic in checks: {m}"))) {
failures.push(format!("object.setLiveShape {p} [{xf:?}]: {e}"));
}
}
}
}
}
}
assert!(failures.is_empty(), "{} failures:\n{}", failures.len(), failures.join("\n"));
}
/// A live line's Line Properties with junk values (the fixtures have no line), on a line, a line
/// whose ends meet and one at the coordinate limit: never a panic, and the document stays sound.
#[test]
+62
View File
@@ -118,6 +118,68 @@ fn each_arrow_style_draws_its_stroke_arrowhead_at_both_ends() {
}
}
/// `arrowHead` draws any built-in stroke arrowhead at both ends of the dimension line, and the
/// native file keeps it. The saved `arrowStyle` stays one of the four values versions without
/// `arrowHead` read, and a dimension saved without `arrowHead` draws its arrow style. Options
/// without a stroke head are saved without `arrowHead`. A custom arrowhead, an unknown name and an
/// overlong name are refused.
#[test]
fn every_stroke_arrowhead_draws_as_a_dimension_arrowhead() {
use vectorcraft_doc::{Arrowhead, dimension::ArrowStyle};
let ends = |s: &Session, id: u64| -> Vec<_> {
let n = s.doc().unwrap().doc.node(NodeId(id)).unwrap();
let children = n.children().unwrap();
let strokes = children.iter().filter_map(|n| n.appearance.stroke().map(|s| (s.start_arrow.clone(), s.end_arrow.clone())));
strokes.filter(|(a, b)| a.is_some() || b.is_some()).collect()
};
let mut s = session();
let mut made = vec![];
for head in Arrowhead::ALL {
let name = serde_json::to_value(&head).unwrap();
let id = run(&mut s, "dimension.create", json!({"a":[0,0],"b":[72,0],"options":{"arrowHead":name}}))["id"].as_u64().unwrap();
let drawn = ends(&s, id);
assert!(!drawn.is_empty() && drawn.iter().all(|h| *h == (Some(head.clone()), Some(head.clone()))), "{name}: {drawn:?}");
let saved = serde_json::to_value(&recipe(&s, id).options).unwrap();
assert_eq!((&saved["arrowStyle"], &saved["arrowHead"]), (&json!("filled"), &name));
made.push((id, head));
}
let bytes = vectorcraft_format::save(&s.doc().unwrap().doc, false);
let mut reopened = Session::new();
reopened.add_document(vectorcraft_format::load(&bytes).unwrap(), None);
for (id, head) in made {
assert_eq!(recipe(&reopened, id).options.arrowhead(), Some(head));
}
// A dimension saved before `arrowHead` existed.
let id = run(&mut s, "dimension.create", json!({"a":[0,0],"b":[72,0],"options":{"arrowStyle":"open"}}))["id"].as_u64().unwrap();
let mut file: Value = serde_json::from_slice(&vectorcraft_format::save(&s.doc().unwrap().doc, false)).unwrap();
fn drop_head(v: &mut Value) {
match v {
Value::Object(m) => {
m.remove("arrowHead");
m.values_mut().for_each(drop_head);
}
Value::Array(a) => a.iter_mut().for_each(drop_head),
_ => {}
}
}
drop_head(&mut file);
let mut older = Session::new();
older.add_document(vectorcraft_format::load(&serde_json::to_vec(&file).unwrap()).unwrap(), None);
let o = recipe(&older, id).options;
assert_eq!((o.arrow_style, o.arrow_head.clone(), o.arrowhead()), (ArrowStyle::Open, None, Some(Arrowhead::TriangleOpen)));
// Without a stroke head, the saved and recorded options carry no `arrowHead`, and a null one
// is still taken.
let saved = serde_json::to_value(&recipe(&s, id).options).unwrap();
assert!(saved.get("arrowHead").is_none(), "{saved}");
assert!(s.execute("dimension.create", &json!({"a":[0,0],"b":[72,0],"options":{"arrowHead":null}})).is_ok());
let custom = json!({"Custom":{"name":"Dot","path":{"subpaths":[]}}});
for bad in [json!("Custom"), json!("Arrowhead"), json!("barbed"), json!(3), json!("Barbed".repeat(20)), custom] {
let p = json!({"a":[0,0],"b":[72,0],"options":{"arrowHead":bad}});
assert!(s.execute("dimension.create", &p).is_err(), "{bad}");
}
assert!(s.execute("dimension.create", &json!({"a":[0,0],"b":[72,0],"options":{"arrowStyle":"Barbed"}})).is_err());
}
#[test]
fn dimension_angles_circles_arcs_and_curves() {
let mut s = session();
+27 -1
View File
@@ -2,7 +2,7 @@
//! reader reads back.
use vectorcraft_color::{
Color, Freeform, FreeformPoint, Gradient, GradientGeom, GradientKind, GradientPaint, GradientSpread, GradientStop, Paint, Swatch,
Color, Freeform, FreeformPoint, Gradient, GradientGeom, GradientKind, GradientMethod, GradientPaint, GradientSpread, GradientStop, Paint, Swatch,
};
use vectorcraft_doc::{Appearance, CharStyle, Document, Node, NodeId, NodeKind, StrokeGradientMode, TextObject};
use vectorcraft_geom::{Affine, Point, Rect, Vec2, shapes};
@@ -311,6 +311,32 @@ fn an_overprinting_diamond_gradient_without_a_frame_keeps_the_ink_below_on_a_pos
assert_keeps_the_ink_below(&cases);
}
#[test]
fn an_overprinting_gradient_with_stops_written_between_its_stops_keeps_the_ink_below_on_a_postscript_plate() {
// None of the cyan from 0.3 to 0.6: the stops written between those two stops (along a
// Perceptual or hue mix, or at a Classic gradient's off-centre midpoint) are paper white too.
let (inked, none) = (Color::cmyk(0.6, 0.3, 0.0, 0.0), Color::cmyk(0.0, 0.3, 0.0, 0.0));
let stops = [(0.0, inked), (0.3, none), (0.6, none), (1.0, inked)];
let c = Point::new(100.0, 50.0);
let around = GradientGeom { start: c, end: c + Vec2::new(70.0, -20.0), aspect: 0.7, focal: None };
let across = GradientGeom { start: Point::new(30.0, 40.0), end: Point::new(170.0, 60.0), aspect: 1.0, focal: None };
let cyan = Paint::solid(Color::cmyk(1.0, 0.0, 0.0, 0.0));
let shapes = [(GradientKind::Linear, across, "linear"), (GradientKind::Radial, around, "radial"), (GradientKind::Diamond, around, "diamond")];
let mut cases = vec![];
for method in [GradientMethod::Classic, GradientMethod::Perceptual, GradientMethod::HueClockwise, GradientMethod::HueCounterclockwise] {
for (kind, geom, shape) in shapes {
let mut fill = gradient(kind, &stops, geom, GradientSpread::Pad);
if let Paint::Gradient(g) = &mut fill {
g.gradient.method = method;
g.gradient.stops[1].midpoint = 0.3;
}
cases.push((format!("{shape}, {}", method.label()), overprinting(fill, Paint::None), cyan.clone(), "Cyan"));
}
}
let cases: Vec<_> = cases.iter().map(|(name, art, under, ink)| (name.as_str(), art.clone(), under.clone(), *ink)).collect();
assert_keeps_the_ink_below(&cases);
}
/// [`keeps_the_ink_below`] for each of `cases` (a name, the art, the paint under it and the ink
/// of the plate) at Level 3 and Level 2, with every case that fails named.
fn assert_keeps_the_ink_below(cases: &[(&str, Node, Paint, &str)]) {
+9
View File
@@ -29,6 +29,10 @@ impl Default for Headless {
}
}
/// Desktop UI commands that the app refuses for every control and MCP request, because each one
/// opens another app (`refuse_automation` in `vectorcraft-ui-egui`). `--connect` does not run them.
const KEYBOARD_ONLY: &[&str] = &["attributes.openUrl", "file.export.svg.browser", "file.saveForWeb.browser", "file.showPackage"];
/// Commands the desktop app adds on top of the engine; the headless backend implements them too so
/// `run_command` behaves the same in both modes.
const HOST_COMMANDS: &[(&str, &str, &str)] = &[
@@ -157,6 +161,11 @@ impl Headless {
None if vectorcraft_engine::find_command(id).is_some() => {
self.session.check_params(id, params).map_err(|e| e.to_string())?;
}
None if KEYBOARD_ONLY.contains(&id) => {
return Err(format!(
"`{id}` opens another app: only the person at the keyboard can run it in the desktop app; control and MCP requests are refused, `--connect` included"
));
}
None if crate::ui_catalog::UI_COMMANDS.iter().any(|(cid, ..)| *cid == id) => {
return Err(format!(
"`{id}` is a desktop UI command (`ui: true`); start `vectorcraft --control 7979` and use `vectorcraft-cli mcp --connect`"
+17
View File
@@ -338,6 +338,23 @@ fn headless_command_list_includes_ui_commands() {
assert!(text_of(&r).contains("--connect"), "{r}");
}
/// Desktop commands that the app refuses for every automated request are not offered through
/// `--connect`: the headless error says only the person at the keyboard can run them.
#[test]
fn headless_does_not_send_keyboard_only_commands_to_connect() {
let mut s = server();
rpc(&mut s, 1, "initialize", json!({"protocolVersion": PROTOCOL_VERSION}));
s.handle_line(r#"{"jsonrpc":"2.0","method":"notifications/initialized"}"#);
for (n, id) in ["attributes.openUrl", "file.export.svg.browser", "file.saveForWeb.browser", "file.showPackage"].iter().enumerate() {
assert!(crate::ui_catalog::UI_COMMANDS.iter().any(|(cid, ..)| cid == id), "{id} is not a desktop UI command");
let r = call(&mut s, 10 + n as u64, "command_run", json!({"id": id, "params": {}}));
assert_eq!(r["isError"], true, "{id}: {r}");
let text = text_of(&r);
assert!(text.contains("only the person at the keyboard"), "{id}: {r}");
assert!(!text.contains("start `vectorcraft --control"), "{id}: {r}");
}
}
// ---------- headless end-to-end ----------
#[test]
+7 -1
View File
@@ -837,7 +837,7 @@ pub const UI_COMMANDS: &[(&str, &str, &str, &str)] = &[
"retype.find",
"Find Matching Fonts",
"",
"{more?: bool} show the Retype panel and list the fonts whose glyphs match the selected outlined text, compared and ranked as type.retypeFonts does (up to 96 loaded fonts, those of the document's live type first): ten, as Find Matching Fonts does, or with more: true the next five fonts the last search found (whatever is selected now; before any search, a first search), as Find more font matches does; the document does not change; a search with no path or compound path selected, or a more that is not true or false, is an error and leaves the list as it was; returns what retype.list returns",
"{more?: bool} show the Retype panel and list the fonts whose glyphs match the selected outlined text, compared and ranked as type.retypeFonts does (up to 96 loaded fonts, those of the document's live type first): ten, as Find Matching Fonts does (more false, omitted or null: a new search), or with more: true the next five fonts the last search found (whatever is selected now; before any search, a first search), as Find more font matches does; the document does not change; a search with no path or compound path selected, or a more other than true, false or null, is an error and leaves the list as it was; returns what retype.list returns",
),
(
"retype.list",
@@ -1158,6 +1158,12 @@ pub const UI_COMMANDS: &[(&str, &str, &str, &str)] = &[
"",
"{} open Saturate for the selection (dialog `saturate`, fields `intensity` −100..100, `preview`): previews live, OK runs edit.colors.saturate as one undo step",
),
(
"ui.proofSetupDialog",
"Customize…",
"",
"{} open View › Proof Setup › Customize (dialog `proofSetup`, fields `device` (\"workingCmyk\", \"cmyk:<profile>\" or \"rgb:<profile>\": any CMYK or RGB profile), `preserveNumbers`, `intent` (used while preserveNumbers is off), `simulatePaper` and `simulateBlack` (CMYK devices only), `preview` (on): Preview shows the proof on the canvas, OK runs view.proofSetup with these and proof: true, Cancel puts the earlier proof view back; on the desktop only, Save… writes these to a picked proof setup file with view.proofSetup.save and Load… fills them from one with view.proofSetup.read, both starting in the Proof Setups folder (Load… once a save has made it), whose setups View › Proof Setup lists below Customize…)",
),
(
"ui.indexedColorDialog",
"Convert to Indexed Color…",
+58
View File
@@ -321,6 +321,64 @@ mod tests {
}
}
/// A proof that preserves the colors' numbers proofs an art brush's own colors, as it proofs
/// the document's: the brush's blue shows as the simulated device shows that color's numbers.
#[test]
fn a_proof_that_preserves_numbers_proofs_brush_art() {
use vectorcraft_brush::{ArtBrush, ArtScale, Brush, BrushKind, Colorization};
use vectorcraft_color::cms;
let mut d = doc_with_line(Some("Blue art"), 1.0);
let blue = Color::rgb(0.0, 0.0, 1.0);
let art =
Node::path(d.alloc_id(), shapes::rectangle(Rect::new(0.0, -10.0, 10.0, 10.0)), Appearance::basic(Paint::solid(blue), Paint::None, 0.0));
let brush = Brush {
name: "Blue art".into(),
kind: BrushKind::Art(ArtBrush { art, scale: ArtScale::Stretch, colorization: Colorization::None, ..Default::default() }),
};
vectorcraft_brush::store(&mut d, &[brush]);
let proof = cms::ProofSetup { target: cms::ProofTarget::Cmyk(cms::DEVICE_CMYK.into()), preserve_numbers: true, ..Default::default() };
let want = cms::active().proof_color(&blue, &proof).map(|v| (v * 255.0).round() as i32);
let opts = RenderOptions { proof: Some(proof), background: Some([255, 255, 255, 255]), ..Default::default() };
let mut r = Renderer::new();
for _ in 0..2 {
let px = r.render(&d, 200, 100, Affine::IDENTITY, &opts).pixel(100, 50);
assert!(want != [0, 0, 255], "{want:?}");
assert!(px.iter().zip(want).all(|(p, w)| (i32::from(*p) - w).abs() <= 2), "{px:?} vs {want:?}");
}
}
/// A proof that preserves the colors' numbers keeps the channels a CMYK document's filters run
/// on: an art brush's Color Halftone screens ink channels with the proof on, as with it off.
#[test]
fn a_proof_that_preserves_numbers_keeps_cmyk_filter_channels() {
use vectorcraft_brush::{ArtBrush, ArtScale, Brush, BrushKind, Colorization};
use vectorcraft_color::cms;
let mut d = doc_with_line(Some("Halftone art"), 40.0);
d.color_mode = vectorcraft_doc::ColorMode::Cmyk;
let grey = Color::cmyk(0.3, 0.3, 0.3, 0.2);
let mut art =
Node::path(d.alloc_id(), shapes::rectangle(Rect::new(0.0, -10.0, 10.0, 10.0)), Appearance::basic(Paint::solid(grey), Paint::None, 0.0));
art.appearance.effects =
vec![vectorcraft_doc::Effect { id: "pixelate.colorHalftone".into(), params: serde_json::json!({"maxRadius": 4}), visible: true }];
let brush = Brush {
name: "Halftone art".into(),
kind: BrushKind::Art(ArtBrush { art, scale: ArtScale::Stretch, colorization: Colorization::None, ..Default::default() }),
};
vectorcraft_brush::store(&mut d, &[brush]);
let shown = |proof: Option<cms::ProofSetup>| {
let opts = RenderOptions { proof, background: Some([255, 255, 255, 255]), ..Default::default() };
Renderer::new().render(&d, 200, 100, Affine::IDENTITY, &opts).pixels
};
let plain = shown(None);
assert!(plain.chunks(4).any(|p| p[..3] != [255, 255, 255]), "the brush draws");
// The working CMYK space proofed from its own numbers shows the colors as they are shown.
let proofed = shown(Some(cms::ProofSetup { target: cms::ProofTarget::WorkingCmyk, preserve_numbers: true, ..Default::default() }));
let differ = plain.chunks(4).zip(proofed.chunks(4)).filter(|(a, b)| a.iter().zip(b.iter()).any(|(x, y)| x.abs_diff(*y) > 8)).count();
assert!(differ * 100 < plain.len() / 4, "{differ} of {} pixels differ", plain.len() / 4);
}
/// Object opacity fades a brushed stroke's art as a whole, with or without a dash and a fill:
/// the same as the object at full opacity inside a group at that opacity.
#[test]
+1 -1
View File
@@ -124,7 +124,7 @@ impl Renderer {
let channels = match f.ink.base() {
Ink::Cmy => effects::pixel::Channels::CmyPlane,
Ink::K => effects::pixel::Channels::KPlane,
Ink::Display | Ink::RichBlack if f.doc.color_mode == vectorcraft_doc::ColorMode::Cmyk => effects::pixel::Channels::Cmyk,
Ink::Display | Ink::RichBlack | Ink::Proofed(_) if f.doc.color_mode == vectorcraft_doc::ColorMode::Cmyk => effects::pixel::Channels::Cmyk,
_ => effects::pixel::Channels::Rgb,
};
// What the content reads (as the raster kept for it found it, else found now), with the
+152 -9
View File
@@ -12,6 +12,9 @@
//! colours; RGB colours and placed images are separated into the working CMYK space first.
//!
//! RGB documents, and CMYK documents without transparency, draw screen colours ([`Ink::Display`]).
//! A proof that preserves the colors' numbers draws each screen colour as the proof shows it
//! ([`Ink::Proofed`]); a CMYK document that blends in CMYK keeps its ink planes, and [`compose`]
//! shows their inks through the proof.
use std::cell::RefCell;
use std::collections::HashMap;
@@ -44,6 +47,10 @@ pub(crate) enum Ink {
RichBlack,
/// Source-color adjustment before the display/ink conversion. Float bits keep cache keys exact.
Darkened(InkSpace, u32, bool),
/// Screen colours as a proof that preserves the colors' numbers shows them
/// ([`crate::proof::preserves`], [`Cms::proof_color`]): the proof [`proofed_ink`] registered
/// under this number, so the caches keep what each proof draws apart.
Proofed(u32),
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
@@ -52,6 +59,68 @@ pub(crate) enum InkSpace {
Cmy,
K,
RichBlack,
Proofed(u32),
}
/// What [`Ink::Proofed`] paints with: its number, the color settings and the proof setup.
type Proof = (u32, Arc<Cms>, vectorcraft_color::cms::ProofSetup, u64);
/// The proofs [`proofed_ink`] registered last, the newest last: a few, for renderers drawing with
/// different ones.
static PROOFS: Mutex<Vec<Arc<Proof>>> = Mutex::new(Vec::new());
/// The last number [`proofed_ink`] gave out.
static PROOF_NUMBER: std::sync::atomic::AtomicU32 = std::sync::atomic::AtomicU32::new(0);
thread_local! {
/// The proof [`Ink::rgb`] used last on this thread, so a frame does not look it up for each
/// color it paints.
static LAST_PROOF: RefCell<Option<Arc<Proof>>> = const { RefCell::new(None) };
}
/// Keeps the proof [`proofed_ink`] registered for a frame while the frame is drawn: a proof that
/// something holds stays registered.
pub(crate) struct ProofHold(#[allow(dead_code)] Arc<Proof>);
/// The ink a frame drawn with a proof that preserves the colors' numbers paints screen colours
/// with: the same [`Ink::Proofed`] number for the same proof setup, active color settings and
/// loaded profiles ([`cms::profiles_generation`]), and a new one when any of them changes. The
/// proof stays registered while the hold returned with it is kept.
pub(crate) fn proofed_ink(proof: &vectorcraft_color::cms::ProofSetup) -> (Ink, ProofHold) {
let (c, profiles) = (cms::active(), cms::profiles_generation());
let mut proofs = PROOFS.lock().unwrap_or_else(|e| e.into_inner());
if let Some(p) = proofs.iter().find(|p| Arc::ptr_eq(&p.1, &c) && p.2 == *proof && p.3 == profiles) {
return (Ink::Proofed(p.0), ProofHold(p.clone()));
}
let number = PROOF_NUMBER.fetch_add(1, Ordering::Relaxed).wrapping_add(1);
// Past a few, the oldest proof nothing holds (no frame, no thread's last proof) goes.
if proofs.len() >= 8
&& let Some(i) = proofs.iter().position(|p| Arc::strong_count(p) == 1)
{
proofs.remove(i);
}
let p = Arc::new((number, c, proof.clone(), profiles));
proofs.push(p.clone());
(Ink::Proofed(number), ProofHold(p))
}
/// The proof setup `ink` proofs with ([`Ink::Proofed`], darkened or not), while it is registered.
pub(crate) fn proof_of(ink: Ink) -> Option<vectorcraft_color::cms::ProofSetup> {
let Ink::Proofed(number) = ink.base() else { return None };
PROOFS.lock().unwrap_or_else(|e| e.into_inner()).iter().find(|p| p.0 == number).map(|p| p.2.clone())
}
/// Display sRGB of `c` as the proof [`proofed_ink`] registered under `number` shows it; a proof
/// no longer registered shows the colour as it is.
fn proofed_rgb(number: u32, c: &Color) -> [f32; 3] {
let proof = LAST_PROOF.with(|l| l.borrow().clone().filter(|p| p.0 == number)).or_else(|| {
let p = PROOFS.lock().unwrap_or_else(|e| e.into_inner()).iter().find(|p| p.0 == number).cloned();
LAST_PROOF.with(|l| l.borrow_mut().clone_from(&p));
p
});
match proof {
Some(p) => p.1.proof_color(c, &p.2),
None => c.to_rgb(),
}
}
impl Ink {
@@ -61,6 +130,7 @@ impl Ink {
Self::Darkened(InkSpace::Cmy, _, _) => Self::Cmy,
Self::Darkened(InkSpace::K, _, _) => Self::K,
Self::Darkened(InkSpace::RichBlack, _, _) => Self::RichBlack,
Self::Darkened(InkSpace::Proofed(n), _, _) => Self::Proofed(n),
other => other,
}
}
@@ -74,6 +144,11 @@ impl Ink {
}
}
/// Whether this ink adjusts the source colors first ([`Ink::Darkened`]).
pub(crate) fn is_darkened(self) -> bool {
matches!(self, Self::Darkened(..))
}
fn darkness(self) -> Option<f32> {
match self {
Self::Darkened(_, bits, _) => Some(f32::from_bits(bits)),
@@ -96,6 +171,7 @@ impl Ink {
Self::Cmy => InkSpace::Cmy,
Self::K => InkSpace::K,
Self::RichBlack => InkSpace::RichBlack,
Self::Proofed(n) => InkSpace::Proofed(n),
_ => InkSpace::Display,
};
Self::Darkened(space, amount.to_bits(), black)
@@ -151,6 +227,7 @@ impl Ink {
match (self, *c) {
(Ink::RichBlack, Color::Cmyk { c, m, y, k }) if is_pure_black([c, m, y, k]) => [0.0; 3],
(Ink::Display | Ink::RichBlack, _) => c.to_rgb(),
(Ink::Proofed(n), _) => proofed_rgb(n, c),
_ => self.plane(inks(c)),
}
}
@@ -178,7 +255,7 @@ impl Ink {
pub(crate) fn fixed8(self, [r, g, b, a]: [u8; 4]) -> [u8; 4] {
match self.base() {
Ink::Display | Ink::RichBlack => [r, g, b, a],
Ink::Display | Ink::RichBlack | Ink::Proofed(_) => [r, g, b, a],
_ => {
let lab = lab::srgb_to_lab([r, g, b].map(|v| v as f32 / 255.0));
let [r, g, b] = self.plane(inks(&Color::Lab { l: lab.l, a: lab.a, b: lab.b })).map(q);
@@ -319,6 +396,32 @@ fn cached<T>(slot: &Cached<T>, build: impl FnOnce(&Cms) -> T) -> (Arc<T>, u64) {
(t, g)
}
/// A table [`proofed_lut`] made, with the color settings, proof setup and profiles generation it
/// was made for.
type ProofedLut = (Arc<Cms>, vectorcraft_color::cms::ProofSetup, u64, Arc<InkLut>);
/// The tables [`proofed_lut`] made last, the newest last.
static PROOFED: Mutex<Vec<ProofedLut>> = Mutex::new(Vec::new());
/// Ink amounts → their display sRGB as `proof` shows a CMYK color of those inks
/// ([`Cms::proof_color`]), for the active color settings and loaded profiles. Cached.
fn proofed_lut(proof: &vectorcraft_color::cms::ProofSetup) -> Arc<InkLut> {
let (c, profiles) = (cms::active(), cms::profiles_generation());
let mut kept = PROOFED.lock().unwrap_or_else(|e| e.into_inner());
if let Some((.., t)) = kept.iter().find(|(o, p, g, _)| Arc::ptr_eq(o, &c) && p == proof && *g == profiles) {
return t.clone();
}
let t = Arc::new(InkLut(CmykLut::build(|[cy, m, y, k]| {
let [px, py, pz] = lab::srgb_to_xyz(c.proof_color(&Color::Cmyk { c: cy, m, y, k }, proof));
[px, py, pz, 0.0]
})));
if kept.len() >= KEPT_TABLES {
kept.remove(0);
}
kept.push((c, proof.clone(), profiles, t.clone()));
t
}
/// [`compose`] puts at least this many pixels in each band but the last.
const BAND_PIXELS: usize = 1 << 16;
@@ -331,12 +434,19 @@ const BAND_PIXELS: usize = 1 << 16;
/// each other band (this thread does when that one can't start). Returns the picture and the number
/// of threads that composed it.
pub(crate) fn compose(cmy: &[u8], k: &[u8], opts: &RenderOptions, threads: u16) -> (Vec<u8>, usize) {
let (lut, _) = cached(&DISPLAY, InkLut::build);
let bg = opts.background.map(|b| (Ink::Cmy.fixed8(b), Ink::K.fixed8(b), b));
// With a proof that preserves the numbers, the inks show as the proof's device shows them,
// and the background as it shows white paper.
let lut = match crate::proof::preserving(opts) {
Some(p) => proofed_lut(p),
None => cached(&DISPLAY, InkLut::build).0,
};
let bg = opts.background.map(|b| (Ink::Cmy.fixed8(b), Ink::K.fixed8(b), crate::proof::under_art(opts, b)));
let mut out = vec![0; cmy.len().min(k.len()) / 4 * 4];
let pixels = out.len() / 4;
let bands = (pixels / BAND_PIXELS).clamp(1, usize::from(threads).max(1));
let band = |o: &mut [u8], p: &[u8], q: &[u8]| compose_band(o, p, q, &lut, bg, opts.rich_black);
// A proof shows its device's black, not Appearance of Black's rich black.
let rich_black = opts.rich_black && crate::proof::preserving(opts).is_none();
let band = |o: &mut [u8], p: &[u8], q: &[u8]| compose_band(o, p, q, &lut, bg, rich_black);
if bands == 1 {
band(&mut out, cmy, k);
return (out, 1);
@@ -469,9 +579,9 @@ fn plane_key(key: &ImageKey, plane: Ink, generation: u64) -> ImageKey {
/// The key [`ink_image`] gives image pixels `key` painted with `ink`.
pub(crate) fn ink_key(key: &ImageKey, ink: Ink) -> ImageKey {
if ink.darkness().is_some() {
let generation = if matches!(ink.base(), Ink::Display | Ink::RichBlack) { 0 } else { separation().1 };
let generation = if matches!(ink.base(), Ink::Display | Ink::RichBlack | Ink::Proofed(_)) { 0 } else { separation().1 };
plane_key(key, ink, generation)
} else if matches!(ink, Ink::Display | Ink::RichBlack) {
} else if matches!(ink, Ink::Display | Ink::RichBlack | Ink::Proofed(_)) {
key.clone()
} else {
plane_key(key, ink, separation().1)
@@ -489,7 +599,7 @@ fn darkened_image(key: &ImageKey, pm: &Arc<Pixmap>, ink: Ink, amount: f32, blob:
return (want, p);
}
let base = ink.base();
let display = matches!(base, Ink::Display | Ink::RichBlack);
let display = matches!(base, Ink::Display | Ink::RichBlack | Ink::Proofed(_));
let raw_cmyk = key_inks(key, blob).filter(|i| (i.width, i.height) == (u32::from(pm.width()), u32::from(pm.height())));
let sep = (!display).then(separation);
let shown = (display && raw_cmyk.is_some()).then(display_lut);
@@ -499,7 +609,8 @@ fn darkened_image(key: &ImageKey, pm: &Arc<Pixmap>, ink: Ink, amount: f32, blob:
continue;
}
let rgb = if ink.black_endpoint() {
base.rgb(&Color::gray(1.0))
// Like the other pixels, a proofed black stays in display space; the plates proof it.
if display { Ink::Display } else { base }.rgb(&Color::gray(1.0))
} else if let Some(raw) = raw_cmyk.as_ref().and_then(|v| v.data.as_chunks::<4>().0.get(i)) {
let mut inks = raw.map(|v| f32::from(v) / 255.0);
inks[3] = (inks[3] + amount).min(1.0);
@@ -527,7 +638,7 @@ pub(crate) fn ink_image(key: &ImageKey, pm: &Arc<Pixmap>, ink: Ink, blob: Option
if let Some(amount) = ink.darkness() {
return darkened_image(key, pm, ink, amount, blob, touch);
}
if matches!(ink, Ink::Display | Ink::RichBlack) {
if matches!(ink, Ink::Display | Ink::RichBlack | Ink::Proofed(_)) {
return (key.clone(), pm.clone());
}
let (luts, generation) = separation();
@@ -601,6 +712,38 @@ mod tests {
assert_eq!(pm.data()[0].r, 204, "source pixels remain unchanged");
}
/// A fully darkened image drawn with a proof that preserves the colors' numbers shows black as
/// that proof shows it: proofed once, as its other darkened pixels are.
#[test]
fn a_proofed_black_endpoint_image_is_proofed_once() {
// Simulate Black Ink shows black as a gray, so a second proof would lighten it again.
let proof = cms::ProofSetup { target: cms::ProofTarget::WorkingCmyk, preserve_numbers: true, simulate_black: true, ..Default::default() };
let (ink, _hold) = proofed_ink(&proof);
let dark = ink.darkened(1.0);
assert!(dark.black_endpoint());
let key = ImageKey {
content: Arc::from("proofed-black-endpoint-regression"),
adjust: None,
grey: false,
tint: None,
ink: Ink::Display,
luts: (0, 0),
plates: 0,
mip: 0,
tile: None,
};
let pm = Arc::new(Pixmap::from_parts(vec![PremulRgba8 { r: 204, g: 102, b: 51, a: 255 }], 1, 1));
let (k, p) = ink_image(&key, &pm, dark, None, false);
let doc = Document::new(10.0, 10.0);
let Some(lut) = crate::proof::ink_plate_lut(dark, &doc) else { panic!("a preserving proof has plate tables") };
let (_, shown) = crate::proof::plate_image(&lut, &k, &p, None, false);
// A pixel darkened to black in display space, proofed once.
let want = cms::active().proof_srgb([0.0; 3], &proof).map(|v| (v * 255.0).round() as i32);
let px = shown.data()[0];
let got = [px.r, px.g, px.b].map(i32::from);
assert!(got.iter().zip(want).all(|(g, w)| (g - w).abs() <= 2), "{got:?} vs {want:?}");
}
#[test]
fn tables_of_two_color_settings_are_kept_side_by_side() {
// Two documents drawn in turn through their own settings each keep their tables.
+4 -1
View File
@@ -191,6 +191,9 @@ fn rasterize(
let symbols = doc.symbol_boxes().quick();
r.stamp += 1;
let px_rect = Rect::new(0.0, 0.0, w as f64, h as f64);
// A tile drawn for a proof that preserves the colors' numbers shows its images through that
// proof too.
let plates = crate::proof::ink_plate_lut(ink, doc);
for o in def.offsets_covering(region) {
let v = view * def.instance_xf(o);
let frame = Frame {
@@ -203,7 +206,7 @@ fn rasterize(
opts: &opts,
ink,
output: v,
plates: None,
plates: plates.as_deref(),
};
for a in &def.art {
r.draw_arc(&mut ctx, &frame, a);
+67 -9
View File
@@ -2,6 +2,9 @@
//!
//! * **Proof Colors** post-processes the rendered frame: every pixel goes display sRGB → proof
//! space (CMYK press or RGB/colour-blindness simulation) → display, through a cached 17³ LUT.
//! With Preserve CMYK or RGB Numbers ([`preserves`]) each color is proofed from its own numbers
//! as it is painted instead ([`crate::ink::Ink::Proofed`]), and placed images from their own
//! inks or pixels ([`plate_image`]).
//! * **Separations Preview** recolours the *document* before rendering: each paint colour is split
//! into process inks (colour-managed), or a spot ink at the colour's tint when it's linked to a
//! spot swatch (solid colours and gradient stops alike), with the process plates a gradient stop
@@ -45,6 +48,21 @@ pub(crate) fn overprints(opts: &RenderOptions) -> bool {
opts.overprint_preview || opts.proof.as_ref().is_some_and(|p| p.separations.is_some())
}
/// Whether Proof Colors sends the colors' own numbers to the device it simulates (Preserve CMYK
/// or RGB Numbers on a CMYK or RGB device, outside Separations Preview): each color is proofed as
/// it is painted ([`crate::ink::Ink::Proofed`]) and placed images from their own inks or pixels
/// ([`plate_image`]), and the drawn frame is not proofed again ([`post`]).
pub(crate) fn preserves(proof: &ProofSetup) -> bool {
proof.preserve_numbers
&& proof.separations.is_none()
&& matches!(proof.target, ProofTarget::WorkingCmyk | ProofTarget::Cmyk(_) | ProofTarget::Rgb(_))
}
/// The proof of [`RenderOptions::proof`] when it [`preserves`] the colors' numbers.
pub(crate) fn preserving(opts: &RenderOptions) -> Option<&ProofSetup> {
opts.proof.as_ref().filter(|p| preserves(p))
}
/// What the `visible` plates print of `ink`, as display sRGB, without the spot inks over several
/// plates: with one plate visible its ink as a grey (black = 100%), else the visible process inks
/// through the proof profile.
@@ -141,10 +159,26 @@ pub(crate) struct PlateLut {
}
impl PlateLut {
/// What the visible plates show of process inks `cmyk`, as display sRGB.
/// What the visible plates show of process inks `cmyk`, as display sRGB; with Preserve
/// Numbers outside Separations Preview, the inks as the proof's device shows them.
fn shown(&self, cmyk: [f32; 4]) -> [f32; 3] {
let visible = self.proof.separations.as_deref().unwrap_or_default();
plate_rgb(&self.cms, &self.proof, visible, &Inks { cmyk, spot: None, registration: false })
match self.proof.separations.as_deref() {
Some(visible) => plate_rgb(&self.cms, &self.proof, visible, &Inks { cmyk, spot: None, registration: false }),
None => {
let [c, m, y, k] = cmyk;
self.cms.proof_color(&Color::Cmyk { c, m, y, k }, &self.proof)
}
}
}
/// What display pixel `rgb` shows as: its inks separated with the proof's intent through the
/// visible plates, or with Preserve Numbers outside Separations Preview, its numbers as the
/// proof's device shows them.
fn shown_rgb(&self, rgb: [f32; 3]) -> [f32; 3] {
match self.proof.separations {
Some(_) => self.shown(self.cms.srgb_to_cmyk(rgb, self.proof.intent)),
None => self.cms.proof_srgb(rgb, &self.proof),
}
}
}
@@ -154,10 +188,19 @@ static PLATE_LUTS: Mutex<Vec<Arc<PlateLut>>> = Mutex::new(Vec::new());
/// The last [`PlateLut::generation`] handed out.
static PLATE_GENERATION: AtomicU64 = AtomicU64::new(0);
/// The tables the placed images of `doc` show through in art drawn with `ink` apart from a frame's
/// options (a pattern's tiles): with a proof that preserves the colors' numbers
/// ([`crate::ink::Ink::Proofed`]), that proof's ([`plate_lut`]); else `None`.
pub(crate) fn ink_plate_lut(ink: crate::ink::Ink, doc: &Document) -> Option<Arc<PlateLut>> {
let proof = crate::ink::proof_of(ink)?;
plate_lut(&RenderOptions { proof: Some(proof), ..Default::default() }, doc)
}
/// The tables the placed images of `doc` show Separations Preview's visible plates through with
/// `opts`, or `None` when it is off.
/// `opts`, or their colors as a proof that [`preserves`] the numbers shows them; `None` when
/// neither is on.
pub(crate) fn plate_lut(opts: &RenderOptions, doc: &Document) -> Option<Arc<PlateLut>> {
let proof = opts.proof.as_ref().filter(|p| p.separations.is_some())?;
let proof = opts.proof.as_ref().filter(|p| p.separations.is_some() || preserves(p))?;
let (c, profiles) = (cms::active(), cms::profiles_generation());
// The spot ones are the spot plates of `vectorcraft_doc::inks::plates`; their colors are part
// of the tables' identity, so a swatch edit shows.
@@ -191,12 +234,17 @@ pub(crate) fn plate_image(lut: &PlateLut, key: &ImageKey, pm: &Pixmap, blob: Opt
return (want, p);
}
// An image placed from a DCS file shows its own plates, spot plates included.
if let Some(s) = blob.filter(|b| crate::ink::shows_own_inks(key) && b.is_separated()).and_then(ImageBlob::separated) {
if let Some(s) =
blob.filter(|b| lut.proof.separations.is_some() && crate::ink::shows_own_inks(key) && b.is_separated()).and_then(ImageBlob::separated)
{
let out = images::store().insert(want.clone(), Arc::new(plates_shown(lut, &s, pm)));
return (want, out);
}
let size = (u32::from(pm.width()), u32::from(pm.height()));
let raw = crate::ink::key_inks(key, blob).filter(|i| (i.width, i.height) == size);
// A proof that preserves the numbers shows darkened pixels (a shadow's) as they are drawn,
// not the image's own inks.
let darkened = lut.proof.separations.is_none() && key.ink.is_darkened();
let raw = crate::ink::key_inks(key, blob).filter(|i| !darkened && (i.width, i.height) == size);
let mut out = pm.clone();
match raw {
Some(inks) => {
@@ -213,7 +261,7 @@ pub(crate) fn plate_image(lut: &PlateLut, key: &ImageKey, pm: &Pixmap, blob: Opt
}
}
None => {
let t = lut.rgb.get_or_init(|| ProofLut::build(|rgb| lut.shown(lut.cms.srgb_to_cmyk(rgb, lut.proof.intent))));
let t = lut.rgb.get_or_init(|| ProofLut::build(|rgb| lut.shown_rgb(rgb)));
for px in out.data_mut().iter_mut().filter(|p| p.a > 0) {
let a = f32::from(px.a);
let un = |v: u8| (f32::from(v) / a).min(1.0);
@@ -500,7 +548,7 @@ fn prepare_node(n: &Arc<Node>, earlier: Option<(&Arc<Node>, &Arc<Node>)>, how: &
/// Soft-proof the rendered (premultiplied RGBA8) pixels in place.
pub(crate) fn post(pixels: &mut [u8], opts: &RenderOptions) {
let Some(proof) = opts.proof.as_ref() else { return };
if proof.separations.is_some() || matches!(proof.target, ProofTarget::MonitorRgb | ProofTarget::Srgb) {
if proof.separations.is_some() || preserves(proof) || matches!(proof.target, ProofTarget::MonitorRgb | ProofTarget::Srgb) {
return;
}
let lut = cms::active().proof_lut(proof);
@@ -525,6 +573,16 @@ pub(crate) fn post(pixels: &mut [u8], opts: &RenderOptions) {
}
}
/// Solid color `[r, g, b, a]` (straight alpha) under the art of a frame drawn with `opts`: with a
/// proof that [`preserves`] the numbers, whose art [`prepare`] proofs before drawing, as the
/// proof's device shows it (white paper takes Simulate Paper Color's tint), so the art's
/// transparency and edges mix with it as they print; else as it is.
pub(crate) fn under_art(opts: &RenderOptions, [r, g, b, a]: [u8; 4]) -> [u8; 4] {
let Some(proof) = preserving(opts) else { return [r, g, b, a] };
let [r, g, b] = cms::active().proof_srgb([r, g, b].map(|v| f32::from(v) / 255.0), proof).map(|v| (v.clamp(0.0, 1.0) * 255.0).round() as u8);
[r, g, b, a]
}
/// View-level proof state (View → Proof Setup / Proof Colors / Overprint Preview, Separations
/// Preview panel). Process-wide: the app has one proof state for all windows.
#[derive(Clone, Debug, Default, PartialEq)]
+33 -7
View File
@@ -149,7 +149,16 @@ impl Renderer {
let inv = view.inverse();
let visible = inv.transform_rect_bbox(Rect::new(0.0, 0.0, w as f64, h as f64));
let px = 1.0 / view.determinant().abs().sqrt().max(1e-12);
let screen = if opts.rich_black { Ink::RichBlack } else { Ink::Display };
// A proof that preserves the colors' numbers proofs each colour as it is painted; the hold
// keeps that proof registered until the frame is drawn.
let (screen, _proof) = match proof::preserving(opts) {
Some(p) => {
let (ink, hold) = ink::proofed_ink(p);
(ink, Some(hold))
}
None if opts.rich_black => (Ink::RichBlack, None),
None => (Ink::Display, None),
};
let symbols = doc.symbol_boxes().quick();
let output = Affine::scale(1.0 / f64::from(cell.max(1))) * view;
let plates = proof::plate_lut(opts, doc);
@@ -169,10 +178,13 @@ impl Renderer {
return Rendered { width: w as u32, height: h as u32, pixels };
}
let mut pixels = if inks || self.blends_in_cmyk(doc, opts) {
// Blending in CMYK: one frame per ink plane, then their inks shown on screen.
let cmy = self.draw_frame(&Frame { ink: Ink::Cmy, ..frame }, w, h);
// Blending in CMYK: one frame per ink plane, then their inks shown on screen (through a
// proof that preserves the numbers, when one is on: the planes hold the inks as they
// are, images included).
let planes = if proof::preserving(opts).is_some() { None } else { frame.plates };
let cmy = self.draw_frame(&Frame { ink: Ink::Cmy, plates: planes, ..frame }, w, h);
let stats = self.stats;
let k = self.draw_frame(&Frame { ink: Ink::K, ..frame }, w, h);
let k = self.draw_frame(&Frame { ink: Ink::K, plates: planes, ..frame }, w, h);
self.stats = stats;
if inks {
ink::amounts(&cmy, &k)
@@ -268,9 +280,16 @@ impl Renderer {
ctx.set_aliasing_threshold(opts.anti_alias.threshold());
self.raster = raster_settings(opts);
if opts.artboards && !opts.outline {
// Paper: white on screen, no ink on the ink planes.
// Paper: white on screen, no ink on the ink planes; with a proof that preserves the
// colors' numbers, the device's paper.
ctx.set_transform(f.view);
ctx.set_paint(peniko::Color::WHITE);
match screen_under_art(f, [255; 4]) {
[255, 255, 255, _] => ctx.set_paint(peniko::Color::WHITE),
paper => {
let [r, g, b, a] = f.ink.fixed8(paper);
ctx.set_paint(peniko::Color::from_rgba8(r, g, b, a));
}
}
for ab in &f.doc.artboards {
ctx.fill_rect(&ab.rect);
}
@@ -295,7 +314,7 @@ impl Renderer {
}
let mut pixels = pm.data_as_u8_slice().to_vec();
if let Some(bg) = opts.background {
over_background(&mut pixels, f.ink.fixed8(bg));
over_background(&mut pixels, f.ink.fixed8(screen_under_art(f, bg)));
}
pixels
}
@@ -465,6 +484,13 @@ fn raster_settings(opts: &RenderOptions) -> vello_cpu::RasterizerSettings {
vello_cpu::RasterizerSettings { render_mode, ..Default::default() }
}
/// Solid color `rgba` (straight alpha) under the art of frame `f`: on screen as
/// [`proof::under_art`] gives it; the ink planes paint it as it is, and [`ink::compose`] shows it
/// through the proof.
fn screen_under_art(f: &Frame, rgba: [u8; 4]) -> [u8; 4] {
if matches!(f.ink.base(), Ink::Cmy | Ink::K) { rgba } else { proof::under_art(f.opts, rgba) }
}
/// Premultiplied RGBA `pixels` drawn over the solid color `background` (`[r, g, b, a]`, straight).
pub(crate) fn over_background(pixels: &mut [u8], [r, g, b, a]: [u8; 4]) {
let alpha = u32::from(a);
+5 -1
View File
@@ -308,7 +308,11 @@ impl Renderer {
let image_left_out = self.image_left_out.replace(false);
let failures = crate::paint::decode_failures();
let pattern_images_left_out = crate::pattern::images_left_out();
self.draw_kept_node(&mut mctx, &Frame { mt: false, ink: Ink::Display, ..*f }, &m.art);
// A proof that preserves the colors' numbers leaves the mask's images as they are, as it
// leaves its colors: the frame's, or the ink's in a pattern's tile drawn for that proof.
let preserving = crate::proof::preserving(f.opts).is_some() || crate::ink::proof_of(f.ink).is_some_and(|p| crate::proof::preserves(&p));
let plates = if preserving { None } else { f.plates };
self.draw_kept_node(&mut mctx, &Frame { mt: false, ink: Ink::Display, plates, ..*f }, &m.art);
let incomplete = self.image_left_out.unwrap_or(false)
|| crate::pattern::images_left_out() > pattern_images_left_out
|| (!f.opts.mark_undecoded_images && crate::paint::decode_failures() > failures);
+1 -1
View File
@@ -10,7 +10,7 @@ workspace = true
[dependencies]
# The shared font catalog from craft-libs main (it has the outline, bidi and caret helpers used here).
craft-font-catalog = { git = "https://github.com/storytold/craft-libs", rev = "23acc704933a9a5619a5cd1cddc9bb1fb5a9b2d3", default-features = false }
craft-font-catalog = { git = "https://github.com/storytold/craft-libs", rev = "50b0ee7bf811e363b5f238382b5c77318cf33e46", default-features = false }
vectorcraft-geom = { workspace = true }
vectorcraft-doc = { workspace = true }
kurbo = { workspace = true }
+12
View File
@@ -127,6 +127,18 @@ pub fn move_delta(from: Point, to: Point, shift: bool, base: f64) -> Vec2 {
if shift { vectorcraft_geom::constrain_angle_from(d, 45.0, base) } else { d }
}
/// How far to slide along the line of unit direction `u` to take away the offset `pull` on one
/// axis (a snap of a move Shift keeps to that line): on an axis the line runs along, the shorter
/// way of the two; 0 when it runs along neither.
pub(crate) fn slide_along(pull: Vec2, u: Vec2) -> f64 {
[(pull.x, u.x), (pull.y, u.y)]
.into_iter()
.filter(|(_, c)| c.abs() > 1e-9)
.map(|(p, c)| p / c)
.min_by(|a, b| a.abs().total_cmp(&b.abs()))
.unwrap_or(0.0)
}
#[cfg(test)]
mod tests {
use super::*;
+2 -11
View File
@@ -45,7 +45,7 @@ use vectorcraft_doc::hit::{Hit, HitKind, hit_test, marquee_in_view, objects_at,
use vectorcraft_doc::{NodeId, OrientedBox};
use vectorcraft_geom::{Affine, Point, Rect, Vec2};
use crate::bbox::{Handle, hit_handle, in_rotate_zone, move_delta, rotate_for_drag, scale_for_drag};
use crate::bbox::{Handle, hit_handle, in_rotate_zone, move_delta, rotate_for_drag, scale_for_drag, slide_along};
use crate::blendwidget::{self, BlendWidgetDrag};
use crate::corners::{self, CornerDrag, over_widget};
use crate::guides::{PointSnap, Targets, distance_guides, hold_on_path};
@@ -397,16 +397,7 @@ impl MoveSnap {
return (d, vec![]);
}
let u = d / len;
// The way along the line that takes away the offset `pull` on one axis: on the axis the
// line runs along, the shorter way of the two.
let along = |pull: Vec2| {
[(pull.x, u.x), (pull.y, u.y)]
.into_iter()
.filter(|(_, c)| c.abs() > 1e-9)
.map(|(p, c)| p / c)
.min_by(|a, b| a.abs().total_cmp(&b.abs()))
.unwrap_or(0.0)
};
let along = |pull: Vec2| slide_along(pull, u);
let (targets, points) = if copy { (&self.copy_targets, &self.copy_points) } else { (&self.targets, &self.points) };
if let Some(ov) = targets.as_ref().and_then(|t| t.snap_back(self.bounds, d, cx.snap_tol())) {
return (Vec2::ZERO, ov);
+43 -3
View File
@@ -9,7 +9,8 @@
//! all of them (#1139). Shift-drag inside an artboard draws a new artboard there, and Shift-drag on
//! the pasteboard is a marquee: the artboards it touches leave the selection or join it. Drag inside
//! moves it (with its artwork when the `moveArt` option is on; Alt moves a copy and
//! leaves the artboard where it was), drag a handle resizes it
//! leaves the artboard where it was; Shift held once the drag is under way keeps the move or copy
//! to the level, upright or 45° line, counted from General › Constrain Angle), drag a handle resizes it
//! (Shift proportional, Alt from centre; with the `scaleArt` option on, Scale Artwork with Artboard,
//! always proportional, and the art fully inside scales with it), drag on the pasteboard draws a new artboard, Delete removes
//! the active one (Copy, Cut and Paste take it with its art: `artboard.copy`), the arrow keys move the
@@ -36,7 +37,7 @@ use vectorcraft_doc::ArtboardSide;
use vectorcraft_geom::{Affine, Point, Rect, Vec2};
use super::{BLUE, polygon, rect_corners};
use crate::bbox::{Handle, hit_handle, scale_for_drag};
use crate::bbox::{Handle, hit_handle, move_delta, scale_for_drag, slide_along};
use crate::guides::{DrawSnap, Leave, Targets};
use crate::{Action, Cursor, Mods, Overlay, PixelOp, PointerEvent, PointerKind, Tool, ToolContext, ToolKey};
@@ -247,6 +248,36 @@ impl ArtboardTool {
d + adj
}
/// [`Self::snap_move`] for a move Shift keeps to its line (through the press, along `d`):
/// every snap slides the move along that line. Whole pixels and the grid slide it by the
/// shorter of the ways that put its top-left on a whole pixel or a gridline on either axis
/// ([`slide_along`]); Smart Guides slide it until an edge or the centre lines up
/// ([`Targets::snap_rects_along`]). A move of zero length does not snap.
fn snap_move_along(&mut self, cx: &ToolContext, rect: Rect, d: Vec2, copy: bool) -> Vec2 {
self.guides.clear();
let len = d.hypot();
if !len.is_finite() || len <= 1e-9 {
return d;
}
let u = d / len;
let tl = Point::new(rect.x0, rect.y0) + d;
if cx.snaps_to_pixel(PixelOp::Moving) {
return d + u * slide_along(Vec2::new(tl.x.round() - tl.x, tl.y.round() - tl.y), u);
}
if cx.snap_to_grid {
return d + u * slide_along(vectorcraft_geom::snap::snap_point_to_grid(tl, cx.grid_step()) - tl, u);
}
let Some(t) = (if copy { &self.copy_targets } else { &self.targets }) else { return d };
let moved = rect + d;
let (adj, ov) = if cx.doc.setup.has_bleed() {
t.snap_rects_along(&[moved, cx.doc.setup.bleed_rect(moved)], u, cx.snap_tol())
} else {
t.snap_rects_along(&[moved], u, cx.snap_tol())
};
self.guides = ov;
d + adj
}
fn end_drag(&mut self) {
self.drag = None;
self.click_art = None;
@@ -433,7 +464,11 @@ impl Tool for ArtboardTool {
out.push(Action::Begin(label(m.alt).into()));
}
self.drag = Some(Drag::Move { index, many, start, rect, began: true, copy: m.alt });
let d = self.snap_move(cx, rect, p - start, m.alt);
// Shift held once the drag is under way keeps the move (or copy) to the level,
// upright or 45° line, as a Selection tool move does (#8580); a Shift-press draws
// or selects instead.
let d = move_delta(start, p, m.shift, cx.constrain_angle);
let d = if m.shift { self.snap_move_along(cx, rect, d, m.alt) } else { self.snap_move(cx, rect, d, m.alt) };
self.preview = Some(rect + d);
let mut v = json!({ "index": index, "dx": d.x, "dy": d.y, "moveArt": self.move_art, "copy": m.alt });
if many {
@@ -679,6 +714,11 @@ impl Tool for ArtboardTool {
}
fn cursor(&self, cx: &ToolContext, p: Point, m: Mods) -> Cursor {
// A move under way keeps the move cursor wherever the pointer is: Shift may keep the
// artboard to a line the pointer leaves, and the document shows the moved artboard.
if matches!(self.drag, Some(Drag::Move { began: true, .. })) {
return Cursor::Move;
}
if self.edge_button_at(cx, p).is_some() {
return Cursor::Arrow;
}
+100 -6
View File
@@ -367,10 +367,20 @@ fn a_shift_drag_on_the_pasteboard_selects_the_artboards_it_touches() {
assert_eq!(t.options()["selected"], json!([1, 2]));
}
/// A drag begun without Shift still moves the artboard, and on the pasteboard still draws one;
/// Shift pressed during either no longer keeps the move at 45° or the new artboard square.
/// The `(dx, dy)` of an `artboard.move` preview.
fn moved_by(v: &Value) -> (f64, f64) {
(v["dx"].as_f64().unwrap(), v["dy"].as_f64().unwrap())
}
fn near(a: (f64, f64), b: (f64, f64)) -> bool {
(a.0 - b.0).abs() < 1e-9 && (a.1 - b.1).abs() < 1e-9
}
/// Shift held once a move is under way keeps it to the level, upright or 45° line, at the length
/// dragged (#8580); without Shift it follows the pointer again. (A Shift-press draws or
/// selects rather than moving: `a_shift_drag_inside_an_artboard_draws_a_new_one`.)
#[test]
fn a_plain_drag_still_moves_and_shift_no_longer_constrains_it() {
fn shift_held_during_a_move_keeps_it_to_its_line() {
let d = two_boards();
let (s, p) = (Selection::default(), paint());
let mut c = cx(&d, &s, &p);
@@ -378,15 +388,99 @@ fn a_plain_drag_still_moves_and_shift_no_longer_constrains_it() {
let shift = Mods { shift: true, ..Default::default() };
let mut t = ArtboardTool::default();
t.pointer(&c, &ev(PointerKind::Down, 700.0, 100.0));
let v = preview_params(&t.pointer(&c, &ev(PointerKind::Drag, 730.0, 110.0).with_mods(shift)));
assert_eq!((v["index"].as_u64(), v["dx"].as_f64(), v["dy"].as_f64()), (Some(1), Some(30.0), Some(10.0)));
assert_eq!(t.pointer(&c, &ev(PointerKind::Up, 730.0, 110.0).with_mods(shift)), vec![Action::Commit]);
let mut drag = |dx: f64, dy: f64, m: Mods| moved_by(&preview_params(&t.pointer(&c, &ev(PointerKind::Drag, 700.0 + dx, 100.0 + dy).with_mods(m))));
assert!(near(drag(30.0, 10.0, shift), (1000f64.sqrt(), 0.0)), "level");
assert!(near(drag(12.0, 40.0, shift), (0.0, 1744f64.sqrt())), "upright");
let (dx, dy) = drag(30.0, 28.0, shift);
assert!(dx > 0.0 && (dx - dy).abs() < 1e-9, "45°: {dx} {dy}");
// Shift released: the move follows the pointer.
assert_eq!(drag(30.0, 10.0, Mods::default()), (30.0, 10.0));
assert_eq!(t.pointer(&c, &ev(PointerKind::Up, 730.0, 110.0)), vec![Action::Commit]);
// A new artboard drawn on the pasteboard isn't kept square by Shift held during the drag.
t.pointer(&c, &ev(PointerKind::Down, 1000.0, 1000.0));
t.pointer(&c, &ev(PointerKind::Drag, 1100.0, 1050.0).with_mods(shift));
let a = t.pointer(&c, &ev(PointerKind::Up, 1100.0, 1050.0).with_mods(shift));
assert_eq!(a, create_artboard(Rect::new(1000.0, 1000.0, 1100.0, 1050.0)));
}
/// An Alt-drag copy keeps to its line with Shift too, and the line turns with General › Constrain
/// Angle.
#[test]
fn shift_keeps_an_alt_drag_copy_to_its_line_from_the_constrain_angle() {
let d = two_boards();
let (s, p) = (Selection::default(), paint());
let mut c = cx(&d, &s, &p);
c.smart_guides = false;
let alt = Mods { alt: true, ..Default::default() };
let both = Mods { alt: true, shift: true, ..Default::default() };
let mut t = ArtboardTool::default();
t.pointer(&c, &ev(PointerKind::Down, 700.0, 100.0).with_mods(alt));
let v = preview_params(&t.pointer(&c, &ev(PointerKind::Drag, 730.0, 110.0).with_mods(both)));
assert!(near(moved_by(&v), (1000f64.sqrt(), 0.0)) && v["copy"] == true, "{v}");
// Alt released and pressed again mid-drag: a constrained move, then a constrained copy again.
let a = t.pointer(&c, &ev(PointerKind::Drag, 730.0, 110.0).with_mods(Mods { shift: true, ..Default::default() }));
assert_eq!(a[..2], [Action::Cancel, Action::Begin("Move Artboard".into())]);
let v = preview_params(&a);
assert!(near(moved_by(&v), (1000f64.sqrt(), 0.0)) && v["copy"] == false, "{v}");
let a = t.pointer(&c, &ev(PointerKind::Drag, 730.0, 110.0).with_mods(both));
assert_eq!(a[..2], [Action::Cancel, Action::Begin("Duplicate Artboard".into())]);
assert!(near(moved_by(&preview_params(&a)), (1000f64.sqrt(), 0.0)));
t.pointer(&c, &ev(PointerKind::Up, 730.0, 110.0).with_mods(both));
// Constrain Angle 30°: the lines run in 45° steps from 30° up the page (30° up, 15° down, …),
// and a drag 18.4° below level keeps to the one 15° below level (down the page is positive y).
c.constrain_angle = 30.0;
t.pointer(&c, &ev(PointerKind::Down, 700.0, 100.0));
let (dx, dy) =
moved_by(&preview_params(&t.pointer(&c, &ev(PointerKind::Drag, 730.0, 110.0).with_mods(Mods { shift: true, ..Default::default() }))));
assert!((dy.atan2(dx).to_degrees() - 15.0).abs() < 1e-9, "{dx} {dy}");
}
/// Snaps slide a move Shift keeps to its line along that line: Smart Guides, the grid and whole
/// pixels never take it off the line.
#[test]
fn snaps_keep_a_shift_move_on_its_line() {
let d = two_boards();
let (s, p) = (Selection::default(), paint());
let shift = Mods { shift: true, ..Default::default() };
let mut c = cx(&d, &s, &p);
let mut t = ArtboardTool::default();
let mut drag = |c: &ToolContext, dx: f64, dy: f64| {
t.pointer(c, &ev(PointerKind::Down, 700.0, 100.0));
let v = moved_by(&preview_params(&t.pointer(c, &ev(PointerKind::Drag, 700.0 + dx, 100.0 + dy).with_mods(shift))));
t.pointer(c, &ev(PointerKind::Up, 700.0 + dx, 100.0 + dy).with_mods(shift));
v
};
// Level, 101.5 pt left: the left edge, 1.5 pt past artboard 1's right edge (500), slides back
// onto it, and the move stays level.
assert!(near(drag(&c, -97.0, 30.0), (-100.0, 0.0)));
c.smart_guides = false;
c.snap_to_grid = true;
// Grid step 72 / 8 = 9: x 620.9 → 621, y stays 0 (not 9, where it would snap off the line).
assert!(near(drag(&c, 20.0, 6.0), (21.0, 0.0)));
c.snap_to_grid = false;
c.snap_to_pixel = true;
assert!(near(drag(&c, 10.0, 3.0), (10.0, 0.0)));
}
/// While Shift keeps a move to its line the cursor stays the move cursor, also where the pointer
/// has left the moved artboard; before a press, Shift shows the crosshair of a drag that draws or
/// selects.
#[test]
fn shift_during_a_move_keeps_the_move_cursor() {
let mut d = two_boards();
let (s, p) = (Selection::default(), paint());
let shift = Mods { shift: true, ..Default::default() };
let mut t = ArtboardTool::default();
let over = Point::new(1100.0, 250.0);
assert_eq!(t.cursor(&cx(&d, &s, &p), Point::new(700.0, 100.0), shift), Cursor::Crosshair);
t.pointer(&cx(&d, &s, &p), &ev(PointerKind::Down, 700.0, 100.0));
let (dx, dy) = moved_by(&preview_params(&t.pointer(&cx(&d, &s, &p), &ev(PointerKind::Drag, over.x, over.y).with_mods(shift))));
// The engine shows the preview: the level move leaves the pointer 50 pt below the artboard.
d.artboards[1].rect = d.artboards[1].rect + Vec2::new(dx, dy);
assert!(!d.artboards[1].rect.contains(over));
assert_eq!(t.cursor(&cx(&d, &s, &p), over, shift), Cursor::Move);
}
/// Escape during a marquee or while a new artboard is being drawn ends the gesture without
/// selecting or drawing anything and keeps the tool; the next Escape leaves it.
#[test]
+113 -5
View File
@@ -27,8 +27,12 @@
//! Brush Options' Key Color eyedropper sets `brushKeyColor` and `stop`: the next click samples into
//! the open dialog (`brushKeyColor` UI request) and switches back.
//!
//! Escape ends either pick without sampling and switches back to that tool. With neither pick
//! Escape ends an armed pick without sampling and switches back to that tool. With no pick
//! armed, Escape is left to the application.
//!
//! Image Trace's Ignore Color eyedropper passes its bound document point to the panel, which
//! samples the original image pixels and ends the pick only when a color is accepted. A miss
//! stays armed; this tool changes neither paint nor selection.
use std::collections::HashSet;
@@ -51,6 +55,8 @@ pub struct EyedropperTool {
text_selection: crate::text::TypeTool,
/// Brush Options › Key Color (Hue Shift): sample into the dialog, then [`Self::stop`].
brush_key_color: bool,
/// Image Trace > Ignore Color: the panel's opaque document/object/revision binding.
image_trace_ignore_color: Option<Value>,
/// The gradient mesh points the tool switched from had picked, each a mesh and a point index.
mesh_points: Vec<(NodeId, usize)>,
}
@@ -512,6 +518,11 @@ impl Tool for EyedropperTool {
if ev.kind != PointerKind::Down {
return vec![];
}
if let Some(binding) = &self.image_trace_ignore_color {
// The panel knows whether this hits an opaque source pixel. It clears the binding
// and restores the previous tool only after accepting a color, not on a miss.
return vec![Action::Dialog("imageTraceIgnoreColor".into(), json!({ "binding": binding, "point": [ev.pos.x, ev.pos.y] }))];
}
let opts = sample_options(cx);
if self.brush_key_color {
let Some(c) = sample_color_at(cx, ev.pos) else { return vec![] };
@@ -573,6 +584,9 @@ impl Tool for EyedropperTool {
if let Some(o) = options.as_object_mut() {
o.insert("stop".into(), json!(self.stop));
o.insert("brushKeyColor".into(), json!(self.brush_key_color));
if let Some(binding) = &self.image_trace_ignore_color {
o.insert("imageTraceIgnoreColor".into(), binding.clone());
}
if !self.mesh_points.is_empty() {
let points: Vec<Value> = self.mesh_points.iter().map(|(id, index)| json!({"id": id.0, "index": index})).collect();
o.insert("meshPoints".into(), Value::Array(points));
@@ -587,6 +601,7 @@ impl Tool for EyedropperTool {
match key {
"stop" => self.stop = value.as_str().map(str::to_string),
"brushKeyColor" => self.brush_key_color = value.as_bool().unwrap_or(false),
"imageTraceIgnoreColor" => self.image_trace_ignore_color = (!value.is_null()).then(|| value.clone()),
"meshPoints" => self.mesh_points = crate::meshedit::points_of(value),
"textSelection" => self.text_selection.set_option(key, value),
_ => {}
@@ -621,12 +636,15 @@ impl Tool for EyedropperTool {
Cursor::Eyedropper
}
/// Escape ends a gradient stop's or Key Color's pick without sampling and switches back to the
/// tool that armed it.
/// Escape ends the armed pick without sampling; Image Trace receives its cancellation reply.
fn key(&mut self, _cx: &ToolContext, key: ToolKey, _mods: Mods) -> Vec<Action> {
if key != ToolKey::Escape || !self.picking() {
return vec![];
}
if let Some(binding) = self.image_trace_ignore_color.take() {
let back = self.stop.take().unwrap_or_else(|| "selection".to_string());
return vec![Action::Dialog("imageTraceIgnoreColor".into(), json!({ "binding": binding, "cancel": true })), Action::SwitchTool(back)];
}
let back = self.stop.take().unwrap_or_else(|| "selection".to_string());
self.brush_key_color = false;
vec![Action::SwitchTool(back)]
@@ -648,9 +666,9 @@ impl Tool for EyedropperTool {
}
impl EyedropperTool {
/// Is a one-shot pick armed (a gradient stop's or Brush Options' Key Color)?
/// Is a gradient stop, Brush Key Color or Image Trace Ignore Color pick armed?
fn picking(&self) -> bool {
self.stop.is_some() || self.brush_key_color
self.stop.is_some() || self.brush_key_color || self.image_trace_ignore_color.is_some()
}
}
@@ -869,6 +887,96 @@ mod tests {
assert_eq!(t.options(), json!({ "stop": null, "brushKeyColor": false }));
}
#[test]
fn image_trace_sampling_keeps_forwarding_its_binding_until_the_panel_accepts_a_color() {
let (d, id) = doc_with_rect();
let (s, p) = (Selection::default(), paint());
let cx = cx(&d, &s, &p);
let binding = json!({"doc": 7, "target": id.0, "revision": 11});
for mods in [Mods::default(), Mods { alt: true, ..Default::default() }, Mods { alt: true, shift: true, ..Default::default() }] {
let mut t = EyedropperTool::default();
t.set_option("stop", &json!("gradient"));
t.set_option("imageTraceIgnoreColor", &binding);
assert_eq!(t.options()["imageTraceIgnoreColor"], binding);
assert!(t.pointer(&cx, &PointerEvent::new(PointerKind::Move, -25.5, 400.25)).is_empty());
assert!(t.pointer(&cx, &PointerEvent::new(PointerKind::Up, -25.5, 400.25)).is_empty());
assert_eq!(
t.pointer(&cx, &PointerEvent::new(PointerKind::Down, -25.5, 400.25).with_mods(mods)),
vec![Action::Dialog("imageTraceIgnoreColor".into(), json!({"binding": binding, "point": [-25.5, 400.25]}))]
);
assert_eq!(t.options()["imageTraceIgnoreColor"], binding, "a point is only a request until the panel accepts its source color");
assert_eq!(t.options()["stop"], "gradient");
assert!(t.claims_key(&cx, ToolKey::Escape));
assert!(t.ends_on_escape(&cx));
let next = t.pointer(&cx, &PointerEvent::new(PointerKind::Down, 10.0, 20.0));
assert_eq!(next, vec![Action::Dialog("imageTraceIgnoreColor".into(), json!({"binding": binding, "point": [10.0, 20.0]}))]);
t.set_option("imageTraceIgnoreColor", &Value::Null);
t.set_option("stop", &Value::Null);
assert_eq!(t.options(), json!({"stop": null, "brushKeyColor": false}));
assert!(t.key(&cx, ToolKey::Escape, Mods::default()).is_empty());
}
}
#[test]
fn image_trace_escape_cancels_its_binding_and_restores_the_tool_once() {
let (d, id) = doc_with_rect();
let (s, p) = (Selection::default(), paint());
let cx = cx(&d, &s, &p);
let binding = json!({"doc": 7, "target": id.0, "revision": 11});
let mut t = EyedropperTool::default();
assert!(!t.claims_key(&cx, ToolKey::Escape));
assert!(!t.ends_on_escape(&cx));
assert!(t.key(&cx, ToolKey::Escape, Mods::default()).is_empty());
t.set_option("stop", &json!("selection"));
t.set_option("imageTraceIgnoreColor", &binding);
assert!(t.claims_key(&cx, ToolKey::Escape));
assert!(t.ends_on_escape(&cx));
assert!(!t.claims_key(&cx, ToolKey::Enter));
assert!(t.key(&cx, ToolKey::Enter, Mods::default()).is_empty());
assert_eq!(t.options()["imageTraceIgnoreColor"], binding);
assert!(t.drop_press(&cx).is_empty(), "a dropped press leaves this pick waiting too");
assert_eq!(t.options()["imageTraceIgnoreColor"], binding);
assert_eq!(
t.key(&cx, ToolKey::Escape, Mods::default()),
vec![Action::Dialog("imageTraceIgnoreColor".into(), json!({"binding": binding, "cancel": true})), Action::SwitchTool("selection".into())]
);
assert_eq!(t.options(), json!({"stop": null, "brushKeyColor": false}));
assert!(!t.claims_key(&cx, ToolKey::Escape));
assert!(!t.ends_on_escape(&cx));
assert!(t.key(&cx, ToolKey::Escape, Mods::default()).is_empty());
// A binding without a saved tool still claims its one Escape and returns to Selection.
t.set_option("imageTraceIgnoreColor", &binding);
assert!(t.claims_key(&cx, ToolKey::Escape) && t.ends_on_escape(&cx));
assert_eq!(
t.key(&cx, ToolKey::Escape, Mods::default()),
vec![Action::Dialog("imageTraceIgnoreColor".into(), json!({"binding": binding, "cancel": true})), Action::SwitchTool("selection".into())]
);
assert!(!t.claims_key(&cx, ToolKey::Escape) && !t.ends_on_escape(&cx));
}
#[test]
fn clearing_image_trace_sampling_preserves_existing_brush_and_stop_options() {
let (d, _) = doc_with_rect();
let (s, p) = (Selection::default(), paint());
let cx = cx(&d, &s, &p);
let mut t = EyedropperTool::default();
t.set_option("brushKeyColor", &json!(true));
t.set_option("stop", &json!("selection"));
let original = t.options();
t.set_option("imageTraceIgnoreColor", &json!({"doc": 7, "target": 8, "revision": 11}));
t.set_option("imageTraceIgnoreColor", &Value::Null);
assert_eq!(t.options(), original);
// Clearing Trace leaves the ordinary Brush pick armed, including its upstream Escape.
assert!(t.claims_key(&cx, ToolKey::Escape));
assert!(t.ends_on_escape(&cx));
assert!(t.key(&cx, ToolKey::Enter, Mods::default()).is_empty());
assert_eq!(t.options(), original);
assert_eq!(
t.pointer(&cx, &PointerEvent::new(PointerKind::Down, 150.0, 150.0)),
vec![Action::Dialog("brushKeyColor".into(), json!({"color": color_json(&Color::WHITE)})), Action::SwitchTool("selection".into())]
);
}
/// The hex of the colour a `paint.sampleColor` action samples.
fn sampled_hex(a: &[Action]) -> String {
let [Action::Exec(c, p)] = a else { panic!("one action: {a:?}") };
+1
View File
@@ -367,6 +367,7 @@ impl VectorcraftApp {
// A panel's, a dialog's or the text input's commit journaled in the frame before.
crate::panels::actions::after_journaled_edit(self);
crate::scripts_menu::poll(self, ctx);
crate::dialogs::proof_setup::poll(self, ctx);
if self.session.script_running()
&& !self.session.script_waiting()
&& self.session.script_dialog().is_none()
+1
View File
@@ -519,6 +519,7 @@ impl VectorcraftApp {
}
self.ui.flyout = None;
switched?;
crate::panels::image_trace::cancel_ignore_sampler(self, false);
if let Some(g) = vectorcraft_tools::catalog::group_of(id)
&& let Some(slot) = self.ui.group_tool.get_mut(g)
{
+1
View File
@@ -181,6 +181,7 @@ impl VectorcraftApp {
/// injected until the batch was actually applied, so a burst of hidden ticks cannot queue
/// several steps of a drag or replay them together later.
pub fn raw_input_hook(&mut self, ctx: &egui::Context, raw: &mut egui::RawInput) {
crate::canvas::capture_pointer_before_input(ctx, raw.viewport_id);
self.fill_raw_input(ctx, raw);
crate::font_menu::sync_wheel_target(self, ctx, raw.viewport_id);
crate::font_menu::take_raw_wheel(ctx, raw);
+271 -3
View File
@@ -251,6 +251,7 @@ pub fn show(app: &mut VectorcraftApp, ui: &mut Ui) {
// The meshes of the tools' shared paths. Likewise, a frame that does not draw the tools'
// overlays drops them.
let mut shared_paths = std::mem::take(&mut app.canvas.shared_paths);
let sampler_cancelled = crate::panels::image_trace::refresh_ignore_sampler(app);
// A release ends the Image Trace panel's eye-button hold, also when the panel is no longer
// drawn, so a later press elsewhere does not show the source image.
if app.ui.trace_hold_source.is_some() && !ui.input(|i| i.pointer.any_down()) {
@@ -263,7 +264,9 @@ pub fn show(app: &mut VectorcraftApp, ui: &mut Ui) {
if app.ui.home.is_some_and(|k| k != crate::menus::home_key(app)) {
app.ui.home = None;
}
if crate::menus::home_showing(app) {
let home_showing = crate::menus::home_showing(app);
observe_hidden_ignore_sampler_pointer(app, ui, home_showing);
if home_showing {
// No IME owner this pass (`ime_caret_rect` stays None): the end-of-pass observation marks
// the context absent and keeps any marked text as typed.
home(app, ui, full);
@@ -298,7 +301,7 @@ pub fn show(app: &mut VectorcraftApp, ui: &mut Ui) {
scroll_bars(app, ui, rect, outer, &t);
}
let resp = ui.interact(rect, egui::Id::unique("canvas"), Sense::click_and_drag());
canvas_input(app, ui, &resp, rect);
input_after_sampler_refresh(app, ui, &resp, rect, sampler_cancelled);
let v = *app.view().unwrap_or(&View::default());
let xf = Xf::at(rect, &v, app.canvas_ui_zoom);
// While the view pans, zooms or turns under the pointer, the art under it isn't hit-tested.
@@ -470,6 +473,272 @@ pub fn show(app: &mut VectorcraftApp, ui: &mut Ui) {
}
}
#[derive(Clone, Copy, Default)]
struct CanvasClick {
count: u8,
at: Option<Pos2>,
}
fn pointer_before_input_id(viewport: egui::ViewportId) -> egui::Id {
egui::Id::unique("canvas-pointer-before-input").with(viewport)
}
/// The existing host hook calls this before egui updates the pointer for this batch.
pub(crate) fn capture_pointer_before_input(ctx: &egui::Context, viewport: egui::ViewportId) {
let pointer = ctx.input_for(viewport, |i| i.pointer.clone());
ctx.data_mut(|data| data.insert_temp(pointer_before_input_id(viewport), pointer));
}
/// Each release keeps egui's own qualification, including earlier releases in this batch.
fn canvas_pointer_releases(ui: &Ui) -> Vec<IgnoreSamplerRelease> {
let previous = ui.data(|data| data.get_temp::<egui::PointerState>(pointer_before_input_id(ui.ctx().viewport_id()))).unwrap_or_default();
let options = ui.ctx().options(|o| o.input_options);
let pixels_per_point = ui.ctx().pixels_per_point();
ui.input(|i| {
let mut counts = [0usize; egui::NUM_POINTER_BUTTONS];
for event in &i.events {
if let egui::Event::PointerButton { button, pressed: false, .. } = event {
counts[*button as usize] += 1;
}
}
i.events
.iter()
.enumerate()
.filter_map(|(index, event)| {
let egui::Event::PointerButton { pos, button, pressed: false, .. } = event else { return None };
let clicked = if counts[*button as usize] == 1 {
i.pointer.button_clicked(*button)
} else {
// Aggregated flags cannot identify a later non-click release. Replay only
// an ambiguous button's prefix, before its Up, through egui's public API.
let mut before = i.clone();
before.pointer = previous.clone();
let raw = egui::RawInput { time: Some(i.time), events: i.events[..index].to_vec(), ..i.raw.clone() };
before.begin_pass(raw, false, pixels_per_point, options).pointer.could_any_button_be_click()
};
Some(IgnoreSamplerRelease { button: *button, at: *pos, clicked })
})
.collect()
})
}
/// Two non-sampler clicks replace egui's last two click times after a consumed pick.
#[derive(Clone, Copy, Default)]
struct IgnoreSamplerClicks {
last: Option<(f64, Pos2)>,
remaining: u8,
}
fn ignore_sampler_primary_id(id: egui::Id) -> egui::Id {
id.with("image-trace-consumed-primary")
}
fn ignore_sampler_owns_primary(ui: &Ui, id: egui::Id) -> bool {
ui.data(|data| data.get_temp::<bool>(ignore_sampler_primary_id(id)).unwrap_or(false))
}
fn reset_ignore_sampler_clicks(ui: &Ui, id: egui::Id) {
ui.data_mut(|data| data.insert_temp(id.with("image-trace-clicks"), IgnoreSamplerClicks { last: None, remaining: 2 }));
}
/// Reclassify only the two clicks whose raw history can still contain a consumed pick.
/// Other widgets' clicks count too, as they do in egui; its pointer state stays untouched.
fn ignore_sampler_clicks(ui: &Ui, id: egui::Id, consumed: bool, releases: &[IgnoreSamplerRelease]) {
ui.data_mut(|data| data.remove::<CanvasClick>(id.with("image-trace-click-count")));
if !releases.iter().any(|release| release.clicked) {
return;
}
if consumed {
reset_ignore_sampler_clicks(ui, id);
return;
}
let time = ui.input(|i| i.time);
for release in releases.iter().filter(|release| release.clicked) {
record_ignore_sampler_click(ui, id, release.at, time, release.button == egui::PointerButton::Primary);
}
}
fn record_ignore_sampler_click(ui: &Ui, id: egui::Id, at: Pos2, time: f64, primary: bool) {
let (delay, distance) = ui.ctx().options(|o| (o.input_options.max_double_click_delay, o.input_options.max_click_dist));
ui.data_mut(|data| {
let history_id = id.with("image-trace-clicks");
let Some(mut clicks) = data.remove_temp::<IgnoreSamplerClicks>(history_id) else {
if primary {
data.remove::<CanvasClick>(id.with("image-trace-click-count"));
}
return;
};
let double = clicks.last.is_some_and(|(last, pos)| time - last < delay && pos.distance_sq(at) < distance * distance);
if primary {
data.insert_temp(id.with("image-trace-click-count"), CanvasClick { count: if double { 2 } else { 1 }, at: Some(at) });
}
clicks.last = Some((time, at));
clicks.remaining -= 1;
if clicks.remaining != 0 {
data.insert_temp(history_id, clicks);
}
});
}
fn primary_click(ui: &Ui, resp: &egui::Response) -> CanvasClick {
if !resp.clicked_by(egui::PointerButton::Primary) {
return CanvasClick::default();
}
ui.data(|data| data.get_temp::<CanvasClick>(resp.id.with("image-trace-click-count"))).unwrap_or_else(|| {
let count = if resp.triple_clicked() {
3
} else if resp.double_clicked() {
2
} else {
1
};
let at = ui.data(|data| data.get_temp::<Pos2>(resp.id.with("canvas-qualified-primary-release")));
CanvasClick { count, at }
})
}
fn primary_click_count(ui: &Ui, resp: &egui::Response) -> u8 {
primary_click(ui, resp).count
}
/// Remove only the pointer sequence acquired by this sampler, never a view or tool drag.
fn clear_ignore_sampler_gesture(ui: &Ui, id: egui::Id) {
ui.data_mut(|data| {
data.remove::<bool>(ignore_sampler_primary_id(id));
if matches!(data.get_temp::<Drag>(drag::drag_id()), Some(Drag::Gesture)) {
data.remove::<Drag>(drag::drag_id());
data.remove::<Pos2>(drag::drag_pos_id());
data.remove::<Point>(drag::tool_drag_doc_id());
data.remove::<Point>(drag::tool_press_doc_id());
}
});
}
#[derive(Clone, Copy)]
struct IgnoreSamplerRelease {
button: egui::PointerButton,
at: Pos2,
clicked: bool,
}
#[derive(Default)]
struct IgnoreSamplerPointer {
owned: bool,
replaced: bool,
ordinary_pressed: bool,
consumed_release: bool,
releases: Vec<IgnoreSamplerRelease>,
}
/// Attribute a fresh press after an owned release before egui's per-frame flags lose their order.
fn ignore_sampler_pointer_frame(ui: &Ui, id: egui::Id, cancelled: bool, releases: &[IgnoreSamplerRelease]) -> IgnoreSamplerPointer {
let owned = ignore_sampler_owns_primary(ui, id);
if !owned && !cancelled {
return IgnoreSamplerPointer::default();
}
ui.input(|i| {
let mut frame = IgnoreSamplerPointer { owned, ..Default::default() };
let mut first_press_owned = cancelled;
let mut releases = releases.iter();
for event in &i.events {
if let egui::Event::PointerButton { pos, button, pressed, .. } = event {
if *pressed {
if *button == egui::PointerButton::Primary {
frame.replaced |= frame.owned;
// An observed old Up ends that cancelled sequence; without it,
// a fresh invalid press keeps the existing cancellation gate.
frame.owned = first_press_owned && !frame.consumed_release;
first_press_owned = false;
frame.ordinary_pressed |= !frame.owned;
}
} else {
let clicked = releases.next().is_some_and(|release| release.clicked);
ignore_sampler_release(&mut frame, *button, *pos, clicked);
}
}
}
frame
})
}
fn ignore_sampler_release(frame: &mut IgnoreSamplerPointer, button: egui::PointerButton, at: Pos2, clicked: bool) {
if button == egui::PointerButton::Primary && frame.owned {
frame.consumed_release = true;
frame.releases.clear();
} else if frame.consumed_release {
frame.releases.push(IgnoreSamplerRelease { button, at, clicked });
}
}
fn ignore_sampler_frame_clicks(ui: &Ui, id: egui::Id, frame: &IgnoreSamplerPointer, consumed: bool, releases: &[IgnoreSamplerRelease]) {
if !frame.consumed_release || !frame.ordinary_pressed {
ignore_sampler_clicks(ui, id, consumed, releases);
return;
}
// Consume the old sequence, then classify only subsequent ordinary releases. A new Down
// still reaches the tool when the last release belongs to the consumed sequence.
reset_ignore_sampler_clicks(ui, id);
ui.data_mut(|data| data.insert_temp(id.with("image-trace-click-count"), CanvasClick::default()));
let time = ui.input(|i| i.time);
for release in &frame.releases {
let primary = release.button == egui::PointerButton::Primary;
if release.clicked {
record_ignore_sampler_click(ui, id, release.at, time, primary);
}
}
}
fn begin_ignore_sampler_pointer(ui: &Ui, id: egui::Id, cancelled: bool) -> (bool, bool) {
let releases = canvas_pointer_releases(ui);
ui.data_mut(|data| {
let position_id = id.with("canvas-qualified-primary-release");
data.remove::<Pos2>(position_id);
if let Some(release) = releases.iter().rev().find(|release| release.clicked && release.button == egui::PointerButton::Primary) {
data.insert_temp(position_id, release.at);
}
});
let frame = ignore_sampler_pointer_frame(ui, id, cancelled, &releases);
if frame.replaced {
// This also replaces an abandoned sampler Down whose release was not observed.
clear_ignore_sampler_gesture(ui, id);
}
if frame.owned {
ui.data_mut(|data| data.insert_temp(ignore_sampler_primary_id(id), true));
}
let consumed = frame.owned && ui.input(|i| i.pointer.primary_pressed() || i.pointer.primary_released() || i.pointer.primary_down());
ignore_sampler_frame_clicks(ui, id, &frame, consumed, &releases);
(consumed, frame.ordinary_pressed)
}
fn end_ignore_sampler_pointer(ui: &Ui, id: egui::Id) {
// A valid Down can acquire ownership and complete in the same frame.
if ignore_sampler_owns_primary(ui, id) && !ui.input(|i| i.pointer.primary_down()) {
if ui.input(|i| i.pointer.button_clicked(egui::PointerButton::Primary)) {
reset_ignore_sampler_clicks(ui, id);
}
clear_ignore_sampler_gesture(ui, id);
}
}
fn observe_hidden_ignore_sampler_pointer(app: &VectorcraftApp, ui: &Ui, home_showing: bool) {
if home_showing || app.session.active().is_none() {
// Home and the empty window still advance egui's click history. Observe the same
// correction there so it retires after the two ordinary clicks that replace a pick.
let id = egui::Id::unique("canvas");
begin_ignore_sampler_pointer(ui, id, false);
end_ignore_sampler_pointer(ui, id);
}
}
/// A sampler press keeps its release, even if its Down completes or its binding expires held.
fn input_after_sampler_refresh(app: &mut VectorcraftApp, ui: &Ui, resp: &egui::Response, rect: egui::Rect, cancelled: bool) {
let (consumed, ordinary_pressed) = begin_ignore_sampler_pointer(ui, resp.id, cancelled);
if !consumed && (ordinary_pressed || !cancelled || !ui.input(|i| i.pointer.any_pressed())) {
canvas_input(app, ui, resp, rect);
}
end_ignore_sampler_pointer(ui, resp.id);
}
/// The pointer on the canvas: the tool's input, unless the context menu or the 3D gizmo has the press.
pub(crate) fn canvas_input(app: &mut VectorcraftApp, ui: &Ui, resp: &egui::Response, rect: egui::Rect) {
if app.ui.dialog.as_ref().is_some_and(crate::dialogs::revolve_gizmo::active) {
@@ -643,7 +912,6 @@ fn cache_key(
rich_black: app.session.prefs.black_on_screen == "rich",
// A tool's drag on the canvas, during an interaction (not a dialog's preview).
dragging: app.session.in_interaction() && ui.data(|d| d.get_temp::<Drag>(drag_id())) == Some(Drag::Tool),
// The Image Trace panel's eye button, while it is held.
trace_source: app.ui.trace_hold_source.clone(),
// Preferences › Performance › Use Monitor Profile for Canvas.
display: app.display_profile.key(app.session.prefs.monitor_profile_display),
+21 -2
View File
@@ -380,6 +380,9 @@ pub(crate) fn end_art_move(app: &mut VectorcraftApp, ctx: &egui::Context) {
/// Send a pointer event to the active tool and act on UI requests (dialogs, tool switches).
pub fn dispatch(app: &mut VectorcraftApp, ev: &PointerEvent, view: vectorcraft_engine::ViewInfo) {
if ev.kind == PointerKind::Down && crate::panels::image_trace::discard_stale_ignore_click(app) {
return;
}
// A press lent to a selection tool (Cmd/Ctrl held) does not use the tool of a held key.
if ev.kind == PointerKind::Down && app.session.lent_tool_id(&ev.mods).is_none() {
crate::shortcuts::note_tool_use(app);
@@ -422,11 +425,27 @@ fn pressed_with(app: &mut VectorcraftApp, index: Option<usize>, pos: Point, tool
pub fn apply_requests(app: &mut VectorcraftApp, r: vectorcraft_engine::Result<Vec<vectorcraft_engine::UiRequest>>) {
match r {
Ok(reqs) => {
let mut sampler_return = None;
for r in reqs {
match r {
vectorcraft_engine::UiRequest::Dialog(kind, p) => crate::dialogs::open_tool_dialog(app, &kind, p),
vectorcraft_engine::UiRequest::Dialog(kind, p) => {
let back = if kind == "imageTraceIgnoreColor" && p["cancel"] == true {
app.ui.trace_ignore_sampler.as_ref().map(|sampler| sampler.back.clone())
} else {
None
};
crate::dialogs::open_tool_dialog(app, &kind, p);
// A matching callback must actually consume the active sampler.
sampler_return = back.filter(|_| app.ui.trace_ignore_sampler.is_none());
}
vectorcraft_engine::UiRequest::Panel(panel) => activate_panel(app, &panel),
vectorcraft_engine::UiRequest::SwitchTool(t) => app.select_tool(&t),
vectorcraft_engine::UiRequest::SwitchTool(t) => {
if sampler_return.take().is_some_and(|back| back == t) {
app.return_to_tool(&t);
} else {
app.select_tool(&t);
}
}
vectorcraft_engine::UiRequest::Status(msg) => app.status(msg),
vectorcraft_engine::UiRequest::Place(p) => crate::place::place_from_cursor(app, &p),
// In the document the press was made in, which may no longer be the active one.
+32 -12
View File
@@ -140,7 +140,7 @@ pub(super) fn handle_input(app: &mut VectorcraftApp, ui: &Ui, resp: &egui::Respo
drag_held(app, ui, &f, d, p);
} else {
// The drag ends where its button went up: the moves after the release in this frame are hover.
drag_released(app, ui, &f, d, release_pos(ui, button).unwrap_or(p));
drag_released(app, ui, &f, d, release_pos(ui, button, false).unwrap_or(p));
}
} else if let Some(p) = hover_tool
// A press on an artboard's name starts no drag: the moves while it is held are not hover.
@@ -190,15 +190,18 @@ pub(super) fn handle_input(app: &mut VectorcraftApp, ui: &Ui, resp: &egui::Respo
.unwrap_or(m.shift);
select_named_artboard(app, i, shift || release_shift);
}
if resp.double_clicked()
let click = super::primary_click(ui, resp);
if !super::ignore_sampler_owns_primary(ui, resp.id)
&& click.count == 2
&& !f.modal
&& let Some(p) = at
&& let Some(p) = click.at.or(at)
{
double_click(app, ui, &f, p);
}
if resp.triple_clicked()
if !super::ignore_sampler_owns_primary(ui, resp.id)
&& click.count == 3
&& !f.modal
&& let Some(p) = at
&& let Some(p) = click.at.or(at)
{
triple_click(app, ui, &f, p);
}
@@ -339,7 +342,7 @@ fn begin_drag(app: &mut VectorcraftApp, ui: &Ui, f: &Pointing, p: Pos2) {
Drag::RotateView { start_angle: (p.y - c.y).atan2(p.x - c.x) as f64, start_rot: v.rotation, snaps: !space }
} else {
// Cmd with another tool drags with the selection tool used last (the session lends it).
let ev = PointerEvent {
let mut ev = PointerEvent {
kind: PointerKind::Down,
pos: xf.to_doc(p),
mods: mods(m, space),
@@ -347,9 +350,25 @@ fn begin_drag(app: &mut VectorcraftApp, ui: &Ui, f: &Pointing, p: Pos2) {
pressure: pen_pressure(ui, app, true),
pen: pen_pose(app, &xf),
};
// Only a Down actually sent to this sampler owns the gesture. Cmd/Ctrl's borrowed
// selection press keeps the ordinary tool path.
let sampler = app.ui.trace_ignore_sampler.is_some() && tool == "eyedropper" && app.session.lent_tool_id(&ev.mods).is_none();
if sampler {
// A later hover move is not the source pixel that was pressed.
let pressed = ui.input(|i| {
i.events.iter().find_map(|event| match event {
egui::Event::PointerButton { pos, button: egui::PointerButton::Primary, pressed: true, .. } => Some(*pos),
_ => None,
})
});
if let Some(pressed) = pressed {
ev.pos = xf.to_doc(pressed);
}
ui.data_mut(|data| data.insert_temp(super::ignore_sampler_primary_id(resp.id), true));
}
dispatch(app, &ev, view);
crate::document_drag::begin(app, ui.ctx(), ev.pos);
Drag::Tool
if sampler { Drag::Gesture } else { Drag::Tool }
};
// A drag of the Zoom, Hand or Rotate View tool uses the tool of a held shortcut; held Space's
// view tools are not that tool.
@@ -611,7 +630,7 @@ fn drag_released(app: &mut VectorcraftApp, ui: &Ui, f: &Pointing, d: Drag, p: Po
// The second click of a double-click: don't fit another artboard on this release.
// A double-click on an object does not open Artboard Options. Empty artboard
// space still does.
if resp.double_clicked() && app.session.tool_id() == "artboard" {
if super::primary_click_count(ui, resp) == 2 && app.session.tool_id() == "artboard" {
app.session.set_tool_option("suppressFitClick", &json!(true));
}
// A move that came in the release's own frame shapes the preview first: the
@@ -714,13 +733,14 @@ fn triple_click(app: &mut VectorcraftApp, ui: &Ui, f: &Pointing, p: Pos2) {
dispatch(app, &ev, view);
}
/// Where `button` went up in this frame, if it did.
fn release_pos(ui: &Ui, button: egui::PointerButton) -> Option<Pos2> {
/// Where `button` went up: the first release ends a drag, the last classifies this frame's click.
fn release_pos(ui: &Ui, button: egui::PointerButton, last: bool) -> Option<Pos2> {
ui.input(|i| {
i.events.iter().find_map(|e| match e {
let mut releases = i.events.iter().filter_map(|e| match e {
egui::Event::PointerButton { pos, button: b, pressed: false, .. } if *b == button => Some(*pos),
_ => None,
})
});
if last { releases.next_back() } else { releases.next() }
})
}
+22 -17
View File
@@ -1011,6 +1011,19 @@ pub fn control_bar(app: &mut VectorcraftApp, ui: &mut Ui) {
}
}
/// The Control bar's object label, `label`, while the bar has room for it. For one selected image
/// (`image`: Linked File or Embedded) it is an underlined link, and a click opens the Links panel on
/// the image with its Link Info.
fn object_label(app: &mut VectorcraftApp, ui: &mut Ui, label: egui::RichText, image: bool) {
if ui.available_width() < widgets::text_width(ui, label.clone()) {
left_out(ui);
} else if !image {
ui.label(label);
} else if ui.link(label.underline()).clicked() {
crate::panels::links::show_selected_image(app, ui.ctx());
}
}
/// The Control bar's gripper, controls and panel menu, in the bar `bar`. A `floating` bar clips its
/// controls to the room left of the panel menu button, and always shows the button.
fn contents(app: &mut VectorcraftApp, ui: &mut Ui, t: &Tokens, bar: egui::Rect, dock_room: egui::Rect, floating: bool) {
@@ -1043,30 +1056,22 @@ fn contents(app: &mut VectorcraftApp, ui: &mut Ui, t: &Tokens, bar: egui::Rect,
let units = app.session.general_unit();
let first = st.selection.objects.first().and_then(|id| st.doc.node(*id));
let anchors = anchor_controls(app);
let label = match first {
_ if app.session.tool_id() == "artboard" => tl!("Artboard"),
Some(_) if count == 1 && anchors != AnchorControls::None => {
tl!("Anchor Point")
}
// The label, and whether it names one selected image.
let (label, image) = match first {
_ if app.session.tool_id() == "artboard" => (tl!("Artboard"), false),
Some(_) if count == 1 && anchors != AnchorControls::None => (tl!("Anchor Point"), false),
Some(vectorcraft_doc::Node { kind: NodeKind::Image(im), .. }) if count == 1 => {
if im.link.is_some() {
tl!("Linked File")
(tl!("Linked File"), true)
} else {
tl!("Embedded")
(tl!("Embedded"), true)
}
}
Some(n) if count == 1 && crate::panels::image_trace::is_trace(n) => {
tl!("Image Tracing")
}
_ => tl!(crate::panels::appearance::summary(app, ui.ctx()).map_or("No Selection", |s| s.label)),
Some(n) if count == 1 && crate::panels::image_trace::is_trace(n) => (tl!("Image Tracing"), false),
_ => (tl!(crate::panels::appearance::summary(app, ui.ctx()).map_or("No Selection", |s| s.label)), false),
};
let has_first = first.is_some();
let label = egui::RichText::new(label).font(theme::semibold(12.0)).color(t.text);
if ui.available_width() >= widgets::text_width(ui, label.clone()) {
ui.label(label);
} else {
left_out(ui);
}
object_label(app, ui, egui::RichText::new(label).font(theme::semibold(12.0)).color(t.text), image);
// With the Artboard tool in use, the bar shows the active artboard's controls in place
// of the object controls.
let (artboard_options, transform) = (group_on(app, "artboardOptions"), group_on(app, "transform"));
+52
View File
@@ -4304,6 +4304,58 @@ fn select_similar_stays_out_while_an_image_control_is_left_out() {
assert!(seen, "a wide bar shows the button after the image's controls");
}
/// A click on the Control bar's Linked File or Embedded label shows the Links panel, in an expanded
/// dock and in one collapsed to icons; the label of any other object stays plain text.
#[test]
fn the_linked_file_and_embedded_labels_open_the_links_panel() {
crate::i18n::set_current(crate::i18n::Lang::EN);
let mut app = crate::VectorcraftApp::new(Session::new(), Default::default());
app.run("file.new", json!({"width": 400, "height": 200})).unwrap();
let img = image::RgbaImage::from_pixel(20, 20, image::Rgba([0, 0, 0, 255]));
let mut png = vec![];
img.write_to(&mut std::io::Cursor::new(&mut png), image::ImageFormat::Png).unwrap();
let dir = vectorcraft_testkit::temp_dir("control-bar-image-label");
std::fs::create_dir_all(&dir).unwrap();
let path = dir.join("square.png");
std::fs::write(&path, &png).unwrap();
use crate::tests_removeanchors::{at, click_control, control_frame};
let ctx = egui::Context::default();
crate::theme::install_fonts(&ctx);
let links = crate::panels::links::ID;
// Closes the Links panel, clicks `name` on the bar and answers whether the panel shows.
let click = |app: &mut crate::VectorcraftApp, name: &str| {
app.run("window.panel.close", json!({"panel": links})).ok();
app.ui.open_panel = None;
assert!(!crate::panel_docking::visible(&app.ui, links), "{name}: the panel is closed first");
let pos = at(&control_frame(app, &ctx, vec![]), name);
click_control(app, &ctx, pos);
crate::panel_docking::visible(&app.ui, links)
};
let id = app.run("shape.rectangle", json!({"x": 10, "y": 10, "width": 30, "height": 20})).unwrap()["id"].clone();
let linked = app.run("file.place", json!({"path": path, "link": true})).unwrap()["ids"].clone();
let embedded = app.run("file.place", json!({"path": path, "link": false})).unwrap()["ids"].clone();
// The default layout floats Links: dock it beside Layers so that both passes reach a docked panel.
app.run("window.panel", json!({"panel": links})).unwrap();
app.run("window.panel.dock", json!({"panel": links, "onto": "layers"})).unwrap();
// Whether Links floats, and whether its dock column is collapsed to icons.
let placed = |app: &crate::VectorcraftApp| {
let layout = crate::panel_docking::layout_of(&app.ui);
(layout.floating.iter().any(|w| w.panels().any(|p| p == links)), crate::panel_docking::in_iconic_column(&layout, links))
};
for collapsed in [false, true] {
app.run("window.collapseDock", json!({ "collapsed": collapsed })).unwrap();
app.run("select.set", json!({ "ids": linked })).unwrap();
assert!(click(&mut app, "Linked File"), "collapsed {collapsed}, status: {}", app.ui.status);
assert_eq!(placed(&app), (false, collapsed), "Links opened in its dock, collapsed {collapsed}");
app.run("select.set", json!({ "ids": embedded })).unwrap();
assert!(click(&mut app, "Embedded"), "collapsed {collapsed}, status: {}", app.ui.status);
assert_eq!(placed(&app), (false, collapsed), "Links opened in its dock, collapsed {collapsed}");
app.run("select.set", json!({ "ids": [id] })).unwrap();
let name = crate::panels::appearance::object_label(&app);
assert!(!click(&mut app, name), "collapsed {collapsed}: a rectangle's label opens nothing");
}
}
/// The Anchor Points group holds Convert and Anchors for direct-selected anchors; off, the bar keeps
/// its Anchor Point label.
#[test]
+13 -3
View File
@@ -1146,9 +1146,9 @@ fn leave_out_unreadable_values(v: &mut Value, place: ParamsPlace) {
/// Takes out of `ui.inspect`'s copy of the UI state the paths the request may not read: recent files,
/// a library panel's file, folder preferences (saved, and in an open Preferences dialog) and the paths
/// in recorded actions' steps outside the read root. The file selected in an open JavaScript Files
/// dialog is named as `svgInteractivity.info` names the active document's linked files. The UI state
/// itself is not changed.
/// in recorded actions' steps and in the item an open Insert Menu Item dialog picked, outside the
/// read root. The file selected in an open JavaScript Files dialog is named as `svgInteractivity.info`
/// names the active document's linked files. The UI state itself is not changed.
fn leave_out_unreadable_paths(app: &VectorcraftApp, ui: &mut serde_json::Map<String, Value>) {
if let Some(Value::Array(files)) = ui.get_mut("recent_files") {
files.retain(|f| f.as_str().is_some_and(readable));
@@ -1172,6 +1172,16 @@ fn leave_out_unreadable_paths(app: &VectorcraftApp, ui: &mut serde_json::Map<Str
{
leave_out_unreadable_folders(fields);
}
// The menu item picked in an open Insert Menu Item dialog, such as a saved proof setup's file.
if let Some(Value::Object(dialog)) = ui.get_mut("dialog")
&& dialog.get("kind").and_then(Value::as_str) == Some(crate::dialogs::action_insert_menu_item::KIND)
&& let Some(Value::Object(fields)) = dialog.get_mut("fields")
{
let command = fields.get("command").and_then(Value::as_str).unwrap_or_default().to_string();
if let Some(Value::Object(params)) = fields.get_mut("params") {
leave_out_unreadable_step(&command, params);
}
}
if let Some(Value::Object(dialog)) = ui.get_mut("dialog")
&& dialog.get("kind").and_then(Value::as_str) == Some(crate::dialogs::javascript_files::KIND)
&& let Some(Value::Object(fields)) = dialog.get_mut("fields")
+14 -3
View File
@@ -106,6 +106,7 @@ mod png_options;
pub mod print;
pub mod print_presets;
pub mod profile_mismatch;
pub mod proof_setup;
pub mod psd_import;
mod psd_options;
pub mod raster_effects;
@@ -371,6 +372,7 @@ registry! {
ColorGuideOptions: [color_guide_options::KIND] => color_guide_options::SPEC,
ColorBalance: [color_balance::KIND] => color_balance::SPEC,
Saturate: [saturate::KIND] => saturate::SPEC,
ProofSetup: [proof_setup::KIND] => proof_setup::SPEC,
IndexedColor: [indexed_color::KIND] => indexed_color::SPEC,
SaveSwatchLibrary: [save_swatch_library::KIND] => save_swatch_library::SPEC,
TileEdgeColor: [tile_edge_color::KIND] => tile_edge_color::SPEC,
@@ -623,7 +625,8 @@ pub fn accepts_field(d: &Dialog, field: &str) -> bool {
/// A Graph Data Column Width set this way sets every column, as Cell Style's does. A Width Point
/// Edit side width set this way for several points sets it on every point, as typing it does. An
/// Import PDF `allPages` set this way to the other pick sets Import PDF pages as links back to its
/// default.
/// default. A Dimension Tool Options `arrowStyle` set this way clears `arrowHead`, and a built-in
/// `arrowHead` set this way sets both values of its Arrow Style entry, as that menu does.
pub fn set_field(d: &mut Dialog, field: String, value: Value) {
if d.kind == brush_options::KIND {
brush_art_options::note_set(d, &field);
@@ -637,6 +640,9 @@ pub fn set_field(d: &mut Dialog, field: String, value: Value) {
if d.kind == import_pdf::KIND {
import_pdf::note_set(d, &field, &value);
}
if d.kind == dimension::KIND && dimension::note_set(d, &field, &value) {
return;
}
if d.kind == "preferences" {
crate::prefs_dialog::note_set(d, &field, &value);
}
@@ -784,6 +790,9 @@ pub fn cancel(app: &mut VectorcraftApp) {
if d.kind == script_run::NOTICE_KIND {
script_run::notice_cancel(app, &d);
}
if d.kind == proof_setup::KIND {
proof_setup::cancel(app, &d);
}
if d.kind == script_run::PICKER_KIND {
script_run::picker_cancel(app, &d);
}
@@ -839,13 +848,15 @@ pub fn confirm(app: &mut VectorcraftApp) -> DialogResult {
}
/// After a dialog closes, and each frame: a Missing Fonts dialog that another dialog replaced waits
/// for its turn again, the search a Missing Fonts or Find Linked Files dialog started stops once
/// that dialog is gone, and with no dialog open the choice about a stopped plug-in that another
/// for its turn again, a Proof Setup preview that another dialog replaced is undone, the search a
/// Missing Fonts or Find Linked Files dialog started stops once that dialog is gone, and with no
/// dialog open the choice about a stopped plug-in that another
/// dialog replaced opens again, else the questions about the next restored document's linked files
/// ([`crate::recovery::ask_next`]), else the next document's Missing Fonts dialog (one dialog at a
/// time).
pub(crate) fn settle(app: &mut VectorcraftApp) {
crate::placing::settle_swatch_paste(app);
proof_setup::restore_replaced(app);
profile_mismatch::settle(app);
missing_fonts::requeue_replaced(app);
missing_fonts::stop_when_closed(app);
@@ -66,23 +66,27 @@ fn build(lang: crate::i18n::Lang, english_names: bool) -> Vec<Row> {
.map(|item| {
let parts = || item.path.iter().chain(std::iter::once(&item.label)).copied();
let english = parts().collect::<Vec<_>>().join(" › ");
let shown = parts().map(|s| crate::i18n::tr(lang, s)).collect::<Vec<_>>().join(" › ");
// A saved proof setup keeps its file's name.
let own_name = item.command == crate::dialogs::proof_setup::LOAD;
let path = item.path.iter().map(|s| crate::i18n::tr(lang, s));
let label = if own_name { item.label } else { crate::i18n::tr(lang, item.label) };
let shown = path.chain(std::iter::once(label)).collect::<Vec<_>>().join(" › ");
let haystack = format!("{}\n{}\n{}", english.to_lowercase(), shown.to_lowercase(), item.command.to_lowercase());
Row { command: item.command, params: item.params, shown, haystack }
})
.collect()
}
/// The rows, built again only when the language, the installed plug-ins, the font name setting or
/// the loaded fonts change, not on every frame.
/// The rows, built again only when the language, the installed plug-ins, the font name setting,
/// the loaded fonts or the saved proof setups change, not on every frame.
fn rows(app: &VectorcraftApp, ctx: &egui::Context) -> Arc<Vec<Row>> {
type Key = (&'static str, u64, bool, u64, bool);
type Key = (&'static str, u64, bool, u64, bool, u64);
let lang = crate::i18n::current();
let english_names = app.session.prefs.font_names_in_english;
let db = vectorcraft_text::FontDb::global();
// Read before building, as the Font menu does: fonts that load meanwhile build the rows again.
let (cataloged, generation) = (db.installed_fonts_ready(), db.generation());
let key: Key = (lang.code(), menus::plugin_revision(), english_names, generation, cataloged);
let key: Key = (lang.code(), menus::plugin_revision(), english_names, generation, cataloged, crate::dialogs::proof_setup::saved_revision());
let id = egui::Id::unique("action-insert-menu-item-rows");
if let Some((k, v)) = ctx.data(|d| d.get_temp::<(Key, Arc<Vec<Row>>)>(id))
&& k == key
@@ -301,4 +305,33 @@ mod tests {
let shared = rows.iter().any(|r| rows.iter().any(|o| o.command == r.command && o.params != r.params));
assert!(shared, "items that share a command are listed apart, by their params");
}
/// A proof setup saved while the dialog is open is listed at once, by its file's name in every
/// UI language.
#[test]
fn a_proof_setup_saved_meanwhile_is_listed_by_its_name() {
use crate::dialogs::proof_setup;
let mut app = VectorcraftApp::new(vectorcraft_engine::Session::new(), Default::default());
let ctx = egui::Context::default();
let dir = vectorcraft_testkit::TempDir::new("insert-menu-item-proof-setups");
app.session.attach_proof_setups(dir.join("Proof Setups"));
proof_setup::refresh_saved(&app, None);
proof_setup::wait();
let de = Lang::from_code("de").unwrap();
crate::i18n::set_current(de);
let listed =
|app: &VectorcraftApp| rows(app, &ctx).iter().filter(|r| r.command == proof_setup::LOAD).map(|r| r.shown.clone()).collect::<Vec<_>>();
// The installed fonts' scan, which builds the rows again when it ends, is over first.
vectorcraft_text::FontDb::global().menu_family_list();
let before = listed(&app);
app.run("view.proofSetup.save", json!({"name": "Group", "target": "workingCmyk"})).unwrap();
proof_setup::refresh_saved(&app, None);
proof_setup::wait();
let after = listed(&app);
crate::i18n::set_current(Lang::EN);
assert!(before.is_empty(), "{before:?}");
let view = crate::i18n::tr(de, "View");
let menu = crate::i18n::tr(de, "Proof Setup");
assert_eq!(after, [format!("{view} › {menu} › Group")]);
}
}
+135 -22
View File
@@ -4,6 +4,7 @@ use super::DialogSpec;
use crate::{VectorcraftApp, state::Dialog, theme::Tokens, widgets};
use egui::{RichText, Ui};
use serde_json::{Value, json};
use vectorcraft_doc::Arrowhead;
use vectorcraft_doc::dimension::{ArrowStyle, DimensionOptions};
pub const KIND: &str = "dimensionOptions";
@@ -14,6 +15,8 @@ pub(super) const SPEC: DialogSpec = DialogSpec {
ok: Some("Save"),
min_width: 520.0,
max_width: Some(560.0),
// The saved options leave `arrowHead` out when it is null.
inputs: |_| &["arrowHead"],
..DialogSpec::FORM
};
@@ -31,11 +34,33 @@ const UNITS: Choices = &[
("yd", "Yards"),
];
const LINE_TYPES: Choices = &[("solid", "Solid"), ("dashed", "Dashed"), ("dotted", "Dotted")];
const ARROWS: Choices = &[("filled", "Filled"), ("open", "Open"), ("tick", "Tick"), ("none", "None")];
/// The style of each `ARROWS` entry, in the same order.
const ARROW_STYLES: [ArrowStyle; 4] = [ArrowStyle::Filled, ArrowStyle::Open, ArrowStyle::Tick, ArrowStyle::None];
/// The size of an Arrow Style preview: a line with the head at its right end.
const ARROW_PREVIEW: egui::Vec2 = egui::vec2(40.0, 16.0);
/// The size of an Arrow Style preview: a line with the head at its right end. Line Arrow, the widest
/// head, spreads 20 pt across at the preview's head weight.
const ARROW_PREVIEW: egui::Vec2 = egui::vec2(40.0, 22.0);
/// One Arrow Style entry: the `arrowStyle` and `arrowHead` values it sets, and its name.
struct ArrowChoice {
style: ArrowStyle,
head: Option<Arrowhead>,
name: &'static str,
}
impl ArrowChoice {
/// The arrowhead the dimension line draws with this entry.
fn drawn(&self) -> Option<Arrowhead> {
self.head.clone().or_else(|| self.style.arrowhead())
}
}
/// The Arrow Style entries: Filled, Open, Tick and None, then the other built-in stroke arrowheads
/// in the Stroke panel's order. A stroke arrowhead keeps `filled` as its `arrowStyle`, the head that
/// versions which do not read `arrowHead` draw when they draw the dimension again.
fn arrow_choices() -> Vec<ArrowChoice> {
let named = [(ArrowStyle::Filled, "Filled"), (ArrowStyle::Open, "Open"), (ArrowStyle::Tick, "Tick"), (ArrowStyle::None, "None")];
let heads = Arrowhead::ALL.into_iter().filter(|h| !named.iter().any(|(s, _)| s.arrowhead().as_ref() == Some(h)));
named
.into_iter()
.map(|(style, name)| ArrowChoice { style, head: None, name })
.chain(heads.map(|h| ArrowChoice { style: ArrowStyle::Filled, name: h.label(), head: Some(h) }))
.collect()
}
const POSITIONS: Choices = &[("away", "Away from the Line"), ("between", "Between Line and Object")];
const ALIGNMENTS: Choices = &[("left", "Left"), ("center", "Center"), ("right", "Right")];
@@ -51,6 +76,37 @@ pub fn open(app: &mut VectorcraftApp) -> Result<Value, String> {
Ok(json!({"dialog":KIND}))
}
/// For `ui.dialog.set`, as the Arrow Style menu sets them: an `arrowStyle` set alone draws that
/// style's own head, and a built-in head set as `arrowHead` sets both values of its Arrow Style
/// entry (`tick` with no `arrowHead` for `Slash`, `filled` with `Barbed` for `Barbed`). Returns
/// whether it set the field itself.
pub(super) fn note_set(d: &mut Dialog, field: &str, value: &Value) -> bool {
match field {
"arrowStyle" => {
d.fields.insert("arrowHead".into(), Value::Null);
false
}
"arrowHead" => {
let head = built_in_head(value);
if let Some(ch) = arrow_choices().into_iter().find(|ch| head.is_some() && ch.drawn() == head)
&& let (Ok(style), Ok(head)) = (serde_json::to_value(ch.style), serde_json::to_value(&ch.head))
{
d.fields.insert("arrowStyle".into(), style);
d.fields.insert("arrowHead".into(), head);
return true;
}
false
}
_ => false,
}
}
/// The built-in stroke arrowhead `value` names. Only a short name is read: a draft may hold anything.
fn built_in_head(value: &Value) -> Option<Arrowhead> {
let name = value.as_str().filter(|name| name.len() <= 64)?;
serde_json::from_value::<Arrowhead>(Value::String(name.into())).ok().filter(|h| !matches!(h, Arrowhead::Custom(_)))
}
fn read(fields: &serde_json::Map<String, Value>) -> Result<DimensionOptions, String> {
let o: DimensionOptions = serde_json::from_value(Value::Object(fields.clone())).map_err(|e| e.to_string())?;
o.validate()?;
@@ -73,24 +129,34 @@ fn choose(ui: &mut Ui, fields: &mut serde_json::Map<String, Value>, key: &str, l
});
changed
}
/// The Arrow Style dropdown: each style shows a drawn preview of its arrowhead before its name, in
/// the open list and in the closed field.
/// The Arrow Style dropdown: Filled, Open, Tick and None, then the other built-in stroke
/// arrowheads. Each style shows a drawn preview of its arrowhead before its name, in the open list
/// and in the closed field.
fn arrow_style(ui: &mut Ui, fields: &mut serde_json::Map<String, Value>, id: &str) -> bool {
const KEY: &str = "arrowStyle";
const STYLE: &str = "arrowStyle";
const HEAD: &str = "arrowHead";
let mut changed = false;
widgets::label_row(ui, tl!("Arrow Style:"), 96.0, |ui| {
let current = fields.get(KEY).and_then(Value::as_str).unwrap_or_default();
let shown = ARROWS.iter().position(|(v, _)| *v == current);
let names: Vec<&str> = ARROWS.iter().map(|(_, s)| tl!(*s)).collect();
let choices = arrow_choices();
let style = fields.get(STYLE).cloned().and_then(|v| serde_json::from_value::<ArrowStyle>(v).ok());
let head = fields.get(HEAD).and_then(built_in_head);
let current = style.map(|s| head.or_else(|| s.arrowhead()));
let shown = current.and_then(|c| choices.iter().position(|ch| ch.drawn() == c));
let names: Vec<&str> = choices.iter().map(|ch| crate::panels::stroke::builtin_arrow_name(ch.name)).collect();
let icon = |ui: &Ui, rect: egui::Rect, i: usize, ink: egui::Color32, _: bool| {
if let Some(style) = ARROW_STYLES.get(i) {
crate::panels::stroke::paint_arrow(ui, rect, style.arrowhead().as_ref(), false, ink);
// Only the rows in view render their previews.
if ui.is_rect_visible(rect)
&& let Some(ch) = choices.get(i)
{
crate::panels::stroke::paint_arrow(ui, rect, ch.drawn().as_ref(), false, ink);
}
};
if let Some((value, _)) =
widgets::dropdown_icon_names_sized(ui, ("dimension", id), shown, &names, 150.0, ARROW_PREVIEW, icon).and_then(|i| ARROWS.get(i))
if let Some(ch) =
widgets::dropdown_icon_names_sized(ui, ("dimension", id), shown, &names, 150.0, ARROW_PREVIEW, icon).and_then(|i| choices.get(i))
&& let (Ok(style), Ok(head)) = (serde_json::to_value(ch.style), serde_json::to_value(&ch.head))
{
fields.insert(KEY.into(), json!(value));
fields.insert(STYLE.into(), style);
fields.insert(HEAD.into(), head);
changed = true;
}
});
@@ -387,9 +453,13 @@ mod tests {
assert!(text.contains(label), "{label}: {text}");
}
let d = app.ui.dialog.as_mut().unwrap();
// The default style has no `arrowHead`, and the dialog still takes one.
assert!(!d.fields.contains_key("arrowHead") && super::super::accepts_field(d, "arrowHead"));
d.fields.insert("scale".into(), json!("1:10"));
d.fields.insert("units".into(), json!("pc"));
d.fields.insert("arrowHead".into(), json!("Barbed"));
super::super::confirm(&mut app).unwrap();
assert_eq!(app.session.tool_options_of("dimension")["style"]["arrowHead"], "Barbed");
assert_eq!(app.session.tool_options_of("dimension")["style"]["scale"], "1:10");
assert_eq!(app.session.tool_options_of("dimension")["style"]["units"], "pc");
open(&mut app).unwrap();
@@ -397,6 +467,28 @@ mod tests {
assert!(super::super::confirm(&mut app).is_err());
app.ui.dialog = None;
assert_eq!(app.session.tool_options_of("dimension")["style"]["scale"], "1:10");
// An arrow style set by `ui.dialog.set` replaces the Barbed head, as the menu does.
open(&mut app).unwrap();
super::super::set_field(app.ui.dialog.as_mut().unwrap(), "arrowStyle".into(), json!("none"));
super::super::confirm(&mut app).unwrap();
let style = serde_json::from_value::<DimensionOptions>(app.session.tool_options_of("dimension")["style"].clone()).unwrap();
assert_eq!((style.arrow_style, style.arrowhead()), (ArrowStyle::None, None));
// A stroke head set by `ui.dialog.set` keeps Filled as the arrow style, as the menu does; an
// unknown name leaves the arrow style as it was.
open(&mut app).unwrap();
let d = app.ui.dialog.as_mut().unwrap();
super::super::set_field(d, "arrowStyle".into(), json!("tick"));
super::super::set_field(d, "arrowHead".into(), json!("Nope"));
assert_eq!(d.fields["arrowStyle"], "tick");
super::super::set_field(d, "arrowHead".into(), json!("Barbed"));
super::super::confirm(&mut app).unwrap();
let style = serde_json::from_value::<DimensionOptions>(app.session.tool_options_of("dimension")["style"].clone()).unwrap();
assert_eq!((style.arrow_style, style.arrowhead()), (ArrowStyle::Filled, Some(Arrowhead::Barbed)));
// The head of an older style sets that style and no `arrowHead`, as its menu entry does.
open(&mut app).unwrap();
let d = app.ui.dialog.as_mut().unwrap();
super::super::set_field(d, "arrowHead".into(), json!("Slash"));
assert_eq!((&d.fields["arrowStyle"], &d.fields["arrowHead"]), (&json!("tick"), &Value::Null));
}
/// A selected dimension shows its style in Properties, with Apply to All and Set as Default.
@@ -436,7 +528,10 @@ mod tests {
let ctx = egui::Context::default();
crate::theme::install_fonts(&ctx);
ctx.run_ui(egui::RawInput::default(), |ui| f(app, ui)).textures_delta.clear();
ctx.run_ui(egui::RawInput::default(), |ui| f(app, ui))
let mut out = ctx.run_ui(egui::RawInput::default(), |ui| f(app, ui));
// Previews of rows that come into view in this frame load now.
out.textures_delta.clear();
out
}
/// The Arrow Style field of the Tool Options and of Properties shows the style's arrowhead,
@@ -454,12 +549,30 @@ mod tests {
assert!(picture_before(&out, "Tick"), "Properties");
}
/// Each Arrow Style entry previews the style its value names.
/// A dimension drawn with a stroke arrowhead shows that head's name and preview in its Arrow
/// Style field (#3222).
#[test]
fn arrow_previews_follow_the_listed_styles() {
assert_eq!(ARROWS.len(), ARROW_STYLES.len());
for ((value, _), style) in ARROWS.iter().zip(ARROW_STYLES) {
assert_eq!(serde_json::to_value(style).unwrap(), json!(value));
fn arrow_style_shows_a_stroke_arrowhead() {
let mut app = VectorcraftApp::new(vectorcraft_engine::Session::new(), Default::default());
app.run("file.new", json!({"width": 400, "height": 300})).unwrap();
app.run("dimension.create", json!({"a":[10,10],"b":[110,10],"options":{"arrowHead":"HalfArrowLeft"}})).unwrap();
let out = frame(&mut app, properties_section);
assert!(picture_before(&out, "Half Arrow (left)"), "Properties");
}
/// The Arrow Style list names each arrowhead once, with the four older styles first, and each
/// stroke arrowhead keeps Filled as its `arrowStyle`.
#[test]
fn arrow_style_list_names_each_style_once() {
let choices = arrow_choices();
let names: Vec<&str> = choices.iter().map(|c| c.name).collect();
assert_eq!(names[..4], ["Filled", "Open", "Tick", "None"]);
for name in ["Triangle", "Triangle (open)", "Slash"] {
assert!(!names.contains(&name), "{name} is listed as Filled, Open or Tick");
}
assert_eq!(names.len(), Arrowhead::ALL.len() + 1, "None and each built-in head: {names:?}");
let drawn: Vec<_> = choices.iter().map(|c| format!("{:?}", c.drawn())).collect();
assert_eq!(drawn.iter().collect::<std::collections::HashSet<_>>().len(), drawn.len(), "{drawn:?}");
assert!(choices[4..].iter().all(|c| c.style == ArrowStyle::Filled && c.head.is_some()));
}
}
File diff suppressed because it is too large. Load diff
+627 -50
View File
@@ -31,10 +31,17 @@
//! Color too. The base color can't be removed. A removed color's row goes, unless it has current
//! colors and art or a group is open: it then keeps them, with no new color, so that art keeps its
//! colors and the group's swatch at that place goes. Under the tools, a button switches both wheels
//! to hue and brightness (black at the center, full brightness at the edge, at the base color's
//! to hue and brightness (black at the center, full brightness at the edge, at the selected color's
//! saturation; a marker drag sets hue and brightness, Add Color adds the hue and brightness clicked
//! at the base color's saturation, and the slider under the wheel is a Saturation slider) and back;
//! switching changes no color, and the dialog opens on hue and saturation. With art, the Prominent Colors bar under the wheel shows the new
//! at the selected color's saturation, and the slider under the wheel is a Saturation slider) and
//! back; switching changes no color, and the dialog opens on hue and saturation. The base color is the one the harmony rules
//! build from, drawn with the larger marker; it stays the base when another color is selected for
//! the sliders. A right-click on a marker or a color bar offers Set As Base Color, Select Shade (a
//! grid of the color's hue at 7 saturations by 7 brightnesses; a click moves the marker there as a
//! drag would), Color Picker and Remove Color; a right-click elsewhere on the wheel offers Add New
//! Color, which adds the hue and saturation there as the Add Color tool does, and a color added on
//! the line from the center to a marker moves with that marker when the colors are unlinked. Set
//! Current Color As Base Color, before the color chips, makes the selected color the base. With art, the Prominent Colors bar under the wheel shows the new
//! colors, each part as wide as its row's share of the art's uses, the largest first; dragging the
//! edge between two parts moves width between them, and when the drag ends the rows' current
//! colors move toward those widths (`recolor.weigh`), and the art previews them. The New Color
@@ -78,7 +85,10 @@
//!
//! Fields (`ui.dialog.set`): `rows` ([{from: [keys], to: key, exclude?, tint?: percent of a spot
//! color, added?}]; a row with no current colors, `from: []`, recolors no art, and with `added: true`
//! (a color the Add Color tool added) adds its new color to the color group; `to: null`, no new color), `colors` (null: Auto, or a count), `method`, `preserveWhite`, `preserveBlack`,
//! (a color the Add Color tool added) adds its new color to the color group; `to: null`, no new color;
//! `base: true`, the base color, else the first color the Edit tab shows; `tie: n` on a marker and
//! `follows: n` on a color added on its line, which moves with it; the dialog sends `recolor.apply`
//! the rows without these three), `colors` (null: Auto, or a count), `method`, `preserveWhite`, `preserveBlack`,
//! `preserveGrays`, `limitTo` (library id, "document" for the document's swatches, "" for none),
//! `group`, `groupName`, `tab` (`assign` or `edit`), `rule` (harmony id), `linked`, `preview`,
//! `sliderMode` (`hsb`, `rgb`, `cmyk`, `lab` or `tint`; unset: the row color's own model, HSB for
@@ -213,7 +223,8 @@ pub fn open(app: &mut VectorcraftApp, p: &Value) -> Result<Value, String> {
None => String::new(),
};
// Without art the rows are the group's colours, as they are.
let start: Vec<Value> = if art { vec![] } else { assign.iter().map(|k| json!({"from": [k], "to": k})).collect() };
let mut start: Vec<Value> = if art { vec![] } else { assign.iter().map(|k| json!({"from": [k], "to": k})).collect() };
number_slots(&mut start);
// The Preserve checkboxes as they were last confirmed (#2960).
let kept = |k: &str, default: bool| app.ui.recolor_preserve.get(k).and_then(Value::as_bool).unwrap_or(default);
let fields = json!({
@@ -276,6 +287,7 @@ fn sync(app: &mut VectorcraftApp, d: &mut Dialog) {
for (row, to) in rows.iter_mut().zip(assign) {
row["to"] = to;
}
number_slots(&mut rows);
snap(app, d, &mut rows);
d.fields.insert("rows".into(), Value::Array(rows));
// Find dims the preserved colors with the rows that aren't selected.
@@ -335,7 +347,9 @@ fn sync_weights(app: &mut VectorcraftApp, d: &mut Dialog) {
match app.session.execute("recolor.weigh", &json!({"map": rows(d), "weights": w})) {
Ok(r) => {
if let Some(m) = r["map"].as_array() {
d.fields.insert("rows".into(), Value::Array(m.clone()));
let mut m = m.clone();
keep_marks(&rows(d), &mut m);
d.fields.insert("rows".into(), Value::Array(m));
}
}
Err(e) => app.status(e.to_string()),
@@ -451,14 +465,14 @@ fn group_colors<'a>(app: &VectorcraftApp, d: &Dialog, rs: impl Iterator<Item = &
}
/// The New Color Group menu's request: save the new colors of the rows that aren't excluded and
/// hold current colors or were added on the Edit tab (Save All Colors, in row order; a row without one gives its first current
/// color) or of the Prominent Colors bar (Save Prominent Colors, in its order) as a new color
/// group, a step of its own (`swatch.newGroup`).
/// hold current colors or were added on the Edit tab (Save All Colors, in row order) or of the
/// Prominent Colors bar (Save Prominent Colors, in its order) as a new color group, a step of its
/// own (`swatch.newGroup`). Either way a row whose new color was removed gives none.
fn save_group(app: &mut VectorcraftApp, d: &mut Dialog, which: &str) -> Result<(), String> {
let rs = rows(d);
let order: Vec<usize> = match which {
"prominent" => prominent_parts(d, &rs).into_iter().map(|p| p.0).collect(),
_ => (0..rs.len()).filter(|&i| in_group(&rs[i])).collect(),
"prominent" => prominent_parts(d, &rs).into_iter().map(|p| p.0).filter(|&i| to_color(&rs[i]).is_some()).collect(),
_ => (0..rs.len()).filter(|&i| in_group(&rs[i]) && to_color(&rs[i]).is_some()).collect(),
};
let colors = group_colors(app, d, order.iter().filter_map(|&i| rs.get(i)));
if colors.is_empty() {
@@ -541,6 +555,7 @@ fn select_group(app: &mut VectorcraftApp, d: &mut Dialog) -> Result<(), String>
d.fields.remove(REDUCED);
} else {
let mut rs: Vec<Value> = assign.iter().map(|k| json!({"from": [k], "to": k})).collect();
number_slots(&mut rs);
snap(app, d, &mut rs);
d.fields.insert("rows".into(), Value::Array(rs));
d.fields.insert("__sel".into(), json!([]));
@@ -601,7 +616,7 @@ fn group_action(app: &mut VectorcraftApp, d: &mut Dialog, action: &Value) -> Res
// An excluded row leaves its swatch the color it has now, as OK's `"keep"` does: with
// art, the swatch's color in `__assign`; without art, the swatch's color in the group,
// which an earlier Save Changes may have changed.
let filled: Vec<&Value> = rs.iter().filter(|r| !no_current(r)).collect();
let filled = by_place(&rs);
let rest: Vec<Value> =
p["groupColors"].as_array().map(|a| a.iter().skip(filled.len()).map(|k| json!({"from": [k], "to": k})).collect()).unwrap_or_default();
let assign: Vec<Value> =
@@ -1169,7 +1184,7 @@ fn apply_params(d: &Dialog) -> Value {
.chain(added)
.collect()
} else {
let filled: Vec<&Value> = rs.iter().filter(|r| !no_current(r)).collect();
let filled = by_place(&rs);
let rest = assign.get(filled.len()..).unwrap_or_default();
let took = filled.iter().map(|r| if excluded(r) { &keep } else { &r["to"] });
took.chain(rest).chain(added).collect()
@@ -1177,8 +1192,10 @@ fn apply_params(d: &Dialog) -> Value {
};
Some(json!({"group": g, "groupColors": colors, "rename": rename}))
});
// A row edited with the sliders carries `model: "new"`: its art takes the mode they showed.
let mut p = json!({"map": rs, "method": d.str("method"), "limitTo": d.str("limitTo")});
// A row edited with the sliders carries `model: "new"`: its art takes the mode they showed. The
// Edit tab's own marks (the base color, colors tied to a marker) stay in the dialog.
let map: Vec<Value> = rs.iter().map(without_marks).collect();
let mut p = json!({"map": map, "method": d.str("method"), "limitTo": d.str("limitTo")});
// The Global Adjust amounts, kept while the sliders show another mode; at 0% they are left out.
let values = adjust_values(d);
if values.iter().any(|v| *v != 0.0) {
@@ -1406,7 +1423,7 @@ fn main(app: &mut VectorcraftApp, ui: &mut Ui, d: &mut Dialog) -> Option<(usize,
}
let mut rs = rows(d);
let top = ui.cursor().top();
let (changed, pick) = if d.str("tab") == "edit" { (edit_tab(app, ui, d, &mut rs), None) } else { assign_tab(app, ui, d, &mut rs) };
let (changed, pick) = if d.str("tab") == "edit" { edit_tab(app, ui, d, &mut rs) } else { assign_tab(app, ui, d, &mut rs) };
if d.str("tab") != "edit" {
ui.add_space((TAB_H - (ui.cursor().top() - top)).max(0.0));
}
@@ -1663,7 +1680,7 @@ fn confirm(app: &mut VectorcraftApp, d: &Dialog) -> Result<Value, String> {
r?;
}
if d.bool("__newGroup") {
let colors = group_colors(app, &d, rows(&d).iter().filter(|r| in_group(r)));
let colors = group_colors(app, &d, rows(&d).iter().filter(|r| in_group(r) && to_color(r).is_some()));
let r = form::commit_preview(app, "swatch.newGroup", json!({"name": d.str("groupName"), "colors": colors, "keepModel": true}))?;
app.ui.recolor_history = History::default();
return Ok(r);
@@ -1897,7 +1914,9 @@ fn assign_tab(app: &mut VectorcraftApp, ui: &mut Ui, d: &mut Dialog, rows: &mut
let p = json!({"map": rows, "order": !sb, "saturationBrightness": sb, "seed": seed});
match app.session.execute("recolor.randomize", &p) {
Ok(r) => {
*rows = r["map"].as_array().cloned().unwrap_or_default();
let mut shuffled = r["map"].as_array().cloned().unwrap_or_default();
keep_marks(rows, &mut shuffled);
*rows = shuffled;
if !sb {
d.fields.insert(SHUFFLED.into(), json!(true));
}
@@ -2264,6 +2283,21 @@ fn merge(rows: &mut Vec<Value>, sel: &[usize]) {
for &i in rest.iter().rev() {
let row = rows.remove(i);
moved.splice(0..0, row["from"].as_array().cloned().unwrap_or_default());
// The base color merged into another row makes that row the base, and the colors that
// followed the merged row's marker follow that row's.
if row[BASE] == json!(true) {
rows[first][BASE] = json!(true);
}
if let Some(t) = row[TIE].as_u64() {
match rows[first][TIE].as_u64() {
Some(to) => {
for r in rows.iter_mut().filter(|r| r[FOLLOWS].as_u64() == Some(t)) {
r[FOLLOWS] = json!(to);
}
}
None => rows[first][TIE] = json!(t),
}
}
}
if let Some(dst) = rows[first]["from"].as_array_mut() {
dst.extend(moved);
@@ -2275,7 +2309,17 @@ fn separate(rows: &mut Vec<Value>, sel: &[usize]) {
let mut out = vec![];
for (i, row) in rows.drain(..).enumerate() {
match row["from"].as_array() {
Some(a) if sel.contains(&i) && a.len() > 1 => out.extend(a.iter().map(|k| json!({"from": [k], "to": k}))),
Some(a) if sel.contains(&i) && a.len() > 1 => {
let at = out.len();
out.extend(a.iter().map(|k| json!({"from": [k], "to": k})));
// A separated row's marks (the base color, a marker's tie, a color it follows, its place) go
// to the row of its first color.
for k in [BASE, TIE, FOLLOWS, SLOT] {
if let Some(v) = row.get(k) {
out[at][k] = v.clone();
}
}
}
_ => out.push(row),
}
}
@@ -2306,13 +2350,29 @@ fn edit_slider_row(d: &Dialog, rows: &[Value], active: &[usize], base: Option<us
}
/// Set row `i`'s new colour to hue/saturation/brightness `hsb` ([`move_on_wheel`]: with `linked`
/// the other rows keep their relation to it). Excluded rows stay.
/// the other rows keep their relation to it; unlinked, the colors added on its marker's line, which
/// follow its `tie`, and those that follow theirs, keep theirs). Excluded rows stay.
fn move_color(rows: &mut [Value], i: usize, hsb: [f32; 3], linked: bool) {
let active = active_rows(rows);
let all = active_rows(rows);
let active: Vec<usize> = if linked {
all
} else {
// Row `i` and the rows that follow it, directly or through another follower.
let mut moving = vec![i];
let mut n = 0;
while let Some(&j) = moving.get(n) {
if let Some(t) = rows.get(j).and_then(|r| r[TIE].as_u64()) {
let next: Vec<usize> = all.iter().copied().filter(|&k| rows[k][FOLLOWS].as_u64() == Some(t) && !moving.contains(&k)).collect();
moving.extend(next);
}
n += 1;
}
all.into_iter().filter(|j| moving.contains(j)).collect()
};
let Some(k) = active.iter().position(|&j| j == i) else { return };
let before: Vec<Color> = active.iter().filter_map(|&j| to_color(&rows[j])).collect();
let mut colors = before.clone();
move_on_wheel(&mut colors, k, hsb, linked);
move_on_wheel(&mut colors, k, hsb, true);
for ((&j, c), old) in active.iter().zip(&colors).zip(&before) {
if key(c) != key(old) {
set_to(&mut rows[j], c);
@@ -2337,7 +2397,7 @@ fn wheel_axes(d: &Dialog) -> widgets::WheelAxes {
/// The new color the Add Color tool gives a click at hue `h` (degrees) and `t`, the saturation (or
/// with [`widgets::WheelAxes::HueBrightness`] the brightness) clicked: with the other component of
/// `base` (the base color, whose other component the wheel shows; full without one), the segmented
/// `base` (the selected color, whose other component the wheel shows; full without one), the segmented
/// wheel's patch color with `segmented`, in `base`'s model.
fn added_color(base: Option<Color>, h: f32, t: f32, segmented: bool, axes: widgets::WheelAxes) -> Color {
let o = base.map_or(1.0, |b| b.to_hsb()[axes.other()]);
@@ -2391,16 +2451,244 @@ fn removed(d: &mut Dialog, base: usize) {
d.fields.remove(COMPS);
}
/// The Edit tab. Returns true when the rows changed.
fn edit_tab(app: &VectorcraftApp, ui: &mut Ui, d: &mut Dialog, rows: &mut Vec<Value>) -> bool {
/// A row's mark as the base color, the color the harmony rules build from (`true`).
const BASE: &str = "base";
/// A row's number on a marker that the colors added on its line follow.
const TIE: &str = "tie";
/// A row's mark as a color added on a marker's line: the marker's `tie`, which it moves with.
const FOLLOWS: &str = "follows";
/// A row's place when the rows were made (the group swatch it took), which it keeps when it moves.
const SLOT: &str = "slot";
/// Give each row its place in `rows` as its [`SLOT`].
fn number_slots(rows: &mut [Value]) {
for (i, r) in rows.iter_mut().enumerate() {
r[SLOT] = json!(i);
}
}
/// The rows with current colors in the order of their group swatches: each row takes the swatch at
/// its [`SLOT`], so a row moved among the color bars keeps its swatch; rows that don't all carry a
/// place go in row order.
fn by_place(rs: &[Value]) -> Vec<&Value> {
let mut filled: Vec<&Value> = rs.iter().filter(|r| !no_current(r)).collect();
if filled.iter().all(|r| r[SLOT].is_u64()) {
filled.sort_by_key(|r| r[SLOT].as_u64());
}
filled
}
/// The target of the wheel's right-click menu: `{marker, line, hs}` (row indexes and the hue and
/// saturation clicked).
const MENU_AT: &str = "__wheelMenu";
/// Select Shade's grid: saturations across, from 0% to 100%, and brightnesses down, from 100%.
const SHADE_COLS: usize = 7;
const SHADE_ROWS: usize = 7;
const SHADE_CELL: f32 = 16.0;
/// The base color's row: the row of `active` (the rows the Edit tab shows) marked `base`, else
/// the first of them.
fn base_row(rows: &[Value], active: &[usize]) -> Option<usize> {
active.iter().copied().find(|&i| rows[i][BASE] == json!(true)).or(active.first().copied())
}
/// Whether Set As Base Color would change anything for row `i`: it is shown on the Edit tab, and it
/// isn't the base already, or it is the base only because the marked row is hidden (excluded, or
/// with no new color), whose mark would make it the base again once shown.
fn can_set_base(rows: &[Value], i: usize) -> bool {
let active = active_rows(rows);
active.contains(&i) && (base_row(rows, &active) != Some(i) || rows.iter().enumerate().any(|(k, r)| k != i && r[BASE] == json!(true)))
}
/// Make row `i` the base color (Set As Base Color). Returns false when that changes nothing
/// ([`can_set_base`]).
fn set_base(rows: &mut [Value], i: usize) -> bool {
if !can_set_base(rows, i) {
return false;
}
for r in rows.iter_mut() {
if let Some(o) = r.as_object_mut() {
o.remove(BASE);
}
}
rows[i][BASE] = json!(true);
true
}
/// Make row `follower` move with the marker of row `leader`: the leader keeps its `tie` (a new
/// number, past every `tie` and `follows`, when it has none, so that colors left from a removed
/// marker follow no other) and the follower takes it as `follows`.
fn tie_to(rows: &mut [Value], leader: usize, follower: usize) {
if leader == follower || leader >= rows.len() || follower >= rows.len() {
return;
}
let used = rows.iter().flat_map(|r| [r[TIE].as_u64(), r[FOLLOWS].as_u64()]).flatten().max();
let t = rows[leader][TIE].as_u64().unwrap_or_else(|| used.map_or(1, |m| m.saturating_add(1)));
rows[leader][TIE] = json!(t);
rows[follower][FOLLOWS] = json!(t);
}
/// Give each row of `after` the base, tie and follows marks of the row at its place in `before`,
/// when the two have as many rows (the engine's `recolor.randomize` and `recolor.weigh` keep the
/// rows in order and return them without the dialog's own marks).
fn keep_marks(before: &[Value], after: &mut [Value]) {
if before.len() != after.len() {
return;
}
for (a, b) in after.iter_mut().zip(before) {
for k in [BASE, TIE, FOLLOWS, SLOT] {
if a.get(k).is_none()
&& let Some(v) = b.get(k)
{
a[k] = v.clone();
}
}
}
}
/// `row` without the dialog's base, tie, follows and place marks.
fn without_marks(row: &Value) -> Value {
let mut r = row.clone();
if let Some(o) = r.as_object_mut() {
for k in [BASE, TIE, FOLLOWS, SLOT] {
o.remove(k);
}
}
r
}
/// The saturation and brightness of Select Shade's cell in column `col` and row `row`.
fn shade_at(col: usize, row: usize) -> [f32; 2] {
[col as f32 / (SHADE_COLS - 1) as f32, 1.0 - row as f32 / SHADE_ROWS as f32]
}
/// Select Shade's grid of `c`'s hue, the cell nearest `c` framed. Returns the saturation and
/// brightness of the cell clicked.
fn shade_grid(ui: &mut Ui, c: &Color) -> Option<[f32; 2]> {
let t = Tokens::get(ui.ctx());
let [h, s0, v0] = c.to_hsb();
let near = ((s0 * (SHADE_COLS - 1) as f32).round() as usize, (((1.0 - v0) * SHADE_ROWS as f32).round() as usize).min(SHADE_ROWS - 1));
let mut out = None;
egui::Grid::new("recolor-shades").spacing([2.0, 2.0]).show(ui, |ui| {
for row in 0..SHADE_ROWS {
for col in 0..SHADE_COLS {
let [s, v] = shade_at(col, row);
let (r, resp) = ui.allocate_exact_size(vec2(SHADE_CELL, SHADE_CELL), Sense::click());
ui.painter().rect_filled(r, 1.0, c32(&Color::from_hsb(h, s, v)));
if (col, row) == near {
ui.painter().rect_stroke(r, 1.0, egui::Stroke::new(1.5, t.accent), egui::StrokeKind::Outside);
}
let name = format!("{} {}%, {} {}%", tl!("Saturation"), (s * 100.0).round(), tl!("Brightness"), (v * 100.0).round());
resp.widget_info(|| egui::WidgetInfo::labeled(egui::Role::Button, true, &name));
if resp.clicked() {
out = Some([s, v]);
ui.close();
}
}
ui.end_row();
}
});
out
}
/// What a marker's or a color bar's right-click menu, or the wheel's, chose.
enum MenuChoice {
/// Set As Base Color for the row.
Base(usize),
/// Select Shade: the row's color at this saturation and brightness.
Shade(usize, [f32; 2]),
/// Color Picker for the row.
Picker(usize),
/// Remove Color for the row.
Remove(usize),
/// Add New Color at this hue and saturation, moving with the marker of the row on whose line
/// it is.
Add([f32; 2], Option<usize>),
}
/// A marker's or a color bar's right-click menu for row `i`: Set As Base Color and Remove Color
/// (neither for the base color `base`), Select Shade and Color Picker.
fn color_menu(ui: &mut Ui, rows: &[Value], i: usize, base: Option<usize>) -> Option<MenuChoice> {
let mut choice = None;
if widgets::menu_item_name(ui, tl!("Set As Base Color"), can_set_base(rows, i), false) {
choice = Some(MenuChoice::Base(i));
}
if let Some(c) = rows.get(i).and_then(to_color) {
// Indented like the items beside it (their check column).
ui.menu_button(format!(" {}", tl!("Select Shade")), |ui| {
if let Some(sv) = shade_grid(ui, &c) {
choice = Some(MenuChoice::Shade(i, sv));
}
});
}
if widgets::menu_item_name(ui, tl!("Color Picker"), true, false) {
choice = Some(MenuChoice::Picker(i));
}
if widgets::menu_item_name(ui, tl!("Remove Color"), Some(i) != base, false) {
choice = Some(MenuChoice::Remove(i));
}
choice
}
/// Carry out a right-click menu's `choice` on the rows (`base`: the base color's row; `shown`: the
/// color whose brightness the wheel shows; `segmented`: the menu was on the segmented wheel).
/// Returns whether the rows changed and the row whose new color the Color Picker is to edit.
fn choose(
d: &mut Dialog,
rows: &mut Vec<Value>,
choice: MenuChoice,
base: Option<usize>,
shown: Option<Color>,
segmented: bool,
axes: widgets::WheelAxes,
) -> (bool, Option<usize>) {
match choice {
MenuChoice::Base(i) => (set_base(rows, i), None),
MenuChoice::Shade(i, [s, v]) => {
let Some(h) = rows.get(i).and_then(to_color).map(|c| c.to_hsb()[0]) else { return (false, None) };
let before = rows.clone();
move_color(rows, i, [h, s, v], d.bool("linked"));
d.fields.insert("__sel".into(), json!([i]));
d.fields.remove(COMPS);
(*rows != before, None)
}
MenuChoice::Picker(i) => {
d.fields.insert("__sel".into(), json!([i]));
(false, Some(i))
}
MenuChoice::Remove(i) => match remove_color(rows, i, base, keeps_rows(d)) {
Some(b) => {
removed(d, b);
(true, None)
}
None => (false, None),
},
MenuChoice::Add([h, s], line) => {
let i = add_color(rows, &added_color(shown, h, s, segmented, axes));
if let Some(l) = line {
tie_to(rows, l, i);
}
d.fields.insert("__sel".into(), json!([i]));
d.fields.remove(COMPS);
(true, None)
}
}
}
/// The Edit tab. Returns whether the rows changed and the row whose new color a right-click menu's
/// Color Picker is to edit.
fn edit_tab(app: &VectorcraftApp, ui: &mut Ui, d: &mut Dialog, rows: &mut Vec<Value>) -> (bool, Option<(usize, bool)>) {
let top = ui.cursor().top();
let t = Tokens::get(ui.ctx());
let mut changed = false;
let mut pick = None;
let linked = d.bool("linked");
let active = active_rows(rows);
let base = selection(d).into_iter().find(|i| active.contains(i)).or(active.first().copied());
let slider_row = edit_slider_row(d, rows, &active, base);
let target = SliderTarget::at(app, d, rows, slider_row);
// The harmony rules build from the base color; the sliders and the Brightness slider edit the
// selected color (the base color when the tab does not show the first selected row).
let base = base_row(rows, &active);
let sel = edit_slider_row(d, rows, &active, base);
let target = SliderTarget::at(app, d, rows, sel);
ui.horizontal(|ui| {
ui.label(egui::RichText::new(tl!("Harmony Rules:")).color(t.text_dim));
let rule = Harmony::parse(&d.str("rule")).unwrap_or(Harmony::Complementary);
@@ -2421,9 +2709,9 @@ fn edit_tab(app: &VectorcraftApp, ui: &mut Ui, d: &mut Dialog, rows: &mut Vec<Va
}
// New Color Group: save the wheel's colors or the Prominent Colors as a color group.
let button = widgets::icon_button(ui, "dc-folder", tl!("New Color Group"), false, 24.0);
let prominent = d.bool("__art") && !prominent_parts(d, rows).is_empty();
let prominent = d.bool("__art") && prominent_parts(d, rows).iter().any(|p| rows.get(p.0).and_then(to_color).is_some());
let saved = egui::Popup::menu(&button).show(|ui| {
if widgets::menu_item_name(ui, tl!("Save All Colors"), rows.iter().any(in_group), false) {
if widgets::menu_item_name(ui, tl!("Save All Colors"), rows.iter().any(|r| in_group(r) && to_color(r).is_some()), false) {
return Some("all");
}
widgets::menu_item_name(ui, tl!("Save Prominent Colors"), prominent, false).then_some("prominent")
@@ -2445,6 +2733,9 @@ fn edit_tab(app: &VectorcraftApp, ui: &mut Ui, d: &mut Dialog, rows: &mut Vec<Va
}
let colors: Vec<Color> = active.iter().filter_map(|&i| to_color(&rows[i])).collect();
let marked = base.and_then(|b| active.iter().position(|&i| i == b));
let selected = sel.and_then(|s| active.iter().position(|&i| i == s));
let shown = sel.and_then(|s| to_color(&rows[s]));
let mut choice = None;
let display = d.str("display");
let tool = d.str(WHEEL_TOOL);
let axes = wheel_axes(d);
@@ -2482,15 +2773,56 @@ fn edit_tab(app: &VectorcraftApp, ui: &mut Ui, d: &mut Dialog, rows: &mut Vec<Va
}
});
ui.vertical(|ui| match display.as_str() {
"bars" => changed |= color_bars(ui, d, rows, &active, base),
_ => w = widgets::wheel_of(ui, "recolor-wheel", WHEEL, &colors, marked, display == "segmented", axes),
"bars" => {
let (moved, chosen) = color_bars(ui, d, rows, &active, base);
changed |= moved;
choice = chosen;
}
_ => w = widgets::recolor_wheel(ui, "recolor-wheel", WHEEL, &colors, marked, selected, display == "segmented", axes),
});
});
// A right-click on the wheel: a marker's menu, or Add New Color elsewhere. Its target is kept
// while the menu stays open.
if let Some((hit, line, hs)) = w.secondary {
d.fields.insert(MENU_AT.into(), json!({"marker": hit.map(|k| active[k]), "line": line.map(|k| active[k]), "hs": hs}));
} else if w.response.as_ref().is_some_and(egui::Response::secondary_clicked) {
// A right-click off the wheel (in a corner of its square) targets nothing: its menu's Add
// New Color is off, and no earlier marker is changed.
d.fields.remove(MENU_AT);
}
if let Some(resp) = &w.response {
let at = d.fields.get(MENU_AT).cloned().unwrap_or_default();
let row = |k: &str| at[k].as_u64().map(|i| i as usize).filter(|i| active.contains(i));
let hs = at["hs"].as_array().and_then(|a| Some([a.first()?.as_f64()? as f32, a.get(1)?.as_f64()? as f32]));
resp.context_menu(|ui| match row("marker") {
Some(i) => choice = color_menu(ui, rows, i, base),
None => {
if widgets::menu_item_name(ui, tl!("Add New Color"), hs.is_some(), false)
&& let Some(hs) = hs
{
choice = Some(MenuChoice::Add(hs, row("line")));
}
}
});
}
// A menu's choice changes the rows the wheel's indexes were for, so the wheel's own clicks and
// drags of this frame are left alone.
let chosen = choice.is_some();
if let Some(c) = choice {
let (did, picked) = choose(d, rows, c, base, shown, display == "segmented", axes);
changed |= did;
pick = picked.map(|i| (i, false));
}
if chosen {
w.pressed = None;
w.moved = None;
w.clicked = None;
}
// A click with a wheel tool adds a color there, or removes the color of the marker clicked.
let clicked = w.clicked.filter(|_| on_wheel && matches!(tool.as_str(), "add" | "remove"));
if let Some((hit, [h, out])) = clicked {
if tool == "add" {
let c = added_color(base.and_then(|b| to_color(&rows[b])), h, out, display == "segmented", axes);
let c = added_color(shown, h, out, display == "segmented", axes);
let i = add_color(rows, &c);
d.fields.insert("__sel".into(), json!([i]));
d.fields.remove(COMPS);
@@ -2534,43 +2866,57 @@ fn edit_tab(app: &VectorcraftApp, ui: &mut Ui, d: &mut Dialog, rows: &mut Vec<Va
}
// A color added or removed above changed the rows, so the sliders and chips read them afresh.
let active = active_rows(rows);
let base = selection(d).into_iter().find(|i| active.contains(i)).or(active.first().copied());
let base = base_row(rows, &active);
let sel = edit_slider_row(d, rows, &active, base);
if d.str("sliderMode") == GLOBAL {
let sample = base.and_then(|b| to_color(&rows[b])).unwrap_or(Color::rgb(0.8, 0.45, 0.25));
let sample = sel.and_then(|b| to_color(&rows[b])).unwrap_or(Color::rgb(0.8, 0.45, 0.25));
global_sliders(ui, d, sample);
} else {
changed |= sliders(app, ui, d, rows, slider_row);
changed |= sliders(app, ui, d, rows, sel);
}
// The new colours: click one to make it the base colour.
// The new colours: click one to select it; Set Current Color As Base Color, before them, makes
// the selected one the base color, which carries a double ring as its marker does.
let min_height = (TAB_H - (ui.cursor().top() - top)).max(0.0);
let mut make_base = None;
super::modal::scrolled_rows(ui, "recolor-edit-colors", |ui| {
// Keep the usual tab height when it fits; the empty space scrolls with the chips.
ui.set_min_height(min_height);
ui.horizontal_wrapped(|ui| {
let can = sel.is_some_and(|s| can_set_base(rows, s));
if widgets::icon_button_enabled(ui, "circle-dot", tl!("Set Current Color As Base Color"), false, can, 20.0).clicked() {
make_base = sel;
}
for &i in &active {
let (r, resp) = ui.allocate_exact_size(vec2(28.0, 20.0), Sense::click());
chip(ui, r, to_color(&rows[i]).unwrap_or_default(), false);
if Some(i) == base {
if Some(i) == sel {
ui.painter().rect_stroke(r.expand(1.5), 2.0, egui::Stroke::new(1.5, t.accent), egui::StrokeKind::Outside);
}
if Some(i) == base {
ui.painter().circle_stroke(r.center(), 4.0, egui::Stroke::new(1.5, egui::Color32::WHITE));
ui.painter().circle_stroke(r.center(), 5.5, egui::Stroke::new(1.0, egui::Color32::BLACK));
}
if resp.on_hover_text(rows[i]["to"].as_str().unwrap_or_default()).clicked() {
d.fields.insert("__sel".into(), json!([i]));
}
}
});
});
changed
if let Some(i) = make_base {
changed |= set_base(rows, i);
}
(changed, pick)
}
/// The Edit tab's color bars: a solid bar per row of `active` with its new color, in row order, the
/// base row's framed, scrolling past the wheel's height. A click on a bar selects its row (the
/// sliders under it edit that row's new color); a drag moves the bar's row to where the line under
/// the pointer shows, keeping every new color. A bar's right-click menu has Remove Color (not for the
/// base row's). Returns true when the rows moved or a color was removed.
fn color_bars(ui: &mut Ui, d: &mut Dialog, rows: &mut Vec<Value>, active: &[usize], base: Option<usize>) -> bool {
/// the pointer shows, keeping every new color. A bar's right-click menu is a marker's
/// ([`color_menu`]). Returns true when the rows moved, and the menu's choice.
fn color_bars(ui: &mut Ui, d: &mut Dialog, rows: &mut [Value], active: &[usize], base: Option<usize>) -> (bool, Option<MenuChoice>) {
let t = Tokens::get(ui.ctx());
let mut rects: Vec<Rect> = Vec::with_capacity(active.len());
let (mut dragging, mut released, mut dropped, mut remove) = (None, None, None, None);
let (mut dragging, mut released, mut dropped, mut choice) = (None, None, None, None);
// The area is given its full height first: in the row beside the display buttons a scroll area
// alone is only as tall as the room the row has.
let area = vec2(ui.available_width(), BARS_H);
@@ -2603,8 +2949,8 @@ fn color_bars(ui: &mut Ui, d: &mut Dialog, rows: &mut Vec<Value>, active: &[usiz
rects.push(r);
let resp = resp.on_hover_text(rows[i]["to"].as_str().unwrap_or_default());
resp.context_menu(|ui| {
if widgets::menu_item_name(ui, tl!("Remove Color"), Some(i) != base, false) {
remove = Some(i);
if let Some(c) = color_menu(ui, rows, i, base) {
choice = Some(c);
}
});
}
@@ -2621,15 +2967,14 @@ fn color_bars(ui: &mut Ui, d: &mut Dialog, rows: &mut Vec<Value>, active: &[usiz
dropped = released.zip(at);
});
});
if let Some(b) = remove.and_then(|i| remove_color(rows, i, base, keeps_rows(d))) {
removed(d, b);
return true;
if choice.is_some() {
return (false, choice);
}
let Some(moved) = dropped.and_then(|(n, to)| move_bar(rows, active, n, to)) else { return false };
let Some(moved) = dropped.and_then(|(n, to)| move_bar(rows, active, n, to)) else { return (false, None) };
d.fields.insert("__sel".into(), json!([moved]));
// The slider values held are those of a row index that may now hold another row.
d.fields.remove(COMPS);
true
(true, None)
}
/// Move the row of the `from`th active row (of `active`, ascending row indexes) to before the
@@ -2790,6 +3135,67 @@ mod tests {
assert_eq!(apply_params(&d)["groupColors"], json!(["rgb 1 1 1", null, "rgb 3 3 3"]));
}
/// An excluded row with current colors keeps the group's swatch at its place as it is, even
/// after its new color was edited or removed, and with Global Adjust on.
#[test]
fn an_excluded_row_keeps_its_group_swatch() {
let mut d = Dialog::new(KIND, json!({"group": "G", "groupName": "G", "__art": true, "__assign": ["rgb 1 1 1", "rgb 2 2 2", "rgb 3 3 3"]}));
let rs = json!([
{"from": ["rgb 255 0 0"], "to": "rgb 7 7 7", "exclude": true},
{"from": ["rgb 0 0 255"], "to": null, "exclude": true},
{"from": ["rgb 0 255 0"], "to": "rgb 8 8 8"},
]);
d.fields.insert("rows".into(), rs);
assert_eq!(apply_params(&d)["groupColors"], json!(["keep", "keep", "rgb 8 8 8"]));
// Without art the rows are the group's colors.
let mut app = VectorcraftApp::new(vectorcraft_engine::Session::new(), Default::default());
app.run("file.new", json!({"width": 100, "height": 100})).unwrap();
app.run("swatch.newGroup", json!({"name": "G", "colors": ["#2878f0", "#ff0000"]})).unwrap();
app.run("ui.recolorDialog", json!({"group": "G"})).unwrap();
let mut d = app.ui.dialog.clone().unwrap();
let mut rs = super::rows(&d);
rs[0]["to"] = json!("#00ff00");
rs[0]["exclude"] = json!(true);
rs[1]["to"] = json!("#0000ff");
d.fields.insert("rows".into(), json!(rs));
d.fields.insert("globalAdjust".into(), json!({"brightness": -50}));
confirm(&mut app, &d).unwrap();
let g = app.session.doc().unwrap().doc.swatch_groups.iter().find(|g| g.name == "G").unwrap();
let hex: Vec<String> = g.swatches.iter().map(|w| w.paint.color().unwrap().to_hex()).collect();
assert_eq!(hex[0], "#2878f0", "{hex:?}");
assert_ne!(hex[1], "#ff0000", "{hex:?}");
}
/// A row moved among the color bars keeps the group swatch it took when the rows were made, so
/// an excluded row's swatch stays as it is and the other swatches keep their places.
#[test]
fn a_moved_row_keeps_its_group_swatch() {
let mut app = VectorcraftApp::new(vectorcraft_engine::Session::new(), Default::default());
app.run("file.new", json!({"width": 100, "height": 100})).unwrap();
app.run("swatch.newGroup", json!({"name": "G", "colors": ["#ff0000", "#0000ff", "#00ff00"]})).unwrap();
app.run("ui.recolorDialog", json!({"group": "G"})).unwrap();
let mut d = app.ui.dialog.clone().unwrap();
let mut rs = super::rows(&d);
rs[1]["exclude"] = json!(true);
rs[2]["to"] = json!("#ffff00");
let active = active_rows(&rs);
assert_eq!(active, [0, 2]);
// Drag the last bar (green, now yellow) above the first (red).
assert_eq!(move_bar(&mut rs, &active, 1, 0), Some(0));
d.fields.insert("rows".into(), json!(rs));
let colors = &apply_params(&d)["groupColors"];
assert_eq!(colors[1], json!("keep"), "{colors}");
confirm(&mut app, &d).unwrap();
let g = app.session.doc().unwrap().doc.swatch_groups.iter().find(|g| g.name == "G").unwrap();
let hex: Vec<String> = g.swatches.iter().map(|w| w.paint.color().unwrap().to_hex()).collect();
assert_eq!(hex, ["#ff0000", "#0000ff", "#ffff00"]);
// Rows reduced from art carry their place too, and `recolor.apply` gets none.
let mut rows = vec![json!({"from": ["rgb 255 0 0"], "to": "rgb 1 1 1"}), json!({"from": ["rgb 0 0 255"], "to": "rgb 2 2 2"})];
number_slots(&mut rows);
assert_eq!(rows.iter().map(|r| r[SLOT].clone()).collect::<Vec<_>>(), [json!(0), json!(1)]);
assert!(without_marks(&rows[0]).get(SLOT).is_none());
}
#[test]
fn merge_and_separate_rows() {
let mut r = rows();
@@ -2927,6 +3333,117 @@ mod tests {
assert_eq!([&r[0]["to"], &r[1]["to"], &r[2]["to"]], ["rgb 255 0 0", "rgb 0 255 0", "rgb 0 0 255"]);
}
/// The base color is the row marked `base`, else the first row shown; Set As Base Color moves the
/// mark, and does nothing for the base row already or a row the Edit tab doesn't show.
#[test]
fn set_base_moves_the_base_mark() {
let mut r = rows();
assert_eq!(base_row(&r, &active_rows(&r)), Some(0));
assert!(!set_base(&mut r, 0), "the first row is the base already");
assert!(set_base(&mut r, 2));
assert_eq!(base_row(&r, &active_rows(&r)), Some(2));
assert!(set_base(&mut r, 1));
assert_eq!(r.iter().filter(|x| x[BASE] == json!(true)).count(), 1, "one base mark: {r:?}");
assert!(!set_base(&mut r, 1));
r[2]["exclude"] = json!(true);
assert!(!set_base(&mut r, 2), "an excluded row isn't shown");
assert!(!set_base(&mut r, 9));
// An excluded base row leaves the first row shown as the base.
r[1]["exclude"] = json!(true);
assert_eq!(base_row(&r, &active_rows(&r)), Some(0));
// Setting that row as the base keeps it the base once the marked row is shown again.
assert!(set_base(&mut r, 0), "the hidden row's mark moves to it");
r[1]["exclude"] = json!(false);
assert_eq!(base_row(&r, &active_rows(&r)), Some(0), "{r:?}");
}
/// Merge and Separate keep the base mark on a row of the base color's colors; Randomize's rows
/// (as the engine returns them) take the marks at their places again; `recolor.apply` gets no marks.
#[test]
fn the_base_mark_follows_merge_separate_and_randomize() {
let mut r = rows();
set_base(&mut r, 2);
merge(&mut r, &[0, 2]);
assert_eq!(r[0][BASE], json!(true), "merged into the first row: {r:?}");
let mut r = rows();
set_base(&mut r, 1);
separate(&mut r, &[1]);
assert_eq!(r.len(), 4);
assert_eq!((r[1][BASE].clone(), r[2].get(BASE)), (json!(true), None), "{r:?}");
// A marker's tie goes with it too.
let mut t = rows();
t[1][TIE] = json!(1);
separate(&mut t, &[1]);
assert_eq!((t[1][TIE].clone(), t[2].get(TIE)), (json!(1), None));
let mut t = rows();
t[0][TIE] = json!(1);
t[2][TIE] = json!(3);
t.push(json!({"from": [], "to": "rgb 1 2 3", "follows": 3}));
merge(&mut t, &[0, 2]);
assert_eq!((t[0][TIE].clone(), t[2][FOLLOWS].clone()), (json!(1), json!(1)), "its follower follows the row merged into: {t:?}");
let before = r.clone();
let mut shuffled: Vec<Value> = r.iter().map(without_marks).collect();
assert!(shuffled.iter().all(|x| x.get(BASE).is_none()));
keep_marks(&before, &mut shuffled);
assert_eq!(shuffled, before);
let mut fewer = vec![json!({"from": [], "to": "rgb 1 1 1"})];
keep_marks(&before, &mut fewer);
assert!(fewer[0].get(BASE).is_none(), "rows of another count take no marks");
let mut d = Dialog::new(KIND, json!({}));
d.fields.insert("rows".into(), json!(before));
assert!(apply_params(&d)["map"].as_array().unwrap().iter().all(|x| x.get(BASE).is_none()));
}
/// A color added on a marker's line moves with that marker when the colors are unlinked; it
/// moves alone itself, and linked colors all move together as before.
#[test]
fn a_color_added_on_a_markers_line_moves_with_it() {
let hue = |r: &[Value], i: usize| to_color(&r[i]).unwrap().to_hsb()[0];
let mut r = rows();
let added = add_color(&mut r, &Color::from_hsb(240.0, 0.5, 1.0));
tie_to(&mut r, 1, added);
assert_eq!((r[1][TIE].clone(), r[added][FOLLOWS].clone()), (json!(1), json!(1)));
move_color(&mut r, 1, [270.0, 1.0, 1.0], false);
assert!((hue(&r, added) - 270.0).abs() < 0.5, "the added color turns with its marker: {}", hue(&r, added));
assert!((hue(&r, 0) - 0.0).abs() < 0.5 && (hue(&r, 2) - 120.0).abs() < 0.5, "the others stay");
move_color(&mut r, added, [300.0, 0.5, 1.0], false);
assert!((hue(&r, 1) - 270.0).abs() < 0.5, "its marker stays");
// A second color tied to the same marker shares its number.
let next = add_color(&mut r, &Color::from_hsb(270.0, 0.2, 1.0));
tie_to(&mut r, 1, next);
assert_eq!(r[next][FOLLOWS], json!(1));
let other = add_color(&mut r, &Color::from_hsb(0.0, 0.2, 1.0));
tie_to(&mut r, 0, other);
assert_eq!(r[0][TIE], json!(2), "another marker takes a new number");
tie_to(&mut r, 0, 0);
assert!(r[0].get(FOLLOWS).is_none(), "a row isn't tied to itself");
// Colors left from a removed marker follow no marker tied later.
let mut r = rows();
let added = add_color(&mut r, &Color::from_hsb(240.0, 0.5, 1.0));
tie_to(&mut r, 1, added);
r.remove(1);
let next = add_color(&mut r, &Color::from_hsb(0.0, 0.5, 1.0));
tie_to(&mut r, 0, next);
assert_eq!(r[0][TIE], json!(2), "{r:?}");
// A color added on an added color's line moves with the first marker too.
let mut r = rows();
let added = add_color(&mut r, &Color::from_hsb(240.0, 0.5, 1.0));
tie_to(&mut r, 1, added);
let chained = add_color(&mut r, &Color::from_hsb(240.0, 0.25, 1.0));
tie_to(&mut r, added, chained);
move_color(&mut r, 1, [250.0, 1.0, 1.0], false);
assert!((hue(&r, chained) - 250.0).abs() < 0.5, "{r:?}");
}
/// Select Shade's grid runs from 0% to 100% saturation across and from 100% brightness down.
#[test]
fn the_shade_grid_spans_saturation_and_brightness() {
assert_eq!(shade_at(0, 0), [0.0, 1.0]);
assert_eq!(shade_at(SHADE_COLS - 1, 0)[0], 1.0);
let last = shade_at(0, SHADE_ROWS - 1)[1];
assert!(last > 0.0 && last < 0.2, "{last}");
}
/// A row made with New Row is not on the Edit tab while it is empty: a harmony rule gives it
/// no color and a linked move leaves its new color as it is.
#[test]
@@ -3407,6 +3924,41 @@ mod tests {
assert_eq!(app.session.doc().unwrap().history.undo.len(), undo + 2, "a step for each group");
}
/// A color removed on the Edit tab leaves its row with no new color, and neither Save All
/// Colors, Save Prominent Colors nor OK on colors opened alone puts the row's current color in
/// the new color group.
#[test]
fn a_removed_color_joins_no_saved_color_group() {
let mut app = VectorcraftApp::new(vectorcraft_engine::Session::new(), Default::default());
let ctx = egui::Context::default();
prominent_setup(&mut app, &ctx);
let last = |app: &VectorcraftApp| -> Vec<String> {
let doc = &app.session.doc().unwrap().doc;
doc.swatch_groups.last().unwrap().swatches.iter().map(|w| w.paint.color().unwrap().to_hex()).collect()
};
let d = app.ui.dialog.as_mut().unwrap();
d.fields.insert("rows".into(), json!([{"from": [BLUE], "to": null}, {"from": [RED, PURPLE], "to": "rgb 0 255 0"}]));
d.fields.insert(SAVE_GROUP.into(), json!("all"));
frame(&mut app, &ctx, 0.1, vec![], 0);
frame(&mut app, &ctx, 0.11, vec![], 0);
assert_eq!(last(&app), ["#00ff00"], "Save All Colors");
let n = app.session.doc().unwrap().doc.swatch_groups.len();
app.ui.dialog.as_mut().unwrap().fields.insert(SAVE_GROUP.into(), json!("prominent"));
frame(&mut app, &ctx, 0.2, vec![], 0);
frame(&mut app, &ctx, 0.21, vec![], 0);
assert_eq!(app.session.doc().unwrap().doc.swatch_groups.len(), n + 1, "Save Prominent Colors makes a group");
assert_eq!(last(&app), ["#00ff00"], "Save Prominent Colors");
let mut app = VectorcraftApp::new(vectorcraft_engine::Session::new(), Default::default());
app.run("file.new", json!({"width": 100, "height": 100})).unwrap();
app.run("ui.recolorDialog", json!({"colors": ["#ff0000", "#0000ff"]})).unwrap();
let d = app.ui.dialog.as_mut().unwrap();
d.fields.insert("rows".into(), json!([{"from": ["rgb 255 0 0"], "to": "rgb 255 0 0"}, {"from": ["rgb 0 0 255"], "to": null}]));
let d = d.clone();
confirm(&mut app, &d).unwrap();
assert_eq!(last(&app), ["#ff0000"], "OK on colors opened alone");
}
/// Save All Colors leaves out a row made with New Row while it is empty; with only empty rows
/// it saves no group and records no step.
#[test]
@@ -3794,6 +4346,31 @@ mod tests {
assert_eq!(group_hex(&app, "A"), Some(vec!["#ff0000".into(), "#00ff00".into()]), "other groups are left as they are");
}
/// Without art: rows of a group picked in the list keep their swatches when a color bar moves,
/// at OK and at Save Changes, and an excluded row's swatch stays as it is.
#[test]
fn a_moved_row_of_a_listed_group_keeps_its_swatch_at_save_changes() {
let mut app = VectorcraftApp::new(vectorcraft_engine::Session::new(), Default::default());
let ctx = egui::Context::default();
crate::theme::install_fonts(&ctx);
app.run("file.new", json!({"width": 100, "height": 100})).unwrap();
app.run("swatch.newGroup", json!({"name": "A", "colors": ["#000000"], "keepModel": true})).unwrap();
app.run("swatch.newGroup", json!({"name": "G", "colors": ["#ff0000", "#0000ff", "#00ff00"], "keepModel": true})).unwrap();
app.run("ui.recolorDialog", json!({"group": "A"})).unwrap();
set(&mut app, "group", json!("G")).unwrap();
let d = app.ui.dialog.as_mut().unwrap();
let mut rs = super::rows(d);
rs[1]["exclude"] = json!(true);
rs[2]["to"] = json!("#ffff00");
let active = active_rows(&rs);
// Drag the last bar (green, now yellow) above the first (red).
assert_eq!(move_bar(&mut rs, &active, 1, 0), Some(0));
d.fields.insert("rows".into(), Value::Array(rs));
assert_eq!(apply_params(d)["groupColors"][1], json!("keep"));
act(&mut app, &ctx, 0.1, "save").unwrap();
assert_eq!(group_hex(&app, "G"), Some(vec!["#ff0000".into(), "#0000ff".into(), "#ffff00".into()]));
}
/// Without art: selecting another color group in the list and Save Changes leave Undo Changes
/// and Redo Changes no step to go to, so OK gives the selected group the rows read for it.
#[test]
+20 -1
View File
@@ -232,7 +232,7 @@ pub(crate) fn browser_preview(app: &mut VectorcraftApp, p: &Value) -> Result<Val
o.insert("path".into(), json!(path));
o.insert("output".into(), json!("html"));
}
let r = app.run("document.exportForWeb", q)?;
let r = app.run("document.exportForWeb", q).inspect_err(|_| remove_preview_folder(&dir))?;
app.open_url(&io::file_url(&path));
if has_warnings(&r) {
io::report_saved(app, &path, &r);
@@ -257,9 +257,28 @@ fn temp_folder() -> Result<String, String> {
/// `root` ([`preview_folder_under`]).
#[cfg(not(target_arch = "wasm32"))]
pub(super) fn temp_folder_under(root: &str) -> Result<String, String> {
#[cfg(test)]
if let Some(tmp) = TEST_TMP.with_borrow(Clone::clone) {
return preview_folder_under(&tmp, root, PREVIEW_KEEP);
}
preview_folder_under(&std::env::temp_dir(), root, PREVIEW_KEEP)
}
#[cfg(all(test, not(target_arch = "wasm32")))]
thread_local! {
/// The folder this test thread's browser previews go to instead of the system's temporary
/// folder, when set.
pub(super) static TEST_TMP: std::cell::RefCell<Option<std::path::PathBuf>> = const { std::cell::RefCell::new(None) };
}
/// Remove the folder `dir` made for a browser preview whose files could not all be written, so
/// a failed preview leaves no folder behind. The log says when it can't be removed.
pub(super) fn remove_preview_folder(dir: &str) {
if let Err(e) = std::fs::remove_dir_all(dir) {
log::warn!("vectorcraft: the browser preview folder {dir} can't be removed: {e}");
}
}
/// A new folder for a Save for Web browser preview in the temporary folder `tmp`
/// ([`preview_folder_under`] with `VectorCraft Save for Web`).
#[cfg(all(test, not(target_arch = "wasm32")))]
+30 -4
View File
@@ -354,7 +354,8 @@ fn encode_page<'a>(
/// the default browser (desktop) → `{path, warnings}`. Nothing is written to the chosen
/// destination, and the document, its path and the remembered choices are left as they were.
/// When the export has warnings, the status bar shows them as [`io::report_saved`] shows a save's
/// notes. Nothing opens when a check, the encoding or a write fails.
/// notes. Nothing opens when a check, the encoding or a write fails, and a failed write removes
/// the new folder.
pub(crate) fn browser_preview(app: &mut VectorcraftApp, p: &Value) -> Result<Value, String> {
if io::is_web(app) {
return Err("no file system here".into());
@@ -370,7 +371,7 @@ pub(crate) fn browser_preview(app: &mut VectorcraftApp, p: &Value) -> Result<Val
let target = format!("{dir}/{}.svg", super::save_for_web::preview_name(&stem));
let named = enc.named(&doc, &target);
for (p, bytes) in &named {
io::write_to(&mut app.services, p, bytes)?;
io::write_to(&mut app.services, p, bytes).inspect_err(|_| super::save_for_web::remove_preview_folder(&dir))?;
}
(named.first().map_or(target, |(p, _)| p.clone()), enc.notes())
};
@@ -480,8 +481,12 @@ mod tests {
type Opened = Rc<RefCell<Vec<String>>>;
/// [`app`] whose browser records each URL it is asked to open.
/// [`app`] whose browser records each URL it is asked to open. Its previews go to a temporary
/// folder of the test's own ([`preview_tmp`]), not the system's.
fn browsing(picked: &str) -> (VectorcraftApp, Written, Opened) {
static N: std::sync::atomic::AtomicUsize = std::sync::atomic::AtomicUsize::new(0);
let tmp = vectorcraft_testkit::temp_dir(&format!("svg-browser-{}", N.fetch_add(1, std::sync::atomic::Ordering::Relaxed)));
super::super::save_for_web::TEST_TMP.set(Some(tmp));
let (mut app, written) = app(picked);
let opened = Opened::default();
let o = opened.clone();
@@ -489,6 +494,13 @@ mod tests {
(app, written, opened)
}
/// The SVG preview folder inside this test's temporary folder ([`browsing`]), with `/` between
/// its parts.
fn preview_tmp() -> String {
let tmp = super::super::save_for_web::TEST_TMP.with_borrow(Clone::clone).expect("browsing sets the temporary folder");
tmp.join(PREVIEW_ROOT).to_string_lossy().replace('\\', "/")
}
/// Show in Browser for the open dialog's current choices, as its button runs it.
fn show_in_browser(app: &mut VectorcraftApp) -> Result<Value, String> {
let p = preview_params(app.ui.dialog.as_ref().expect("SVG Options open"));
@@ -510,7 +522,7 @@ mod tests {
let remembered = app.ui.svg_options.clone();
let r = show_in_browser(&mut app).unwrap_or_else(|e| panic!("{e}"));
let path = r["path"].as_str().unwrap().to_string();
assert!(path.contains("/VectorCraft SVG Preview/") && path.ends_with("/Untitled-1.svg"), "{path}");
assert!(path.starts_with(&format!("{}/", preview_tmp())) && path.ends_with("/Untitled-1.svg"), "{path}");
assert_eq!(*opened.borrow(), [io::file_url(&path)]);
assert_eq!(written.borrow().len(), 1);
assert_eq!(written.borrow()[0].0, path);
@@ -538,6 +550,18 @@ mod tests {
assert!(app.ui.dialog.is_some());
}
/// A write that fails opens nothing and removes the folder made for that preview.
#[test]
fn show_in_browser_removes_its_folder_when_a_write_fails() {
let (mut app, _, opened) = browsing("/tmp/out.svg");
app.services.write = Some(Box::new(|_: &str, _: &[u8]| Err("disk full".to_string())));
app.run("file.export.svg", Value::Null).unwrap();
assert!(show_in_browser(&mut app).unwrap_err().contains("disk full"));
assert!(opened.borrow().is_empty());
let left: Vec<_> = std::fs::read_dir(preview_tmp()).map(|d| d.flatten().map(|e| e.file_name()).collect()).unwrap_or_default();
assert!(left.is_empty(), "{left:?}");
}
/// Under Export Selection the preview is the selection alone, cropped to it, as OK writes it.
#[test]
fn show_in_browser_under_export_selection_shows_the_selection() {
@@ -606,7 +630,9 @@ mod tests {
app.ui.answering_control = true;
assert!(show_in_browser(&mut app).unwrap_err().contains("opens another app"));
app.ui.answering_control = false;
assert!(crate::menus::enabled(&app, BROWSER));
app.services.download = Some(Box::new(|_: &str, _: &[u8]| Ok(())));
assert!(!crate::menus::enabled(&app, BROWSER), "the command palette and menus show it disabled on the web");
assert!(show_in_browser(&mut app).is_err());
assert!(written.borrow().is_empty() && opened.borrow().is_empty());
}
@@ -385,6 +385,8 @@ fn the_web_downloads_and_has_no_browser_preview() {
let log = log.borrow().clone();
assert!(log[0].starts_with("download Untitled-1.html ") && log[1].starts_with("download Untitled-1.png "), "{log:?}");
assert!(app.run("file.saveForWeb.browser", json!({})).is_err());
assert!(crate::menus::enabled(&app, "file.saveForWeb"));
assert!(!crate::menus::enabled(&app, "file.saveForWeb.browser"), "the command palette and menus show it disabled on the web");
}
#[test]
@@ -414,6 +416,19 @@ fn preview_in_browser_opens_the_page() {
assert!(log.last().unwrap().starts_with("open file://") && log.last().unwrap().ends_with("Untitled-1.html"), "{log:?}");
}
/// A preview whose export fails opens nothing and removes the folder made for it.
#[test]
fn a_failed_browser_preview_removes_its_folder() {
let tmp = vectorcraft_testkit::temp_dir("sfw-browser-failed");
save_for_web::TEST_TMP.set(Some(tmp.clone()));
let (mut app, log) = app(&tmp, false);
assert!(app.run("file.saveForWeb.browser", json!({"format": "bogus"})).is_err());
assert!(!log.borrow().iter().any(|l| l.starts_with("open ")), "{:?}", log.borrow());
let left: Vec<_> =
std::fs::read_dir(tmp.join("VectorCraft Save for Web")).map(|d| d.flatten().map(|e| e.file_name()).collect()).unwrap_or_default();
assert!(left.is_empty(), "{left:?}");
}
/// Each preview has its own folder: a second one, from another app or the same one, leaves the
/// first page and its image as they were.
#[test]
+5
View File
@@ -124,6 +124,11 @@ pub fn open_tool_dialog(app: &mut VectorcraftApp, kind: &str, p: Value) {
}
// Double-clicking a stop on the gradient annotator: its popover, next to the stop's chip.
"gradientStop" => Dialog::new(kind, json!({"index": p.get("index").cloned().unwrap_or(json!(0)), "x": x, "y": y, "tab": "color"})),
// Image Trace's Ignore Color eyedropper updates the panel, not the document's paint.
"imageTraceIgnoreColor" => {
crate::panels::image_trace::apply_ignore_color_sample(app, &p);
return;
}
// Brush Options › Key Color eyedropper: update the open dialog, do not replace it.
"brushKeyColor" => {
if let Some(c) = p.get("color") {
+24
View File
@@ -1630,6 +1630,10 @@ font-technology Variable Променливи
Add Color Tool Инструмент „Добавяне на цвят“
Remove Color Tool Инструмент „Премахване на цвят“
Remove Color Премахване на цвят
Set As Base Color Задаване като основен цвят
Select Shade Избор на нюанс
Add New Color Добавяне на нов цвят
Set Current Color As Base Color Задаване на текущия цвят като основен
Find the selected colors in the artwork Намиране на избраните цветове в илюстрацията
Harmony Sets Набори от хармонии
Height Височина
@@ -2010,6 +2014,7 @@ font-technology Variable Променливи
Limit to Library: Ограничаване до библиотека:
Limit: Ограничение:
Line Линия
Line Arrow Линейна стрелка
Line Art and Text Resolution: Разделителна способност на линеарна графика и текст:
Line Breaks Паузи на редове
Line Color Цвят на линията
@@ -2762,6 +2767,11 @@ font-technology Variable Променливи
Preserve Alpha Transparency Запазване на алфа прозрачността
Preserve Appearance and Overprints Запазване на визията и надпечатите
Preserve CMYK Numbers Запазване на CMYK стойностите
Preserve RGB Numbers Запазване на RGB стойностите
Device to Simulate: Устройство за симулиране:
Simulate Paper Color Симулиране на цвета на хартията
Simulate Black Ink Симулиране на черното мастило
Load… Зареди…
Preserve Editing Capabilities Запазване на възможностите за редактиране
Preserve editing capabilities Запазване на възможностите за редактиране
Preserve Lightness Запазване на светлината
@@ -3259,6 +3269,7 @@ digits Malayalam Малаялам
New type takes this language while Document Setup's language is English: USA; type already in a document keeps its own language. Новият текст получава този език, докато езикът в Настройка на документ е Английски: САЩ; текстът, който вече е в документа, запазва своя език.
In paragraphs with Hyphenate on, a listed word breaks only at the hyphens typed in it, or nowhere when it has none, whatever its language or case. В абзаците с включено Пренасяне на думи изброената дума се пренася само при въведените в нея тирета или никъде, ако няма такива, независимо от езика и регистъра ѝ.
On the desktop, the .wasm plug-ins in this folder load at startup and when you click OK with a new folder here, except in Safe Mode; the web version does not load them. В настолната версия .wasm приставките в тази папка се зареждат при стартиране и когато щракнете върху ОК с нова папка тук, освен в Безопасен режим; уеб версията не ги зарежда.
How many instructions each run of a plug-in object filter may use; Large allows more than Normal with the same 60-second limit. Heavy filters keep their own budget. Колко инструкции може да използва всяко изпълнение на филтър за обекти от плъгин; „Голям“ позволява повече от „Нормално“ при същия лимит от 60 секунди. Тежките филтри запазват своя бюджет.
The first scratch disk choice: Startup, None or a folder path; VectorCraft stores it but does not use scratch disks yet. Първият избор на временен диск: Startup, None или път до папка; VectorCraft го запазва, но все още не използва временни дискове.
The second scratch disk choice: Startup, None or a folder path; VectorCraft stores it but does not use scratch disks yet. Вторият избор на временен диск: Startup, None или път до папка; VectorCraft го запазва, но все още не използва временни дискове.
How light or dark the interface is. Колко светъл или тъмен е интерфейсът.
@@ -3277,6 +3288,7 @@ digits Malayalam Малаялам
Animated Zoom works only while this is on; off, Animated Zoom is dimmed and zooming does not animate. „Анимирано мащабиране“ работи само докато това е включено; изключено, „Анимирано мащабиране“ е затъмнено и мащабирането не е анимирано.
The wheel's zoom glides in, and the Zoom tool zooms as you drag sideways or hold it down; off, the Zoom tool zooms to the area you drag across. Мащабирането с колелцето се плъзга плавно, а инструментът „Мащаб“ мащабира, докато плъзгате настрани или го задържите; изключено, той мащабира до областта, през която плъзнете.
From the next start, the desktop version draws with this kind of graphics processor; Automatic prefers the one that drives the display. The web version does not use it. От следващото стартиране настолната версия рисува с този вид графичен процесор; „Автоматично“ предпочита този, който управлява дисплея. Уеб версията не го използва.
From the next start, the window shows frames without waiting for the display to refresh, at most 240 a second; off, the display paces them. A present mode set at launch overrides it. От следващото стартиране прозорецът показва кадрите, без да чака опресняването на дисплея, най-много 240 в секунда; изключено, темпото задава дисплеят. Режим на представяне, зададен при стартиране, има предимство.
The most undo steps each document keeps; lowering it drops the oldest steps when you click OK. Steps can also go sooner when they use too much memory. Най-многото стъпки за отмяна, които всеки документ пази; по-малко число премахва най-старите стъпки, когато щракнете върху ОК. Стъпки може да отпаднат и по-рано, ако заемат твърде много памет.
Shows the artwork changing while you drag; off, outlines follow the drag and the artwork changes when you release. A ruler guide always moves as you drag. Показва как рисунката се променя, докато плъзгате; изключено, контурите следват плъзгането, а рисунката се променя, когато отпуснете. Помощна линия от линийката винаги се движи, докато плъзгате.
How many worker threads draw the artwork; -1 uses one fewer than the cores VectorCraft may use, at most 8, and 0 uses none. The web version always uses none. Колко работни нишки рисуват рисунката; -1 използва с една по-малко от ядрата, които VectorCraft може да ползва, най-много 8, а 0 не използва нито една. Уеб версията никога не използва.
@@ -3303,6 +3315,10 @@ digits Malayalam Малаялам
VectorCraft stores this choice, but Copy and Cut do not use a legacy vector clipboard format yet. VectorCraft запазва този избор, но Копиране и Изрязване все още не използват формат на стария векторен клипборд.
Preserve Paths or Preserve Appearance and Overprints for the legacy vector clipboard; VectorCraft stores the choice but does not use it yet. „Запазване на пътищата“ или „Запазване на визията и надпечатите“ за стария векторен клипборд; VectorCraft запазва избора, но все още не го използва.
Keep Formatting keeps the styles of text copied from VectorCraft type when it is pasted into type; Keep Plain Text gives it the style where it lands. „Запазване на форматирането“ запазва стиловете на текст, копиран от текстов обект във VectorCraft, при поставяне в текстов обект; „Запазване като обикновен текст“ му дава стила на мястото, където попада.
Display All Blacks as Rich Black shows pure CMYK black (black ink alone at 100%) as RGB black on the canvas; Display All Blacks Accurately converts it through the CMYK working space. „Показване на цялото черно като наситено черно“ показва чистото CMYK черно (само черно мастило на 100%) върху платното като RGB черно; „Показване на цялото черно точно“ го преобразува през работното CMYK пространство.
Output All Blacks as Rich Black draws pure CMYK black as RGB black in RGB and grayscale raster exports and Print as Bitmap; it does not change vector exports, CMYK JPEG, TIFF and PSD, or other printing. „Изход на чисто черно като наситено черно“ рисува чистото CMYK черно като RGB черно в растерните RGB и черно-бели експорти и при „Печат като растерно изображение“; не променя векторните експорти, CMYK JPEG, TIFF и PSD и другия печат.
On a touch screen, switches to the Touch workspace; turning this off, or losing the touch screen, goes back to the workspace it switched from. На сензорен екран превключва към работното пространство за докосване; изключването на настройката или изчезването на сензорния екран връща работното пространство отпреди това.
A two-finger tap on the canvas undoes, or switches between selection and drawing tools in the Touch workspace, and a three-finger tap redoes; neither works in Presentation Mode. Докосване с два пръста върху платното отменя, а в работното пространство за докосване превключва между инструментите за селекция и за рисуване; докосване с три пръста повтаря. Нито едното не действа в режим на презентация.
New type takes this language while Document Setup's language is English: USA and [Normal Character Style] sets none; type already in a document keeps its own language. Новият текст получава този език, докато езикът в Настройка на документ е Английски: САЩ и [Нормален стил на знак] не задава език; текстът, който вече е в документа, запазва своя език.
In paragraphs with Hyphenate on, a listed word breaks only at the hyphens typed in it, or nowhere when it has none, whatever its case; Korean words take no hyphen, and Indian-language words do not break inside a character cluster. В абзаците с включено Пренасяне на думи изброената дума се пренася само при въведените в нея тирета или никъде, ако няма такива, независимо от регистъра ѝ; корейските думи не получават тире, а думите на индийски езици не се пренасят вътре в група от знаци.
Reset all preferences to their defaults? Да се нулират ли всички настройки до стойностите по подразбиране?
@@ -3533,6 +3549,7 @@ digits Malayalam Малаялам
@plural {shown} of {n} result. Keep typing to narrow them.|{shown} of {n} results. Keep typing to narrow them. {shown} от {n} резултат. Продължете да пишете, за да ги стесните.|{shown} от {n} резултата. Продължете да пишете, за да ги стесните.
Recent Commands Последни команди
No recent commands Няма последни команди
Type to search commands, tools, panels and effects Въведете текст, за да търсите команди, инструменти, панели и ефекти
Search commands Търсене на команди
Search Commands… Търсене на команди…
Secondary Вторичен
@@ -5844,6 +5861,7 @@ lighting Light Светлина
B5 B5
Bar Лента
Barbed С кукички
arrowhead Feather Перо
Baseline (Standard) Основна линия (стандартна)
Baseline Optimized Оптимизирана основна линия
Basic Основен
@@ -7447,6 +7465,7 @@ breakText Glyphs Глифи
Remove Strokes Премахване на щрихи
Place Brush Art Поставяне на графика на четка
Replace Brush Art Замяна на графика на четка
Replace Pattern Art Замяна на графика на мостра
Strokes use this brush. Apply the new art to those strokes, or leave them as they are and add a copy of the brush with the new art? Щрихи използват тази четка. Да се приложи ли новата графика към тези щрихи, или те да останат както са и да се добави копие на четката с новата графика?
Apply to Strokes Прилагане към щрихите
Leave Strokes Оставяне на щрихите
@@ -7862,6 +7881,11 @@ breakText Glyphs Глифи
@msg A joint does not close by {gap} pt. Една връзка не се затваря с {gap} pt.
@msg Two panels pass through each other. Два панела минават един през друг.
@msg composer must be "singleLine", "everyLine", "standardSingleLine" or "standardEveryLine" composer трябва да е "singleLine", "everyLine", "standardSingleLine" или "standardEveryLine"
Engraving Гравюра
Fine Hatching Фино щриховане
Dense Hatching Гъсто щриховане
Tapered Hatching Изтъняващо щриховане
Broken Hatching Прекъснато щриховане
Image Brush Четки за изображения
Soft Bloom Мек цъфтеж
Halftone Field Полутоново поле
Can't render this file because it is too large.
+24
View File
@@ -3026,6 +3026,11 @@ digits Malayalam Malajalam
Place the pages with the placement again Ponovo postavi stranice s postavljanjem
Placement: Postavljanje:
Preserve CMYK Numbers Očuvaj CMYK brojeve
Preserve RGB Numbers Očuvaj RGB brojeve
Device to Simulate: Uređaj za simulaciju:
Simulate Paper Color Simuliraj boju papira
Simulate Black Ink Simuliraj crnu tintu
Load… Učitaj…
Previous page Prethodna stranica
Print Layers: Štampaj slojeve:
Print Preset: Predložak štampanja:
@@ -3102,6 +3107,10 @@ digits Malayalam Malajalam
Add Color Tool Alat za dodavanje boje
Remove Color Tool Alat za uklanjanje boje
Remove Color Ukloni boju
Set As Base Color Postavi kao osnovnu boju
Select Shade Odaberi nijansu
Add New Color Dodaj novu boju
Set Current Color As Base Color Postavi trenutnu boju kao osnovnu
Find the selected colors in the artwork Pronađi odabrane boje u crtežu
Harmony Rules Pravila harmonije
Keep this row's colors (exclude) Zadrži boje ovog reda (isključi)
@@ -4627,6 +4636,7 @@ font-technology Variable Varijabilni
@plural {shown} of {n} result. Keep typing to narrow them.|{shown} of {n} results. Keep typing to narrow them. {shown} od {n} rezultata. Nastavite kucati da ih suzite.|{shown} od {n} rezultata. Nastavite kucati da ih suzite.|{shown} od {n} rezultata. Nastavite kucati da ih suzite.
Recent Commands Nedavne naredbe
No recent commands Nema nedavnih naredbi
Type to search commands, tools, panels and effects Upišite za pretragu naredbi, alata, panela i efekata
Dashed Line Isprekidana linija
Panel menu Meni panela
Unembed… Poništi ugrađivanje…
@@ -4749,6 +4759,7 @@ font-technology Variable Varijabilni
New type takes this language while Document Setup's language is English: USA; type already in a document keeps its own language. Novi tekst dobija ovaj jezik dok je jezik u Postavkama dokumenta Engleski: SAD; tekst koji je već u dokumentu zadržava svoj jezik.
In paragraphs with Hyphenate on, a listed word breaks only at the hyphens typed in it, or nowhere when it has none, whatever its language or case. U pasusima s uključenom opcijom Rastavljaj riječi navedena riječ se rastavlja samo na crticama upisanim u nju, ili nigdje ako ih nema, bez obzira na jezik i velika ili mala slova.
On the desktop, the .wasm plug-ins in this folder load at startup and when you click OK with a new folder here, except in Safe Mode; the web version does not load them. U desktop verziji .wasm dodaci iz ove mape učitavaju se pri pokretanju i kada kliknete U redu s novom mapom ovdje, osim u sigurnom načinu rada; web verzija ih ne učitava.
How many instructions each run of a plug-in object filter may use; Large allows more than Normal with the same 60-second limit. Heavy filters keep their own budget. Koliko instrukcija smije koristiti svako pokretanje filtera objekata iz dodatka; Veliko dopušta više od Normalno uz isto ograničenje od 60 sekundi. Teški filteri zadržavaju svoj budžet.
The first scratch disk choice: Startup, None or a folder path; VectorCraft stores it but does not use scratch disks yet. Prvi izbor radnog diska: Startup, None ili putanja do mape; VectorCraft ga sprema, ali još ne koristi radne diskove.
The second scratch disk choice: Startup, None or a folder path; VectorCraft stores it but does not use scratch disks yet. Drugi izbor radnog diska: Startup, None ili putanja do mape; VectorCraft ga sprema, ali još ne koristi radne diskove.
How light or dark the interface is. Koliko je interfejs svijetao ili taman.
@@ -4767,6 +4778,7 @@ font-technology Variable Varijabilni
Animated Zoom works only while this is on; off, Animated Zoom is dimmed and zooming does not animate. Animirano zumiranje radi samo dok je ovo uključeno; isključeno, Animirano zumiranje je zatamnjeno i zumiranje nije animirano.
The wheel's zoom glides in, and the Zoom tool zooms as you drag sideways or hold it down; off, the Zoom tool zooms to the area you drag across. Zumiranje točkićem glatko klizi, a Alat za zumiranje zumira dok vučete ustranu ili ga držite; isključeno, Alat za zumiranje zumira na područje preko kojeg prevučete.
From the next start, the desktop version draws with this kind of graphics processor; Automatic prefers the one that drives the display. The web version does not use it. Od sljedećeg pokretanja desktop verzija crta ovom vrstom grafičkog procesora; Automatski daje prednost onom koji pokreće ekran. Web verzija ga ne koristi.
From the next start, the window shows frames without waiting for the display to refresh, at most 240 a second; off, the display paces them. A present mode set at launch overrides it. Od sljedećeg pokretanja prozor prikazuje kadrove bez čekanja na osvježavanje ekrana, najviše 240 u sekundi; isključeno, ritam određuje ekran. Način prikaza zadan pri pokretanju ima prednost.
The most undo steps each document keeps; lowering it drops the oldest steps when you click OK. Steps can also go sooner when they use too much memory. Najveći broj koraka poništavanja koje svaki dokument čuva; manji broj uklanja najstarije korake kada kliknete U redu. Koraci mogu nestati i ranije kada zauzimaju previše memorije.
Shows the artwork changing while you drag; off, outlines follow the drag and the artwork changes when you release. A ruler guide always moves as you drag. Prikazuje kako se crtež mijenja dok vučete; isključeno, obrisi prate povlačenje, a crtež se mijenja kada pustite. Vodilja s ravnala se uvijek pomiče dok vučete.
How many worker threads draw the artwork; -1 uses one fewer than the cores VectorCraft may use, at most 8, and 0 uses none. The web version always uses none. Koliko radnih niti crta crtež; -1 koristi jednu manje od jezgri koje VectorCraft smije koristiti, najviše 8, a 0 nijednu. Web verzija nikad ne koristi nijednu.
@@ -4793,6 +4805,10 @@ font-technology Variable Varijabilni
VectorCraft stores this choice, but Copy and Cut do not use a legacy vector clipboard format yet. VectorCraft čuva ovaj izbor, ali Kopiraj i Izreži još ne koriste format naslijeđenog vektorskog međuspremnika.
Preserve Paths or Preserve Appearance and Overprints for the legacy vector clipboard; VectorCraft stores the choice but does not use it yet. Očuvaj putanje ili Očuvaj izgled i pretiske za naslijeđeni vektorski međuspremnik; VectorCraft čuva izbor, ali ga još ne koristi.
Keep Formatting keeps the styles of text copied from VectorCraft type when it is pasted into type; Keep Plain Text gives it the style where it lands. Zadrži oblikovanje čuva stilove teksta kopiranog iz tekstualnog objekta u VectorCraftu kada se zalijepi u tekstualni objekt; Zadrži običan tekst daje mu stil mjesta na koje dospije.
Display All Blacks as Rich Black shows pure CMYK black (black ink alone at 100%) as RGB black on the canvas; Display All Blacks Accurately converts it through the CMYK working space. Prikaži sve crne kao bogatu crnu prikazuje čistu CMYK crnu (samo crnu boju na 100%) na platnu kao RGB crnu; Prikaži sve crne tačno je pretvara kroz radni CMYK prostor.
Output All Blacks as Rich Black draws pure CMYK black as RGB black in RGB and grayscale raster exports and Print as Bitmap; it does not change vector exports, CMYK JPEG, TIFF and PSD, or other printing. Izlaz svih crnih kao bogata crna crta čistu CMYK crnu kao RGB crnu u RGB rasterskim izvozima i izvozima u nijansama sive te uz Štampaj kao bitmapu; ne mijenja vektorske izvoze, CMYK JPEG, TIFF i PSD niti ostalu štampu.
On a touch screen, switches to the Touch workspace; turning this off, or losing the touch screen, goes back to the workspace it switched from. Na ekranu osjetljivom na dodir prelazi u radni prostor za dodir; isključivanje postavke ili gubitak ekrana osjetljivog na dodir vraća radni prostor iz kojeg je prešao.
A two-finger tap on the canvas undoes, or switches between selection and drawing tools in the Touch workspace, and a three-finger tap redoes; neither works in Presentation Mode. Dodir s dva prsta na platnu poništava, a u radnom prostoru za dodir prebacuje između alata za odabir i crtanje; dodir s tri prsta ponavlja. Nijedan ne radi u načinu prezentacije.
New type takes this language while Document Setup's language is English: USA and [Normal Character Style] sets none; type already in a document keeps its own language. Novi tekst dobija ovaj jezik dok je jezik u Postavkama dokumenta Engleski: SAD i [Normalni stil znakova] ne postavlja jezik; tekst koji je već u dokumentu zadržava svoj jezik.
In paragraphs with Hyphenate on, a listed word breaks only at the hyphens typed in it, or nowhere when it has none, whatever its case; Korean words take no hyphen, and Indian-language words do not break inside a character cluster. U pasusima s uključenom opcijom Rastavljaj riječi navedena riječ se rastavlja samo na crticama upisanim u nju, ili nigdje ako ih nema, bez obzira na velika ili mala slova; korejske riječi ne dobijaju crticu, a riječi na indijskim jezicima ne rastavljaju se unutar skupine znakova.
Reset all preferences to their defaults? Vratiti sve postavke na zadane vrijednosti?
@@ -6049,6 +6065,7 @@ imageTrace Outline Obris
Arrow Strelica
Arrow (open) Strelica (otvorena)
Barbed Bodljikavo
arrowhead Feather Pero
Half Arrow (left) Polustrelica (lijevo)
Half Arrow (right) Polustrelica (desno)
Concave Konkavno
@@ -6076,6 +6093,7 @@ imageTrace Outline Obris
Kite Zmaj
Triangle to Bar Trougao u traku
Oval Oval
Line Arrow Linijska strelica
Complementary Komplementarne
Complementary 2 Komplementarne 2
Split Complementary Podijeljene komplementarne
@@ -7496,6 +7514,7 @@ shape Open Otvoren
Remove Strokes Ukloni poteze
Place Brush Art Postavi crtež četkice
Replace Brush Art Zamijeni crtež četkice
Replace Pattern Art Zamijeni crtež uzorka
Strokes use this brush. Apply the new art to those strokes, or leave them as they are and add a copy of the brush with the new art? Potezi koriste ovu četkicu. Primijeniti novi crtež na te poteze ili ih ostaviti kakvi jesu i dodati kopiju četkice s novim crtežom?
Apply to Strokes Primijeni na poteze
Leave Strokes Ostavi poteze
@@ -7917,6 +7936,11 @@ shape Open Otvoren
@msg A joint does not close by {gap} pt. Spoj se ne zatvara za {gap} pt.
@msg Two panels pass through each other. Dva panela prolaze jedan kroz drugi.
@msg composer must be "singleLine", "everyLine", "standardSingleLine" or "standardEveryLine" composer mora biti "singleLine", "everyLine", "standardSingleLine" ili "standardEveryLine"
Engraving Gravura
Fine Hatching Fino šrafiranje
Dense Hatching Gusto šrafiranje
Tapered Hatching Suženo šrafiranje
Broken Hatching Isprekidano šrafiranje
Image Brush Slikovni kistovi
Soft Bloom Meko cvjetanje
Halftone Field Polutonsko polje
Can't render this file because it contains an unexpected character in line 2 and column 73.
+26
View File
@@ -456,6 +456,8 @@ antiAlias Sharp Nítid
Bar Barra
Bar Graph Tool Eina de gràfic de barres
Barbed Amb pues
arrowhead Feather Ploma
arrowhead Target Diana
Bas Relief Baix relleu
Bas Relief… Baix relleu…
Base Along: Base al llarg de:
@@ -2195,6 +2197,10 @@ digits Malayalam Malaiàlam
Add Color Tool Eina Afegeix color
Remove Color Tool Eina Elimina color
Remove Color Elimina el color
Set As Base Color Defineix com a color base
Select Shade Selecciona el to
Add New Color Afegeix un color nou
Set Current Color As Base Color Defineix el color actual com a color base
Find the selected colors in the artwork Troba els colors seleccionats a l’obra
Harmony Sets Conjunts d’harmonia
HDTV 1080p HDTV 1080p
@@ -2606,6 +2612,7 @@ digits Malayalam Malaiàlam
Limit: Límit:
Limited Limitat
Line Línia
Line Arrow Fletxa de línies
Line Art Art lineal
Line Art and Text Resolution: Resolució de l’art lineal i del text:
Line Breaks Salts de línia
@@ -3565,6 +3572,11 @@ digits Malayalam Malaiàlam
Preserve Appearance Conserva l’aparença
Preserve Appearance and Overprints Conserva l’aparença i les sobrempressions
Preserve CMYK Numbers Conserva els valors CMYK
Preserve RGB Numbers Conserva els valors RGB
Device to Simulate: Dispositiu que se simula:
Simulate Paper Color Simula el color del paper
Simulate Black Ink Simula la tinta negra
Load… Carrega…
Preserve Editing Capabilities Conserva les capacitats d’edició
Preserve editing capabilities Conserva les capacitats d’edició
Preserve Lightness Conserva la lluminositat
@@ -4115,6 +4127,7 @@ digits Malayalam Malaiàlam
New type takes this language while Document Setup's language is English: USA; type already in a document keeps its own language. El text nou pren aquest idioma mentre l’idioma de Configuració del document sigui Anglès: EUA; el text que ja és en un document conserva el seu idioma.
In paragraphs with Hyphenate on, a listed word breaks only at the hyphens typed in it, or nowhere when it has none, whatever its language or case. En els paràgrafs amb Particiona activat, una paraula de la llista es parteix només als guionets que s’hi han escrit, o enlloc si no en té, sigui quin sigui el seu idioma o l’ús de majúscules.
On the desktop, the .wasm plug-ins in this folder load at startup and when you click OK with a new folder here, except in Safe Mode; the web version does not load them. A la versió d’escriptori, els complements .wasm d’aquesta carpeta es carreguen en iniciar i quan feu clic a D’acord amb una carpeta nova aquí, excepte en Mode segur; la versió web no els carrega.
How many instructions each run of a plug-in object filter may use; Large allows more than Normal with the same 60-second limit. Heavy filters keep their own budget. Quantes instruccions pot fer servir cada execució d’un filtre d’objectes d’un complement; Gran en permet més que Normal amb el mateix límit de 60 segons. Els filtres pesants conserven el seu pressupost.
The first scratch disk choice: Startup, None or a folder path; VectorCraft stores it but does not use scratch disks yet. La primera opció de disc d’intercanvi: Startup, None o el camí d’una carpeta; VectorCraft la desa, però encara no fa servir discs d’intercanvi.
The second scratch disk choice: Startup, None or a folder path; VectorCraft stores it but does not use scratch disks yet. La segona opció de disc d’intercanvi: Startup, None o el camí d’una carpeta; VectorCraft la desa, però encara no fa servir discs d’intercanvi.
How light or dark the interface is. Com de clara o fosca és la interfície.
@@ -4133,6 +4146,7 @@ digits Malayalam Malaiàlam
Animated Zoom works only while this is on; off, Animated Zoom is dimmed and zooming does not animate. El Zoom animat només funciona mentre això està activat; desactivat, el Zoom animat apareix atenuat i el zoom no s’anima.
The wheel's zoom glides in, and the Zoom tool zooms as you drag sideways or hold it down; off, the Zoom tool zooms to the area you drag across. El zoom amb la roda llisca suaument, i l’Eina de zoom fa zoom mentre arrossegueu de costat o la manteniu premuda; desactivat, l’Eina de zoom fa zoom a l’àrea que arrossegueu.
From the next start, the desktop version draws with this kind of graphics processor; Automatic prefers the one that drives the display. The web version does not use it. A partir del pròxim inici, la versió d’escriptori dibuixa amb aquest tipus de processador gràfic; Automàtic prefereix el que controla la pantalla. La versió web no l’utilitza.
From the next start, the window shows frames without waiting for the display to refresh, at most 240 a second; off, the display paces them. A present mode set at launch overrides it. A partir del pròxim inici, la finestra mostra els fotogrames sense esperar que la pantalla es refresqui, com a màxim 240 per segon; desactivat, la pantalla marca el ritme. Un mode de presentació definit en iniciar té prioritat.
The most undo steps each document keeps; lowering it drops the oldest steps when you click OK. Steps can also go sooner when they use too much memory. El màxim de passos de desfer que conserva cada document; un nombre més baix elimina els passos més antics quan feu clic a D’acord. Els passos també poden desaparèixer abans si ocupen massa memòria.
Shows the artwork changing while you drag; off, outlines follow the drag and the artwork changes when you release. A ruler guide always moves as you drag. Mostra com canvia l’art mentre arrossegueu; desactivat, els contorns segueixen l’arrossegament i l’art canvia quan deixeu anar. Una guia de regle sempre es mou mentre arrossegueu.
How many worker threads draw the artwork; -1 uses one fewer than the cores VectorCraft may use, at most 8, and 0 uses none. The web version always uses none. Quants fils de treball dibuixen l’art; -1 en fa servir un menys que els nuclis que VectorCraft pot usar, com a màxim 8, i 0 cap. La versió web no en fa servir mai cap.
@@ -4159,6 +4173,10 @@ digits Malayalam Malaiàlam
VectorCraft stores this choice, but Copy and Cut do not use a legacy vector clipboard format yet. VectorCraft desa aquesta opció, però Copia i Retalla encara no fan servir cap format de porta-retalls vectorial heredat.
Preserve Paths or Preserve Appearance and Overprints for the legacy vector clipboard; VectorCraft stores the choice but does not use it yet. Conserva els traçats o Conserva l’aparença i les sobrempressions per al porta-retalls vectorial heredat; VectorCraft desa l’opció però encara no la fa servir.
Keep Formatting keeps the styles of text copied from VectorCraft type when it is pasted into type; Keep Plain Text gives it the style where it lands. Conserva el format manté els estils del text copiat d’un objecte de text de VectorCraft quan s’enganxa en un objecte de text; Conserva el text sense format li dona l’estil del lloc on va a parar.
Display All Blacks as Rich Black shows pure CMYK black (black ink alone at 100%) as RGB black on the canvas; Display All Blacks Accurately converts it through the CMYK working space. Mostra tots els negres com a negre ric mostra el negre CMYK pur (només tinta negra al 100%) com a negre RGB al llenç; Mostra tots els negres amb precisió el converteix a través de l’espai CMYK de treball.
Output All Blacks as Rich Black draws pure CMYK black as RGB black in RGB and grayscale raster exports and Print as Bitmap; it does not change vector exports, CMYK JPEG, TIFF and PSD, or other printing. Genera tots els negres com a negre ric dibuixa el negre CMYK pur com a negre RGB a les exportacions ràster RGB i en escala de grisos i amb Imprimeix com a mapa de bits; no canvia les exportacions vectorials, els JPEG, TIFF i PSD CMYK ni la resta d’impressions.
On a touch screen, switches to the Touch workspace; turning this off, or losing the touch screen, goes back to the workspace it switched from. En una pantalla tàctil, canvia a l’espai de treball tàctil; si es desactiva o es perd la pantalla tàctil, torna a l’espai de treball d’abans del canvi.
A two-finger tap on the canvas undoes, or switches between selection and drawing tools in the Touch workspace, and a three-finger tap redoes; neither works in Presentation Mode. Un toc amb dos dits al llenç desfà o, a l’espai de treball tàctil, alterna entre les eines de selecció i de dibuix, i un toc amb tres dits refà; cap dels dos funciona en el mode de presentació.
New type takes this language while Document Setup's language is English: USA and [Normal Character Style] sets none; type already in a document keeps its own language. El text nou pren aquest idioma mentre l’idioma de Configuració del document sigui Anglès: EUA i [Estil de caràcter normal] no en defineixi cap; el text que ja és en un document conserva el seu idioma.
In paragraphs with Hyphenate on, a listed word breaks only at the hyphens typed in it, or nowhere when it has none, whatever its case; Korean words take no hyphen, and Indian-language words do not break inside a character cluster. En els paràgrafs amb Particiona activat, una paraula de la llista es parteix només als guionets que s’hi han escrit, o enlloc si no en té, sigui quin sigui l’ús de majúscules; les paraules coreanes no prenen guionet, i les paraules en llengües índies no es parteixen dins d’un grup de caràcters.
Reset all preferences to their defaults? Voleu restablir totes les preferències als valors predeterminats?
@@ -4746,6 +4764,7 @@ digits Malayalam Malaiàlam
@plural {shown} of {n} result. Keep typing to narrow them.|{shown} of {n} results. Keep typing to narrow them. {shown} de {n} resultat. Continueu escrivint per reduir-los.|{shown} de {n} resultats. Continueu escrivint per reduir-los.
Recent Commands Ordres recents
No recent commands No hi ha ordres recents
Type to search commands, tools, panels and effects Escriviu per cercar ordres, eines, panells i efectes
Search commands Cerca ordres
Search Commands… Cerca ordres…
Search Fonts Folder Cerca a la carpeta de tipus de lletra
@@ -6837,6 +6856,7 @@ liquify-list-end {0}, {1} {0} i {1}
@msg no native format no hi ha format natiu
@msg no pages no hi ha pàgines
@msg no pattern `{name}` no hi ha el motiu `{name}`
@msg art painted with `{name}` can't be its tile un art pintat amb `{name}` no pot ser el seu mosaic
@msg no pattern swatch `{name}` no hi ha la mostra de motiu `{name}`
@msg no perspective grid preset named `{name}` no hi ha cap preajust de quadrícula de perspectiva anomenat `{name}`
@msg no plug-in {0} is installed no hi ha instal·lat el complement {0}
@@ -8313,6 +8333,7 @@ breakText Glyphs Glifs
Remove Strokes Elimina els traços
Place Brush Art Col·loca l’art del pinzell
Replace Brush Art Substitueix l’art del pinzell
Replace Pattern Art Substitueix l’art del motiu
Strokes use this brush. Apply the new art to those strokes, or leave them as they are and add a copy of the brush with the new art? Hi ha traços que fan servir aquest pinzell. Voleu aplicar l’art nou a aquests traços, o deixar-los com estan i afegir una còpia del pinzell amb l’art nou?
Apply to Strokes Aplica als traços
Leave Strokes Deixa els traços
@@ -8892,6 +8913,11 @@ breakText Glyphs Glifs
@msg A joint does not close by {gap} pt. Una unió no es tanca per {gap} pt.
@msg Two panels pass through each other. Dos panells es travessen l’un a l’altre.
@msg composer must be "singleLine", "everyLine", "standardSingleLine" or "standardEveryLine" composer ha de ser "singleLine", "everyLine", "standardSingleLine" o "standardEveryLine"
Engraving Gravat
Fine Hatching Ratllat fi
Dense Hatching Ratllat dens
Tapered Hatching Ratllat afilat
Broken Hatching Ratllat interromput
Image Brush Pinzells d'imatge
Soft Bloom Floració suau
Halftone Field Camp de semitons
Can't render this file because it is too large.
+25
View File
@@ -3108,6 +3108,11 @@ digits Malayalam Malajálamské
Place the pages with the placement again Znovu rozmístit stránky podle umístění
Placement: Umístění:
Preserve CMYK Numbers Zachovat hodnoty CMYK
Preserve RGB Numbers Zachovat hodnoty RGB
Device to Simulate: Simulované zařízení:
Simulate Paper Color Simulovat barvu papíru
Simulate Black Ink Simulovat černou barvu
Load… Načíst…
Previous page Předchozí stránka
Print Layers: Tisknout vrstvy:
Print Preset: Přednastavení tisku:
@@ -3185,6 +3190,10 @@ digits Malayalam Malajálamské
Add Color Tool Nástroj Přidat barvu
Remove Color Tool Nástroj Odstranit barvu
Remove Color Odstranit barvu
Set As Base Color Nastavit jako základní barvu
Select Shade Vybrat odstín
Add New Color Přidat novou barvu
Set Current Color As Base Color Nastavit aktuální barvu jako základní
Find the selected colors in the artwork Najít vybrané barvy v kresbě
Harmony Rules Pravidla harmonie
Keep this row's colors (exclude) Ponechat barvy tohoto řádku (vyloučit)
@@ -4736,6 +4745,7 @@ font-technology Variable Variabilní
@plural {shown} of {n} result. Keep typing to narrow them.|{shown} of {n} results. Keep typing to narrow them. {shown} z {n} výsledku. Pište dál a výsledky se zúží.|{shown} z {n} výsledků. Pište dál a výsledky se zúží.|{shown} z {n} výsledků. Pište dál a výsledky se zúží.
Recent Commands Nedávné příkazy
No recent commands Žádné nedávné příkazy
Type to search commands, tools, panels and effects Pište pro hledání příkazů, nástrojů, panelů a efektů
Dashed Line Čárkovaná čára
Panel menu Nabídka panelu
Unembed… Zrušit vložení…
@@ -4858,6 +4868,7 @@ font-technology Variable Variabilní
New type takes this language while Document Setup's language is English: USA; type already in a document keeps its own language. Nový text dostane tento jazyk, dokud je jazyk v Nastavení dokumentu Angličtina: USA; text, který už v dokumentu je, si ponechá svůj jazyk.
In paragraphs with Hyphenate on, a listed word breaks only at the hyphens typed in it, or nowhere when it has none, whatever its language or case. V odstavcích se zapnutou volbou Dělit slova se uvedené slovo dělí jen u spojovníků, které v něm napíšete, nebo nikde, pokud žádné nemá, bez ohledu na jazyk a velikost písmen.
On the desktop, the .wasm plug-ins in this folder load at startup and when you click OK with a new folder here, except in Safe Mode; the web version does not load them. V desktopové verzi se zásuvné moduly .wasm z této složky načtou při spuštění a po klepnutí na OK s novou složkou zde, kromě nouzového režimu; webová verze je nenačítá.
How many instructions each run of a plug-in object filter may use; Large allows more than Normal with the same 60-second limit. Heavy filters keep their own budget. Kolik instrukcí smí použít každé spuštění filtru objektů ze zásuvného modulu; Velké povoluje víc než Normální při stejném limitu 60 sekund. Náročné filtry si ponechají vlastní rozpočet.
The first scratch disk choice: Startup, None or a folder path; VectorCraft stores it but does not use scratch disks yet. První volba odkládacího disku: Startup, None nebo cesta ke složce; VectorCraft ji uloží, ale odkládací disky zatím nepoužívá.
The second scratch disk choice: Startup, None or a folder path; VectorCraft stores it but does not use scratch disks yet. Druhá volba odkládacího disku: Startup, None nebo cesta ke složce; VectorCraft ji uloží, ale odkládací disky zatím nepoužívá.
How light or dark the interface is. Jak světlé nebo tmavé je rozhraní.
@@ -4876,6 +4887,7 @@ font-technology Variable Variabilní
Animated Zoom works only while this is on; off, Animated Zoom is dimmed and zooming does not animate. Animované zvětšení funguje, jen když je toto zapnuto; při vypnutí je Animované zvětšení zašedlé a zvětšování není animované.
The wheel's zoom glides in, and the Zoom tool zooms as you drag sideways or hold it down; off, the Zoom tool zooms to the area you drag across. Zvětšení kolečkem plynule dojede a Nástroj Lupa zvětšuje, když táhnete do strany nebo ho podržíte; při vypnutí Nástroj Lupa zvětší oblast, přes kterou táhnete.
From the next start, the desktop version draws with this kind of graphics processor; Automatic prefers the one that drives the display. The web version does not use it. Od příštího spuštění kreslí desktopová verze tímto druhem grafického procesoru; Automaticky dává přednost tomu, který řídí displej. Webová verze ho nepoužívá.
From the next start, the window shows frames without waiting for the display to refresh, at most 240 a second; off, the display paces them. A present mode set at launch overrides it. Od příštího spuštění okno zobrazuje snímky bez čekání na obnovení displeje, nejvýše 240 za sekundu; vypnuto, tempo určuje displej. Režim zobrazení nastavený při spuštění má přednost.
The most undo steps each document keeps; lowering it drops the oldest steps when you click OK. Steps can also go sooner when they use too much memory. Nejvyšší počet kroků zpět, které si každý dokument ponechá; nižší číslo po klepnutí na OK odstraní nejstarší kroky. Kroky mohou zmizet i dříve, když zabírají příliš paměti.
Shows the artwork changing while you drag; off, outlines follow the drag and the artwork changes when you release. A ruler guide always moves as you drag. Ukazuje, jak se kresba mění, zatímco táhnete; při vypnutí sledují tažení obrysy a kresba se změní, až pustíte. Vodítko z pravítka se při tažení pohybuje vždy.
How many worker threads draw the artwork; -1 uses one fewer than the cores VectorCraft may use, at most 8, and 0 uses none. The web version always uses none. Kolik pracovních vláken kreslí kresbu; -1 použije o jedno méně, než je jader, která VectorCraft smí použít, nejvýše 8, a 0 žádné. Webová verze nepoužívá žádné.
@@ -4902,6 +4914,10 @@ font-technology Variable Variabilní
VectorCraft stores this choice, but Copy and Cut do not use a legacy vector clipboard format yet. VectorCraft tuto volbu uloží, ale Kopírovat a Vyjmout zatím nepoužívají formát starší vektorové schránky.
Preserve Paths or Preserve Appearance and Overprints for the legacy vector clipboard; VectorCraft stores the choice but does not use it yet. Zachovat cesty nebo Zachovat vzhled a přetisky pro starší vektorovou schránku; VectorCraft volbu uloží, ale zatím ji nepoužívá.
Keep Formatting keeps the styles of text copied from VectorCraft type when it is pasted into type; Keep Plain Text gives it the style where it lands. Zachovat formátování ponechá styly textu zkopírovaného z textového objektu ve VectorCraftu při vložení do textového objektu; Zachovat prostý text mu dá styl místa, kam se vloží.
Display All Blacks as Rich Black shows pure CMYK black (black ink alone at 100%) as RGB black on the canvas; Display All Blacks Accurately converts it through the CMYK working space. Volba „Zobrazovat všechny černé jako sytou černou“ zobrazí na plátně čistou černou CMYK (jen černou barvu na 100 %) jako černou RGB; volba „Zobrazovat všechny černé přesně“ ji převede přes pracovní prostor CMYK.
Output All Blacks as Rich Black draws pure CMYK black as RGB black in RGB and grayscale raster exports and Print as Bitmap; it does not change vector exports, CMYK JPEG, TIFF and PSD, or other printing. Volba „Ve výstupu všechny černé jako sytou černou“ vykreslí čistou černou CMYK jako černou RGB v rastrových exportech RGB a ve stupních šedi a při Tisknout jako bitmapu; nemění vektorové exporty, CMYK JPEG, TIFF a PSD ani jiný tisk.
On a touch screen, switches to the Touch workspace; turning this off, or losing the touch screen, goes back to the workspace it switched from. Na dotykové obrazovce přepne do dotykového pracovního prostoru; vypnutí volby nebo ztráta dotykové obrazovky vrátí pracovní prostor, ze kterého přepnul.
A two-finger tap on the canvas undoes, or switches between selection and drawing tools in the Touch workspace, and a three-finger tap redoes; neither works in Presentation Mode. Klepnutí dvěma prsty na plátno vrátí krok zpět, v dotykovém pracovním prostoru přepne mezi nástroji pro výběr a kreslení; klepnutí třemi prsty krok zopakuje. V režimu prezentace nefunguje ani jedno.
New type takes this language while Document Setup's language is English: USA and [Normal Character Style] sets none; type already in a document keeps its own language. Nový text dostane tento jazyk, dokud je jazyk v Nastavení dokumentu Angličtina: USA a [Normální styl znaků] žádný jazyk nenastavuje; text, který už v dokumentu je, si ponechá svůj jazyk.
In paragraphs with Hyphenate on, a listed word breaks only at the hyphens typed in it, or nowhere when it has none, whatever its case; Korean words take no hyphen, and Indian-language words do not break inside a character cluster. V odstavcích se zapnutou volbou Dělit slova se uvedené slovo dělí jen u spojovníků, které v něm napíšete, nebo nikde, pokud žádné nemá, bez ohledu na velikost písmen; korejská slova spojovník nedostanou a slova v indických jazycích se nedělí uvnitř skupiny znaků.
Reset all preferences to their defaults? Obnovit všechny předvolby na výchozí hodnoty?
@@ -5713,6 +5729,7 @@ liquify-list-end {0}, {1} {0} a {1}
@msg no native format chybí nativní formát
@msg no pages žádné stránky
@msg no pattern `{name}` vzorek `{name}` neexistuje
@msg art painted with `{name}` can't be its tile kresba vybarvená vzorkem `{name}` nemůže být jeho dlaždicí
@msg no perspective grid preset named `{name}` přednastavení perspektivní mřížky s názvem `{name}` neexistuje
@msg no plug-in {0} is installed zásuvný modul {0} není nainstalován
@msg no plug-in {id} is installed zásuvný modul {id} není nainstalován
@@ -6500,6 +6517,7 @@ variable-list-end {0}, {1} {0} a {1}
Arrow Šipka
Arrow (open) Šipka (otevřená)
Barbed S protihroty
arrowhead Feather Pírko
Half Arrow (left) Poloviční šipka (vlevo)
Half Arrow (right) Poloviční šipka (vpravo)
Concave Vkleslá
@@ -6527,6 +6545,7 @@ variable-list-end {0}, {1} {0} a {1}
Kite Deltoid
Triangle to Bar Trojúhelník k příčce
Oval Ovál
Line Arrow Čárová šipka
# Colour harmony rules (Color Guide, Recolor Artwork, Color Themes)
Complementary Komplementární
Complementary 2 Komplementární 2
@@ -8295,6 +8314,7 @@ breakText Glyphs Glyfy
Remove Strokes Odebrat tahy
Place Brush Art Umístit kresbu štětce
Replace Brush Art Nahradit kresbu štětce
Replace Pattern Art Nahradit kresbu vzorku
Strokes use this brush. Apply the new art to those strokes, or leave them as they are and add a copy of the brush with the new art? Tahy používají tento štětec. Použít novou kresbu na tyto tahy, nebo je ponechat beze změny a přidat kopii štětce s novou kresbou?
Apply to Strokes Použít na tahy
Leave Strokes Ponechat tahy
@@ -10717,6 +10737,11 @@ breakText Glyphs Glyfy
@msg A panel is not joined to the rest by a crease. Panel není se zbytkem spojen žádnou linií bigu.
@msg A fold line is on a non-printing layer. Linie skladu je na netisknutelné vrstvě.
@msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} Panely: {panels}, panty: {hinges}, chyby: {errors}, upozornění: {warnings}
Engraving Rytina
Fine Hatching Jemné šrafování
Dense Hatching Husté šrafování
Tapered Hatching Zúžené šrafování
Broken Hatching Přerušované šrafování
Image Brush Obrazové štětce
Soft Bloom Jemný květ
Halftone Field Polotónové pole
Can't render this file because it is too large.
+25
View File
@@ -5632,6 +5632,11 @@ digits Malayalam Malayalam
Place the pages with the placement again Placér siderne igen med placeringen
Placement: Placering:
Preserve CMYK Numbers Bevar CMYK-tal
Preserve RGB Numbers Bevar RGB-tal
Device to Simulate: Enhed, der simuleres:
Simulate Paper Color Simulér papirfarve
Simulate Black Ink Simulér sort blæk
Load… Indlæs…
Previous page Forrige side
Print Layers: Udskriv lag:
Print Preset: Udskriftsforudindstilling:
@@ -5709,6 +5714,10 @@ digits Malayalam Malayalam
Add Color Tool Værktøjet Tilføj farve
Remove Color Tool Værktøjet Fjern farve
Remove Color Fjern farve
Set As Base Color Angiv som grundfarve
Select Shade Vælg nuance
Add New Color Tilføj ny farve
Set Current Color As Base Color Angiv aktuel farve som grundfarve
Find the selected colors in the artwork Find de valgte farver i grafikken
Harmony Rules Harmoniregler
Keep this row's colors (exclude) Behold farverne i denne række (ekskludér)
@@ -7179,6 +7188,7 @@ font-technology Variable Variable
@plural {shown} of {n} result. Keep typing to narrow them.|{shown} of {n} results. Keep typing to narrow them. {shown} af {n} resultat. Skriv videre for at indsnævre dem.|{shown} af {n} resultater. Skriv videre for at indsnævre dem.
Recent Commands Seneste kommandoer
No recent commands Ingen seneste kommandoer
Type to search commands, tools, panels and effects Skriv for at søge i kommandoer, værktøjer, paneler og effekter
Dashed Line Stiplet linje
Panel menu Panelmenu
Unembed… Ophæv integrering…
@@ -7301,6 +7311,7 @@ font-technology Variable Variable
New type takes this language while Document Setup's language is English: USA; type already in a document keeps its own language. Ny tekst får dette sprog, så længe sproget i Dokumentopsætning er Engelsk: USA; tekst, der allerede er i et dokument, beholder sit eget sprog.
In paragraphs with Hyphenate on, a listed word breaks only at the hyphens typed in it, or nowhere when it has none, whatever its language or case. I afsnit med Orddeling slået til deles et ord på listen kun ved de bindestreger, der er skrevet i det, eller slet ikke uden nogen, uanset sprog og store eller små bogstaver.
On the desktop, the .wasm plug-ins in this folder load at startup and when you click OK with a new folder here, except in Safe Mode; the web version does not load them. I desktopversionen indlæses .wasm-plug-ins i denne mappe ved start, og når du klikker på OK med en ny mappe her, undtagen i sikker tilstand; webversionen indlæser dem ikke.
How many instructions each run of a plug-in object filter may use; Large allows more than Normal with the same 60-second limit. Heavy filters keep their own budget. Hvor mange instruktioner hver kørsel af et plug-ins objektfilter må bruge; Stor tillader flere end Normal med den samme grænse på 60 sekunder. Tunge filtre beholder deres eget budget.
The first scratch disk choice: Startup, None or a folder path; VectorCraft stores it but does not use scratch disks yet. Det første valg af midlertidig disk: Startup, None eller en mappesti; VectorCraft gemmer det, men bruger endnu ikke midlertidige diske.
The second scratch disk choice: Startup, None or a folder path; VectorCraft stores it but does not use scratch disks yet. Det andet valg af midlertidig disk: Startup, None eller en mappesti; VectorCraft gemmer det, men bruger endnu ikke midlertidige diske.
How light or dark the interface is. Hvor lys eller mørk brugergrænsefladen er.
@@ -7319,6 +7330,7 @@ font-technology Variable Variable
Animated Zoom works only while this is on; off, Animated Zoom is dimmed and zooming does not animate. Animeret zoom virker kun, mens dette er slået til; slået fra er Animeret zoom nedtonet, og zoom animeres ikke.
The wheel's zoom glides in, and the Zoom tool zooms as you drag sideways or hold it down; off, the Zoom tool zooms to the area you drag across. Zoom med hjulet glider blødt ind, og Zoomværktøjet zoomer, mens du trækker til siden eller holder det nede; slået fra zoomer Zoomværktøjet til det område, du trækker hen over.
From the next start, the desktop version draws with this kind of graphics processor; Automatic prefers the one that drives the display. The web version does not use it. Fra næste start tegner desktopversionen med denne type grafikprocessor; Automatisk foretrækker den, der styrer skærmen. Webversionen bruger den ikke.
From the next start, the window shows frames without waiting for the display to refresh, at most 240 a second; off, the display paces them. A present mode set at launch overrides it. Fra næste start viser vinduet billeder uden at vente på, at skærmen opdateres, højst 240 i sekundet; slået fra bestemmer skærmen tempoet. En visningstilstand angivet ved start har forrang.
The most undo steps each document keeps; lowering it drops the oldest steps when you click OK. Steps can also go sooner when they use too much memory. Det største antal fortryd-trin, hvert dokument beholder; et lavere tal fjerner de ældste trin, når du klikker på OK. Trin kan også forsvinde tidligere, når de bruger for meget hukommelse.
Shows the artwork changing while you drag; off, outlines follow the drag and the artwork changes when you release. A ruler guide always moves as you drag. Viser grafikken ændre sig, mens du trækker; slået fra følger konturer trækket, og grafikken ændres, når du slipper. En hjælpelinje fra linealen flytter sig altid, mens du trækker.
How many worker threads draw the artwork; -1 uses one fewer than the cores VectorCraft may use, at most 8, and 0 uses none. The web version always uses none. Hvor mange arbejdstråde der tegner grafikken; -1 bruger én færre end de kerner, VectorCraft må bruge, højst 8, og 0 ingen. Webversionen bruger aldrig nogen.
@@ -7345,6 +7357,10 @@ font-technology Variable Variable
VectorCraft stores this choice, but Copy and Cut do not use a legacy vector clipboard format yet. VectorCraft gemmer dette valg, men Kopiér og Klip bruger endnu ikke et format til den ældre vektorudklipsholder.
Preserve Paths or Preserve Appearance and Overprints for the legacy vector clipboard; VectorCraft stores the choice but does not use it yet. Bevar stier eller Bevar udseende og overprint for den ældre vektorudklipsholder; VectorCraft gemmer valget, men bruger det endnu ikke.
Keep Formatting keeps the styles of text copied from VectorCraft type when it is pasted into type; Keep Plain Text gives it the style where it lands. Bevar formatering beholder typografierne for tekst kopieret fra et tekstobjekt i VectorCraft, når den indsættes i et tekstobjekt; Bevar almindelig tekst giver den typografien, hvor den lander.
Display All Blacks as Rich Black shows pure CMYK black (black ink alone at 100%) as RGB black on the canvas; Display All Blacks Accurately converts it through the CMYK working space. Vis alle sorte som rich black viser ren CMYK-sort (kun sort blæk ved 100 %) som RGB-sort på lærredet; Vis alle sorte nøjagtigt konverterer den gennem arbejds-CMYK-farverummet.
Output All Blacks as Rich Black draws pure CMYK black as RGB black in RGB and grayscale raster exports and Print as Bitmap; it does not change vector exports, CMYK JPEG, TIFF and PSD, or other printing. Udskriv alle sorte som rich black tegner ren CMYK-sort som RGB-sort i RGB- og gråtone-rastereksporter og med Udskriv som bitmap; den ændrer ikke vektoreksporter, CMYK-JPEG, -TIFF og -PSD eller anden udskrivning.
On a touch screen, switches to the Touch workspace; turning this off, or losing the touch screen, goes back to the workspace it switched from. På en touchskærm skiftes til touch-arbejdsområdet; slås indstillingen fra, eller forsvinder touchskærmen, skiftes tilbage til det arbejdsområde, der var før.
A two-finger tap on the canvas undoes, or switches between selection and drawing tools in the Touch workspace, and a three-finger tap redoes; neither works in Presentation Mode. Et tryk med to fingre på lærredet fortryder eller skifter i touch-arbejdsområdet mellem markerings- og tegneværktøjer, og et tryk med tre fingre gør om; ingen af dem virker i præsentationstilstand.
New type takes this language while Document Setup's language is English: USA and [Normal Character Style] sets none; type already in a document keeps its own language. Ny tekst får dette sprog, så længe sproget i Dokumentopsætning er Engelsk: USA og [Normal tegnstil] ikke angiver et sprog; tekst, der allerede er i et dokument, beholder sit eget sprog.
In paragraphs with Hyphenate on, a listed word breaks only at the hyphens typed in it, or nowhere when it has none, whatever its case; Korean words take no hyphen, and Indian-language words do not break inside a character cluster. I afsnit med Orddeling slået til deles et ord på listen kun ved de bindestreger, der er skrevet i det, eller slet ikke uden nogen, uanset store eller små bogstaver; koreanske ord får ingen bindestreg, og ord på indiske sprog deles ikke inde i en tegngruppe.
Reset all preferences to their defaults? Nulstil alle præferencer til standard?
@@ -7907,6 +7923,7 @@ imageTrace Outline Kontur
@msg no native format intet indbygget format
@msg no pages ingen sider
@msg no pattern `{name}` intet mønster `{name}`
@msg art painted with `{name}` can't be its tile grafik malet med `{name}` kan ikke være dens flise
@msg no perspective grid preset named `{name}` ingen perspektivgitterforudindstilling med navnet `{name}`
@msg no plug-in {0} is installed plug-in'et {0} er ikke installeret
@msg no plug-in {id} is installed plug-in'et {id} er ikke installeret
@@ -8576,6 +8593,7 @@ imageTrace Outline Kontur
Arrow Pil
Arrow (open) Pil (åben)
Barbed Modhager
arrowhead Feather Fjer
Half Arrow (left) Halvpil (venstre)
Half Arrow (right) Halvpil (højre)
Concave Konkav
@@ -8603,6 +8621,7 @@ imageTrace Outline Kontur
Kite Drage
Triangle to Bar Trekant til bjælke
Oval Oval
Line Arrow Stregpil
Complementary Komplementær
Complementary 2 Komplementær 2
Split Complementary Delt komplementær
@@ -10351,6 +10370,7 @@ breakText Glyphs Glyffer
Remove Strokes Fjern streger
Place Brush Art Placér penselgrafik
Replace Brush Art Erstat penselgrafik
Replace Pattern Art Erstat mønstergrafik
Strokes use this brush. Apply the new art to those strokes, or leave them as they are and add a copy of the brush with the new art? Streger bruger denne pensel. Anvend den nye grafik på stregerne, eller lad dem være, som de er, og tilføj en kopi af penslen med den nye grafik?
Apply to Strokes Anvend på streger
Leave Strokes Bevar streger
@@ -10779,6 +10799,11 @@ breakText Glyphs Glyffer
@msg A joint does not close by {gap} pt. En samling lukker ikke med {gap} pt.
@msg Two panels pass through each other. To paneler går gennem hinanden.
@msg composer must be "singleLine", "everyLine", "standardSingleLine" or "standardEveryLine" composer skal være "singleLine", "everyLine", "standardSingleLine" eller "standardEveryLine"
Engraving Gravering
Fine Hatching Fin skravering
Dense Hatching Tæt skravering
Tapered Hatching Tilspidset skravering
Broken Hatching Afbrudt skravering
Image Brush Billedpensler
Soft Bloom Blød blomstring
Halftone Field Halvtonefelt
Can't render this file because it is too large.
+53
View File
@@ -1694,6 +1694,10 @@ file-filter Templates Vorlagen
Add Color Tool Farbe-hinzufügen-Werkzeug
Remove Color Tool Farbe-entfernen-Werkzeug
Remove Color Farbe entfernen
Set As Base Color Als Grundfarbe festlegen
Select Shade Schattierung auswählen
Add New Color Neue Farbe hinzufügen
Set Current Color As Base Color Aktuelle Farbe als Grundfarbe festlegen
Find the selected colors in the artwork Ausgewählte Farben in der Grafik finden
Harmony Sets Harmoniesätze
Height Höhe
@@ -2826,6 +2830,11 @@ diagnostics ui Oberfläche
Preserve Alpha Transparency Alphatransparenz beibehalten
Preserve Appearance and Overprints Aussehen und Überdrucken beibehalten
Preserve CMYK Numbers CMYK-Werte beibehalten
Preserve RGB Numbers RGB-Werte beibehalten
Device to Simulate: Zu simulierendes Gerät:
Simulate Paper Color Papierfarbe simulieren
Simulate Black Ink Schwarze Druckfarbe simulieren
Load… Laden…
Preserve Editing Capabilities Bearbeitungsfunktionen beibehalten
Preserve editing capabilities Bearbeitungsfunktionen beibehalten
Preserve Lightness Helligkeit beibehalten
@@ -3329,6 +3338,7 @@ digits Malayalam Malayalam
New type takes this language while Document Setup's language is English: USA; type already in a document keeps its own language. Neuer Text erhält diese Sprache, solange die Sprache unter „Dokument einrichten“ Englisch: USA ist; Text, der bereits in einem Dokument steht, behält seine Sprache.
In paragraphs with Hyphenate on, a listed word breaks only at the hyphens typed in it, or nowhere when it has none, whatever its language or case. In Absätzen mit eingeschalteter Silbentrennung wird ein aufgeführtes Wort nur an den darin eingegebenen Bindestrichen getrennt oder gar nicht, wenn es keine hat, unabhängig von Sprache und Groß- und Kleinschreibung.
On the desktop, the .wasm plug-ins in this folder load at startup and when you click OK with a new folder here, except in Safe Mode; the web version does not load them. In der Desktop-Version werden die .wasm-Plug-ins in diesem Ordner beim Start geladen und wenn Sie hier mit einem neuen Ordner auf OK klicken, außer im abgesicherten Modus; die Webversion lädt sie nicht.
How many instructions each run of a plug-in object filter may use; Large allows more than Normal with the same 60-second limit. Heavy filters keep their own budget. Wie viele Anweisungen jeder Lauf eines Objektfilters aus einem Plug-in verwenden darf; „Groß“ erlaubt mehr als „Normal“, bei derselben Grenze von 60 Sekunden. Aufwendige Filter behalten ihr eigenes Budget.
The first scratch disk choice: Startup, None or a folder path; VectorCraft stores it but does not use scratch disks yet. Die erste Wahl für das Arbeitsvolume: Startup, None oder ein Ordnerpfad; VectorCraft speichert sie, verwendet aber noch keine Arbeitsvolumes.
The second scratch disk choice: Startup, None or a folder path; VectorCraft stores it but does not use scratch disks yet. Die zweite Wahl für das Arbeitsvolume: Startup, None oder ein Ordnerpfad; VectorCraft speichert sie, verwendet aber noch keine Arbeitsvolumes.
How light or dark the interface is. Wie hell oder dunkel die Benutzeroberfläche ist.
@@ -3347,6 +3357,7 @@ digits Malayalam Malayalam
Animated Zoom works only while this is on; off, Animated Zoom is dimmed and zooming does not animate. „Animierter Zoom“ funktioniert nur, solange dies eingeschaltet ist; ausgeschaltet ist „Animierter Zoom“ abgeblendet und das Zoomen wird nicht animiert.
The wheel's zoom glides in, and the Zoom tool zooms as you drag sideways or hold it down; off, the Zoom tool zooms to the area you drag across. Der Zoom mit dem Mausrad gleitet weich, und das Zoom-Werkzeug zoomt, während Sie seitwärts ziehen oder es gedrückt halten; ausgeschaltet zoomt es auf den Bereich, über den Sie ziehen.
From the next start, the desktop version draws with this kind of graphics processor; Automatic prefers the one that drives the display. The web version does not use it. Ab dem nächsten Start zeichnet die Desktop-Version mit dieser Art von Grafikprozessor; „Automatisch“ bevorzugt den, der den Bildschirm ansteuert. Die Webversion verwendet sie nicht.
From the next start, the window shows frames without waiting for the display to refresh, at most 240 a second; off, the display paces them. A present mode set at launch overrides it. Ab dem nächsten Start zeigt das Fenster Bilder, ohne auf die Bildwiederholung des Bildschirms zu warten, höchstens 240 pro Sekunde; aus, gibt der Bildschirm den Takt vor. Ein beim Start festgelegter Darstellungsmodus hat Vorrang.
The most undo steps each document keeps; lowering it drops the oldest steps when you click OK. Steps can also go sooner when they use too much memory. Die Höchstzahl der Rückgängig-Schritte, die jedes Dokument behält; eine kleinere Zahl entfernt beim Klick auf OK die ältesten Schritte. Schritte können auch früher entfallen, wenn sie zu viel Speicher belegen.
Shows the artwork changing while you drag; off, outlines follow the drag and the artwork changes when you release. A ruler guide always moves as you drag. Zeigt beim Ziehen, wie sich das Bildmaterial ändert; ausgeschaltet folgen Umrisse dem Ziehen, und das Bildmaterial ändert sich beim Loslassen. Eine Hilfslinie aus dem Lineal bewegt sich beim Ziehen immer mit.
How many worker threads draw the artwork; -1 uses one fewer than the cores VectorCraft may use, at most 8, and 0 uses none. The web version always uses none. Wie viele Worker-Threads das Bildmaterial zeichnen; -1 verwendet einen weniger als die Kerne, die VectorCraft nutzen darf, höchstens 8, und 0 keinen. Die Webversion verwendet nie einen.
@@ -3373,6 +3384,10 @@ digits Malayalam Malayalam
VectorCraft stores this choice, but Copy and Cut do not use a legacy vector clipboard format yet. VectorCraft speichert diese Wahl, aber Kopieren und Ausschneiden verwenden noch kein Format der älteren Vektorzwischenablage.
Preserve Paths or Preserve Appearance and Overprints for the legacy vector clipboard; VectorCraft stores the choice but does not use it yet. „Pfade beibehalten“ oder „Aussehen und Überdrucken beibehalten“ für die ältere Vektorzwischenablage; VectorCraft speichert die Wahl, verwendet sie aber noch nicht.
Keep Formatting keeps the styles of text copied from VectorCraft type when it is pasted into type; Keep Plain Text gives it the style where it lands. „Formatierung beibehalten“ behält die Stile von Text aus einem Textobjekt in VectorCraft beim Einfügen in ein Textobjekt; „Nur Text beibehalten“ gibt ihm den Stil der Einfügestelle.
Display All Blacks as Rich Black shows pure CMYK black (black ink alone at 100%) as RGB black on the canvas; Display All Blacks Accurately converts it through the CMYK working space. „Alle Schwarztöne als tiefes Schwarz anzeigen“ zeigt reines CMYK-Schwarz (nur schwarze Farbe mit 100 %) auf der Arbeitsfläche als RGB-Schwarz; „Alle Schwarztöne genau anzeigen“ wandelt es über den CMYK-Arbeitsfarbraum um.
Output All Blacks as Rich Black draws pure CMYK black as RGB black in RGB and grayscale raster exports and Print as Bitmap; it does not change vector exports, CMYK JPEG, TIFF and PSD, or other printing. „Alle Schwarztöne als tiefes Schwarz ausgeben“ zeichnet reines CMYK-Schwarz in RGB- und Graustufen-Rasterexporten und bei „Als Bitmap drucken“ als RGB-Schwarz; Vektorexporte, CMYK-JPEG, -TIFF und -PSD und anderes Drucken ändert es nicht.
On a touch screen, switches to the Touch workspace; turning this off, or losing the touch screen, goes back to the workspace it switched from. Auf einem Touchscreen wird zum Touch-Arbeitsbereich gewechselt; beim Ausschalten oder wenn kein Touchscreen mehr erkannt wird, kehrt es zum vorherigen Arbeitsbereich zurück.
A two-finger tap on the canvas undoes, or switches between selection and drawing tools in the Touch workspace, and a three-finger tap redoes; neither works in Presentation Mode. Tippen mit zwei Fingern auf die Arbeitsfläche macht rückgängig oder wechselt im Touch-Arbeitsbereich zwischen Auswahl- und Zeichenwerkzeugen, Tippen mit drei Fingern wiederholt; beides wirkt nicht im Präsentationsmodus.
New type takes this language while Document Setup's language is English: USA and [Normal Character Style] sets none; type already in a document keeps its own language. Neuer Text erhält diese Sprache, solange die Sprache unter „Dokument einrichten“ Englisch: USA ist und [Normales Zeichenformat] keine Sprache festlegt; Text, der bereits in einem Dokument steht, behält seine Sprache.
In paragraphs with Hyphenate on, a listed word breaks only at the hyphens typed in it, or nowhere when it has none, whatever its case; Korean words take no hyphen, and Indian-language words do not break inside a character cluster. In Absätzen mit Silbentrennung wird ein aufgeführtes Wort nur an seinen eingegebenen Bindestrichen getrennt, ohne solche gar nicht, unabhängig von Groß- und Kleinschreibung; koreanische Wörter erhalten keinen Trennstrich, Wörter indischer Sprachen keine Trennung in einer Zeichengruppe.
Reset all preferences to their defaults? Alle Voreinstellungen auf ihre Standardwerte zurücksetzen?
@@ -3619,6 +3634,7 @@ digits Malayalam Malayalam
@plural {shown} of {n} result. Keep typing to narrow them.|{shown} of {n} results. Keep typing to narrow them. {shown} von {n} Ergebnis. Tippen Sie weiter, um sie einzugrenzen.|{shown} von {n} Ergebnissen. Tippen Sie weiter, um sie einzugrenzen.
Recent Commands Zuletzt verwendete Befehle
No recent commands Keine zuletzt verwendeten Befehle
Type to search commands, tools, panels and effects Tippen, um Befehle, Werkzeuge, Bedienfelder und Effekte zu suchen
Search commands Befehle suchen
Search Commands… Befehle suchen…
Secondary Sekundär
@@ -5290,6 +5306,7 @@ liquify-list-end {0}, {1} {0} und {1}
@msg no native format kein natives Format
@msg no pages keine Seiten
@msg no pattern `{name}` kein Muster `{name}`
@msg art painted with `{name}` can't be its tile mit `{name}` gefärbtes Bildmaterial kann nicht dessen Kachel sein
@msg no perspective grid preset named `{name}` keine Vorgabe für Perspektivenraster namens `{name}`
@msg no plug-in {0} is installed es ist kein Plug-in {0} installiert
@msg no plug-in {id} is installed es ist kein Plug-in {id} installiert
@@ -7601,6 +7618,36 @@ anchor Points: Punkte:
@msg `{id}` is not a colour adjustment `{id}` ist keine Farbkorrektur
@msg missing `effect` `effect` fehlt
@msg `params` must be an object `params` muss ein Objekt sein
# Stroke arrowheads (Stroke panel, Dimension Tool Options and Properties › Arrow Style).
Triangle (open) Dreieck (offen)
Circle (open) Kreis (offen)
Square (open) Quadrat (offen)
Arrow (open) Pfeil (offen)
Barbed Mit Widerhaken
arrowhead Feather Feder
Half Arrow (left) Halber Pfeil (links)
Half Arrow (right) Halber Pfeil (rechts)
Double Bar Doppelbalken
Dot on Bar Punkt auf Balken
Chevron Winkel
Plus Plus
Hexagon (open) Sechseck (offen)
Tag Etikett
Tag (open) Etikett (offen)
Half Circle Halbkreis
Drop Tropfen
Slash Schrägstrich
Double Slash Doppelter Schrägstrich
Diamond (open) Raute (offen)
Reverse Triangle Umgekehrtes Dreieck
Swallowtail Schwalbenschwanz
Bracket Klammer
Fork Gabel
Leaf Blatt
Kite Drachen
Triangle to Bar Dreieck zu Balken
Oval Oval
Line Arrow Linienpfeil
# Path Precision Tools add-on (Object › Plug-ins › Path Precision Tools): its tools, Anchor Inspector panel, commands and messages.
Path Precision Tools Pfad-Präzisionswerkzeuge
Anchor Eraser Brush Ankerpunkt-Radierpinsel
@@ -7891,6 +7938,7 @@ breakText Glyphs Glyphen
Remove Strokes Konturen entfernen
Place Brush Art Pinselgrafik platzieren
Replace Brush Art Pinselgrafik ersetzen
Replace Pattern Art Mustergrafik ersetzen
Strokes use this brush. Apply the new art to those strokes, or leave them as they are and add a copy of the brush with the new art? Konturen verwenden diesen Pinsel. Die neue Grafik auf diese Konturen anwenden oder sie unverändert lassen und eine Kopie des Pinsels mit der neuen Grafik hinzufügen?
Apply to Strokes Auf Konturen anwenden
Leave Strokes Konturen beibehalten
@@ -10330,6 +10378,11 @@ breakText Glyphs Glyphen
@msg A panel is not joined to the rest by a crease. Ein Feld ist durch keine Rilllinie mit den übrigen verbunden.
@msg A fold line is on a non-printing layer. Eine Faltlinie liegt auf einer nicht druckbaren Ebene.
@msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} Felder: {panels}, Scharniere: {hinges}, Fehler: {errors}, Warnungen: {warnings}
Engraving Gravur
Fine Hatching Feine Schraffur
Dense Hatching Dichte Schraffur
Tapered Hatching Verjüngte Schraffur
Broken Hatching Unterbrochene Schraffur
Image Brush Bildpinsel
Soft Bloom Sanfte Blüte
Halftone Field Rasterfeld
Can't render this file because it is too large.
+25
View File
@@ -1617,6 +1617,10 @@ font-technology Variable Μεταβλητές
Add Color Tool Εργαλείο προσθήκης χρώματος
Remove Color Tool Εργαλείο αφαίρεσης χρώματος
Remove Color Αφαίρεση χρώματος
Set As Base Color Ορισμός ως βασικό χρώμα
Select Shade Επιλογή απόχρωσης
Add New Color Προσθήκη νέου χρώματος
Set Current Color As Base Color Ορισμός τρέχοντος χρώματος ως βασικού
Find the selected colors in the artwork Εύρεση των επιλεγμένων χρωμάτων στο σχέδιο
Harmony Sets Σύνολα χρωματικής αρμονίας
Height Ύψος
@@ -1972,6 +1976,7 @@ font-technology Variable Μεταβλητές
Lighten Φώτισμα
Lightness Φωτεινότητα
Line Γραμμή
Line Arrow Γραμμικό βέλος
Line Segment Tool Ευθύγραμμο τμήμα (Line Segment Tool)
Linear Gradient Γραμμικό ντεγκραντέ
Lines Γραμμές
@@ -3762,6 +3767,11 @@ theme Appearance Εμφάνιση
Preserve Alpha Transparency Διατήρηση διαφάνειας άλφα
Preserve Appearance and Overprints Διατήρηση εμφάνισης και υπερεκτυπώσεων
Preserve CMYK Numbers Διατήρηση τιμών CMYK
Preserve RGB Numbers Διατήρηση τιμών RGB
Device to Simulate: Συσκευή προς προσομοίωση:
Simulate Paper Color Προσομοίωση χρώματος χαρτιού
Simulate Black Ink Προσομοίωση μαύρης μελάνης
Load… Φόρτωση…
Preserve Editing Capabilities Διατήρηση δυνατοτήτων επεξεργασίας
Preserve editing capabilities Διατήρηση δυνατοτήτων επεξεργασίας
Preserve Lightness Διατήρηση φωτεινότητας
@@ -4181,6 +4191,7 @@ digits Malayalam Μαλαγιάλαμ
New type takes this language while Document Setup's language is English: USA; type already in a document keeps its own language. Το νέο κείμενο παίρνει αυτήν τη γλώσσα όσο η γλώσσα στη Ρύθμιση εγγράφου είναι Αγγλικά: ΗΠΑ· το κείμενο που υπάρχει ήδη σε ένα έγγραφο κρατά τη δική του γλώσσα.
In paragraphs with Hyphenate on, a listed word breaks only at the hyphens typed in it, or nowhere when it has none, whatever its language or case. Σε παραγράφους με ενεργό τον Συλλαβισμό, μια λέξη της λίστας χωρίζεται μόνο στα ενωτικά που έχουν πληκτρολογηθεί σε αυτήν ή πουθενά αν δεν έχει, ανεξάρτητα από τη γλώσσα ή τα πεζά-κεφαλαία της.
On the desktop, the .wasm plug-ins in this folder load at startup and when you click OK with a new folder here, except in Safe Mode; the web version does not load them. Στην έκδοση για υπολογιστή, τα πρόσθετα .wasm αυτού του φακέλου φορτώνονται κατά την εκκίνηση και όταν κάνετε κλικ στο Εντάξει με νέο φάκελο εδώ, εκτός από την Ασφαλή λειτουργία· η έκδοση web δεν τα φορτώνει.
How many instructions each run of a plug-in object filter may use; Large allows more than Normal with the same 60-second limit. Heavy filters keep their own budget. Πόσες εντολές μπορεί να χρησιμοποιεί κάθε εκτέλεση φίλτρου αντικειμένων επέκτασης· το Μεγάλο επιτρέπει περισσότερες από το Κανονική, με το ίδιο όριο 60 δευτερολέπτων. Τα βαριά φίλτρα κρατούν το δικό τους όριο.
The first scratch disk choice: Startup, None or a folder path; VectorCraft stores it but does not use scratch disks yet. Η πρώτη επιλογή δίσκου προσωρινής αποθήκευσης: Startup, None ή διαδρομή φακέλου· το VectorCraft την αποθηκεύει, αλλά δεν χρησιμοποιεί ακόμη δίσκους προσωρινής αποθήκευσης.
The second scratch disk choice: Startup, None or a folder path; VectorCraft stores it but does not use scratch disks yet. Η δεύτερη επιλογή δίσκου προσωρινής αποθήκευσης: Startup, None ή διαδρομή φακέλου· το VectorCraft την αποθηκεύει, αλλά δεν χρησιμοποιεί ακόμη δίσκους προσωρινής αποθήκευσης.
How light or dark the interface is. Πόσο φωτεινό ή σκοτεινό είναι το περιβάλλον χρήστη.
@@ -4199,6 +4210,7 @@ digits Malayalam Μαλαγιάλαμ
Animated Zoom works only while this is on; off, Animated Zoom is dimmed and zooming does not animate. Η Κινούμενη μεγέθυνση λειτουργεί μόνο όσο αυτό είναι ενεργό· όταν είναι ανενεργό, η Κινούμενη μεγέθυνση είναι αχνή και η μεγέθυνση δεν κινείται.
The wheel's zoom glides in, and the Zoom tool zooms as you drag sideways or hold it down; off, the Zoom tool zooms to the area you drag across. Η μεγέθυνση με τον τροχό γλιστρά ομαλά, και το εργαλείο Μεγέθυνση μεγεθύνει καθώς σύρετε στο πλάι ή το κρατάτε πατημένο· όταν είναι ανενεργό, μεγεθύνει στην περιοχή που σύρετε.
From the next start, the desktop version draws with this kind of graphics processor; Automatic prefers the one that drives the display. The web version does not use it. Από την επόμενη εκκίνηση, η έκδοση για υπολογιστή σχεδιάζει με αυτό το είδος επεξεργαστή γραφικών· το Αυτόματο προτιμά αυτόν που οδηγεί την οθόνη. Η έκδοση web δεν το χρησιμοποιεί.
From the next start, the window shows frames without waiting for the display to refresh, at most 240 a second; off, the display paces them. A present mode set at launch overrides it. Από την επόμενη εκκίνηση, το παράθυρο δείχνει τα καρέ χωρίς αναμονή για ανανέωση της οθόνης, έως 240 το δευτερόλεπτο· ανενεργό, τα ρυθμίζει η οθόνη. Υπερισχύει η λειτουργία που ορίζεται στην εκκίνηση.
The most undo steps each document keeps; lowering it drops the oldest steps when you click OK. Steps can also go sooner when they use too much memory. Τα περισσότερα βήματα αναίρεσης που κρατά κάθε έγγραφο· μικρότερος αριθμός αφαιρεί τα παλαιότερα βήματα όταν κάνετε κλικ στο Εντάξει. Βήματα μπορεί να φύγουν και νωρίτερα αν πιάνουν πολλή μνήμη.
Shows the artwork changing while you drag; off, outlines follow the drag and the artwork changes when you release. A ruler guide always moves as you drag. Δείχνει το έργο να αλλάζει όσο σύρετε· όταν είναι ανενεργό, περιγράμματα ακολουθούν τη μεταφορά και το έργο αλλάζει όταν αφήσετε. Ένας οδηγός χάρακα κινείται πάντα όσο σύρετε.
How many worker threads draw the artwork; -1 uses one fewer than the cores VectorCraft may use, at most 8, and 0 uses none. The web version always uses none. Πόσα νήματα εργασίας σχεδιάζουν το έργο· το -1 χρησιμοποιεί ένα λιγότερο από τους πυρήνες που επιτρέπονται στο VectorCraft, έως 8, και το 0 κανένα. Η έκδοση web δεν χρησιμοποιεί ποτέ.
@@ -4225,6 +4237,10 @@ digits Malayalam Μαλαγιάλαμ
VectorCraft stores this choice, but Copy and Cut do not use a legacy vector clipboard format yet. Το VectorCraft αποθηκεύει αυτή την επιλογή, αλλά η Αντιγραφή και η Αποκοπή δεν χρησιμοποιούν ακόμη μορφή του πρόχειρου διανυσμάτων παλαιού τύπου.
Preserve Paths or Preserve Appearance and Overprints for the legacy vector clipboard; VectorCraft stores the choice but does not use it yet. Διατήρηση διαδρομών ή Διατήρηση εμφάνισης και υπερεκτυπώσεων για το πρόχειρο διανυσμάτων παλαιού τύπου· το VectorCraft αποθηκεύει την επιλογή αλλά δεν τη χρησιμοποιεί ακόμη.
Keep Formatting keeps the styles of text copied from VectorCraft type when it is pasted into type; Keep Plain Text gives it the style where it lands. Η Διατήρηση μορφοποίησης κρατά τα στυλ κειμένου από αντικείμενο κειμένου του VectorCraft όταν επικολλάται σε αντικείμενο κειμένου· η Διατήρηση απλού κειμένου του δίνει το στυλ του σημείου όπου καταλήγει.
Display All Blacks as Rich Black shows pure CMYK black (black ink alone at 100%) as RGB black on the canvas; Display All Blacks Accurately converts it through the CMYK working space. Η Εμφάνιση όλων των μαύρων ως πλούσιο μαύρο δείχνει το καθαρό μαύρο CMYK (μόνο μαύρο μελάνι στο 100%) ως μαύρο RGB στον καμβά· η Ακριβής απεικόνιση όλων των μαύρων το μετατρέπει μέσω του χώρου εργασίας CMYK.
Output All Blacks as Rich Black draws pure CMYK black as RGB black in RGB and grayscale raster exports and Print as Bitmap; it does not change vector exports, CMYK JPEG, TIFF and PSD, or other printing. Η Απόδοση όλων των μαύρων ως πλούσιο μαύρο σχεδιάζει το καθαρό μαύρο CMYK ως μαύρο RGB στις εξαγωγές raster RGB και κλίμακας του γκρι και με την Εκτύπωση ως bitmap· δεν αλλάζει τις διανυσματικές εξαγωγές, τα CMYK JPEG, TIFF και PSD ή την άλλη εκτύπωση.
On a touch screen, switches to the Touch workspace; turning this off, or losing the touch screen, goes back to the workspace it switched from. Σε οθόνη αφής μεταβαίνει στον χώρο εργασίας αφής· η απενεργοποίηση ή η απώλεια της οθόνης αφής επαναφέρει τον χώρο εργασίας που υπήρχε πριν.
A two-finger tap on the canvas undoes, or switches between selection and drawing tools in the Touch workspace, and a three-finger tap redoes; neither works in Presentation Mode. Το πάτημα με δύο δάχτυλα στον καμβά κάνει αναίρεση ή, στον χώρο εργασίας αφής, εναλλάσσει εργαλεία επιλογής και σχεδίασης, και το πάτημα με τρία δάχτυλα κάνει επανάληψη· κανένα δεν λειτουργεί στη λειτουργία παρουσίασης.
New type takes this language while Document Setup's language is English: USA and [Normal Character Style] sets none; type already in a document keeps its own language. Το νέο κείμενο παίρνει αυτήν τη γλώσσα όσο η γλώσσα στη Ρύθμιση εγγράφου είναι Αγγλικά: ΗΠΑ και το [Κανονικό στυλ χαρακτήρων] δεν ορίζει γλώσσα· το κείμενο που υπάρχει ήδη σε ένα έγγραφο κρατά τη δική του γλώσσα.
In paragraphs with Hyphenate on, a listed word breaks only at the hyphens typed in it, or nowhere when it has none, whatever its case; Korean words take no hyphen, and Indian-language words do not break inside a character cluster. Με Συλλαβισμό, μια λέξη της λίστας χωρίζεται μόνο στα ενωτικά της ή πουθενά αν δεν έχει, με πεζά ή κεφαλαία· οι κορεατικές λέξεις δεν παίρνουν ενωτικό, οι λέξεις ινδικών γλωσσών δεν χωρίζονται μέσα σε ομάδα χαρακτήρων.
Reset all preferences to their defaults? Επαναφορά όλων των προτιμήσεων στις προεπιλογές τους;
@@ -4354,6 +4370,7 @@ digits Malayalam Μαλαγιάλαμ
@plural {shown} of {n} result. Keep typing to narrow them.|{shown} of {n} results. Keep typing to narrow them. {shown} από {n} αποτέλεσμα. Συνεχίστε να πληκτρολογείτε για να τα περιορίσετε.|{shown} από {n} αποτελέσματα. Συνεχίστε να πληκτρολογείτε για να τα περιορίσετε.
Recent Commands Πρόσφατες εντολές
No recent commands Δεν υπάρχουν πρόσφατες εντολές
Type to search commands, tools, panels and effects Πληκτρολογήστε για αναζήτηση εντολών, εργαλείων, πλαισίων και εφέ
Search commands Αναζήτηση εντολών
Search Commands… Αναζήτηση εντολών…
Secondary Δευτερεύον
@@ -5349,6 +5366,7 @@ digits Malayalam Μαλαγιάλαμ
@msg no native format δεν υπάρχει εγγενής μορφή
@msg no pages δεν υπάρχουν σελίδες
@msg no pattern `{name}` δεν υπάρχει μοτίβο `{name}`
@msg art painted with `{name}` can't be its tile σχέδιο βαμμένο με `{name}` δεν μπορεί να είναι το πλακίδιό του
@msg no perspective grid preset named `{name}` δεν υπάρχει προεπιλογή πλέγματος προοπτικής με όνομα `{name}`
@msg no plug-in {0} is installed δεν είναι εγκατεστημένο το πρόσθετο {0}
@msg no plug-in {id} is installed δεν είναι εγκατεστημένο το πρόσθετο {id}
@@ -6286,6 +6304,7 @@ variable-list-end {0}, {1} {0} και {1}
Auto Size Αυτόματο μέγεθος
Bar Ράβδος
Barbed Αγκιστρωτό
arrowhead Feather Φτερό
Baseline (Standard) Γραμμή βάσης (τυπική)
Baseline Optimized Βελτιστοποιημένο για γραμμή βάσης
Black Outline Μαύρο περίγραμμα
@@ -8286,6 +8305,7 @@ breakText Glyphs Γλύφοι
Remove Strokes Αφαίρεση περιγραμμάτων
Place Brush Art Τοποθέτηση σχεδίου πινέλου
Replace Brush Art Αντικατάσταση σχεδίου πινέλου
Replace Pattern Art Αντικατάσταση σχεδίου μοτίβου
Strokes use this brush. Apply the new art to those strokes, or leave them as they are and add a copy of the brush with the new art? Περιγράμματα χρησιμοποιούν αυτό το πινέλο. Να εφαρμοστεί το νέο σχέδιο σε αυτά τα περιγράμματα ή να μείνουν ως έχουν και να προστεθεί αντίγραφο του πινέλου με το νέο σχέδιο;
Apply to Strokes Εφαρμογή στα περιγράμματα
Leave Strokes Διατήρηση περιγραμμάτων
@@ -8866,6 +8886,11 @@ breakText Glyphs Γλύφοι
@msg A joint does not close by {gap} pt. Μια ένωση δεν κλείνει κατά {gap} pt.
@msg Two panels pass through each other. Δύο πάνελ διαπερνούν το ένα το άλλο.
@msg composer must be "singleLine", "everyLine", "standardSingleLine" or "standardEveryLine" το composer πρέπει να είναι "singleLine", "everyLine", "standardSingleLine" ή "standardEveryLine"
Engraving Χαρακτική
Fine Hatching Λεπτή διαγράμμιση
Dense Hatching Πυκνή διαγράμμιση
Tapered Hatching Κωνική διαγράμμιση
Broken Hatching Διακεκομμένη διαγράμμιση
Image Brush Πινέλα εικόνας
Soft Bloom Απαλό άνθος
Halftone Field Πεδίο ημιτόνων
Can't render this file because it is too large.
+26
View File
@@ -1707,6 +1707,10 @@ font-technology Variable Variables
Add Color Tool Herramienta Añadir color
Remove Color Tool Herramienta Eliminar color
Remove Color Eliminar color
Set As Base Color Establecer como color base
Select Shade Seleccionar matiz
Add New Color Añadir nuevo color
Set Current Color As Base Color Establecer el color actual como color base
Find the selected colors in the artwork Buscar los colores seleccionados en la ilustración
Harmony Sets Conjuntos de armonía
Height Altura
@@ -2866,6 +2870,11 @@ font-technology Variable Variables
Preserve Alpha Transparency Conservar transparencia alfa
Preserve Appearance and Overprints Conservar apariencia y sobreimpresiones
Preserve CMYK Numbers Conservar valores CMYK
Preserve RGB Numbers Conservar valores RGB
Device to Simulate: Dispositivo que simular:
Simulate Paper Color Simular color del papel
Simulate Black Ink Simular tinta negra
Load… Cargar…
Preserve Editing Capabilities Conservar capacidades de edición
Preserve editing capabilities Conservar capacidades de edición
Preserve Lightness Conservar luminosidad
@@ -3366,6 +3375,7 @@ digits Malayalam Malayálam
New type takes this language while Document Setup's language is English: USA; type already in a document keeps its own language. El texto nuevo toma este idioma mientras el idioma de Ajustar documento sea Inglés: Estados Unidos; el texto que ya está en un documento conserva su idioma.
In paragraphs with Hyphenate on, a listed word breaks only at the hyphens typed in it, or nowhere when it has none, whatever its language or case. En los párrafos con Separar con guiones activado, una palabra de la lista se divide solo en los guiones escritos en ella, o en ningún punto si no tiene, sea cual sea su idioma o uso de mayúsculas.
On the desktop, the .wasm plug-ins in this folder load at startup and when you click OK with a new folder here, except in Safe Mode; the web version does not load them. En la versión de escritorio, los plugins .wasm de esta carpeta se cargan al iniciar y al hacer clic en Aceptar con una carpeta nueva aquí, salvo en Modo seguro; la versión web no los carga.
How many instructions each run of a plug-in object filter may use; Large allows more than Normal with the same 60-second limit. Heavy filters keep their own budget. Cuántas instrucciones puede usar cada ejecución de un filtro de objetos de un plugin; Grande permite más que Normal con el mismo límite de 60 segundos. Los filtros pesados conservan su propio presupuesto.
The first scratch disk choice: Startup, None or a folder path; VectorCraft stores it but does not use scratch disks yet. La primera opción de disco de memoria virtual: Startup, None o la ruta de una carpeta; VectorCraft la guarda, pero aún no usa discos de memoria virtual.
The second scratch disk choice: Startup, None or a folder path; VectorCraft stores it but does not use scratch disks yet. La segunda opción de disco de memoria virtual: Startup, None o la ruta de una carpeta; VectorCraft la guarda, pero aún no usa discos de memoria virtual.
How light or dark the interface is. Lo clara u oscura que es la interfaz.
@@ -3384,6 +3394,7 @@ digits Malayalam Malayálam
Animated Zoom works only while this is on; off, Animated Zoom is dimmed and zooming does not animate. El Zoom animado solo funciona mientras esto está activado; desactivado, el Zoom animado aparece atenuado y el zoom no se anima.
The wheel's zoom glides in, and the Zoom tool zooms as you drag sideways or hold it down; off, the Zoom tool zooms to the area you drag across. El zoom con la rueda se desliza suavemente, y la Herramienta Zoom amplía mientras arrastra de lado o la mantiene pulsada; desactivado, la Herramienta Zoom amplía el área que arrastra.
From the next start, the desktop version draws with this kind of graphics processor; Automatic prefers the one that drives the display. The web version does not use it. A partir del próximo inicio, la versión de escritorio dibuja con este tipo de procesador gráfico; Automático prefiere el que controla la pantalla. La versión web no lo usa.
From the next start, the window shows frames without waiting for the display to refresh, at most 240 a second; off, the display paces them. A present mode set at launch overrides it. A partir del próximo inicio, la ventana muestra los fotogramas sin esperar a que la pantalla se actualice, como máximo 240 por segundo; desactivado, la pantalla marca el ritmo. Un modo de presentación definido al iniciar tiene prioridad.
The most undo steps each document keeps; lowering it drops the oldest steps when you click OK. Steps can also go sooner when they use too much memory. El máximo de pasos de deshacer que conserva cada documento; un número menor quita los pasos más antiguos al hacer clic en Aceptar. Los pasos también pueden irse antes si ocupan demasiada memoria.
Shows the artwork changing while you drag; off, outlines follow the drag and the artwork changes when you release. A ruler guide always moves as you drag. Muestra cómo cambia el arte mientras arrastra; desactivado, los contornos siguen el arrastre y el arte cambia al soltar. Una guía de regla siempre se mueve mientras arrastra.
How many worker threads draw the artwork; -1 uses one fewer than the cores VectorCraft may use, at most 8, and 0 uses none. The web version always uses none. Cuántos hilos de trabajo dibujan el arte; -1 usa uno menos que los núcleos que VectorCraft puede usar, como máximo 8, y 0 ninguno. La versión web nunca usa ninguno.
@@ -3410,6 +3421,10 @@ digits Malayalam Malayálam
VectorCraft stores this choice, but Copy and Cut do not use a legacy vector clipboard format yet. VectorCraft guarda esta opción, pero Copiar y Cortar aún no usan ningún formato de portapapeles vectorial heredado.
Preserve Paths or Preserve Appearance and Overprints for the legacy vector clipboard; VectorCraft stores the choice but does not use it yet. Conservar trazados o Conservar apariencia y sobreimpresiones para el portapapeles vectorial heredado; VectorCraft guarda la opción, pero aún no la usa.
Keep Formatting keeps the styles of text copied from VectorCraft type when it is pasted into type; Keep Plain Text gives it the style where it lands. Mantener formato conserva los estilos del texto copiado de un objeto de texto de VectorCraft al pegarlo en un objeto de texto; Mantener texto sin formato le da el estilo del lugar donde cae.
Display All Blacks as Rich Black shows pure CMYK black (black ink alone at 100%) as RGB black on the canvas; Display All Blacks Accurately converts it through the CMYK working space. Mostrar todos los negros como negro enriquecido muestra el negro CMYK puro (solo tinta negra al 100 %) como negro RGB en el lienzo; Mostrar todos los negros con precisión lo convierte mediante el espacio CMYK de trabajo.
Output All Blacks as Rich Black draws pure CMYK black as RGB black in RGB and grayscale raster exports and Print as Bitmap; it does not change vector exports, CMYK JPEG, TIFF and PSD, or other printing. Imprimir todos los negros como negro enriquecido dibuja el negro CMYK puro como negro RGB en las exportaciones ráster RGB y en escala de grises y con Imprimir como mapa de bits; no cambia las exportaciones vectoriales, los JPEG, TIFF y PSD CMYK ni otras impresiones.
On a touch screen, switches to the Touch workspace; turning this off, or losing the touch screen, goes back to the workspace it switched from. En una pantalla táctil, cambia al espacio de trabajo táctil; al desactivarlo o dejar de detectarse la pantalla táctil, vuelve al espacio de trabajo anterior al cambio.
A two-finger tap on the canvas undoes, or switches between selection and drawing tools in the Touch workspace, and a three-finger tap redoes; neither works in Presentation Mode. Un toque con dos dedos en el lienzo deshace o, en el espacio de trabajo táctil, alterna entre herramientas de selección y de dibujo, y un toque con tres dedos rehace; ninguno funciona en el modo de presentación.
New type takes this language while Document Setup's language is English: USA and [Normal Character Style] sets none; type already in a document keeps its own language. El texto nuevo toma este idioma mientras el idioma de Ajustar documento sea Inglés: Estados Unidos y [Estilo de carácter normal] no defina ninguno; el texto que ya está en un documento conserva su idioma.
In paragraphs with Hyphenate on, a listed word breaks only at the hyphens typed in it, or nowhere when it has none, whatever its case; Korean words take no hyphen, and Indian-language words do not break inside a character cluster. En los párrafos con Separar con guiones activado, una palabra de la lista se divide solo en los guiones escritos en ella, o en ningún punto si no tiene, sea cual sea su uso de mayúsculas; las palabras coreanas no llevan guion, y las palabras en lenguas indias no se dividen dentro de un grupo de caracteres.
Reset all preferences to their defaults? ¿Restablecer todas las preferencias a sus valores predeterminados?
@@ -3652,6 +3667,7 @@ digits Malayalam Malayálam
@plural {shown} of {n} result. Keep typing to narrow them.|{shown} of {n} results. Keep typing to narrow them. {shown} de {n} resultado. Sigue escribiendo para acotarlos.|{shown} de {n} resultados. Sigue escribiendo para acotarlos.
Recent Commands Comandos recientes
No recent commands No hay comandos recientes
Type to search commands, tools, panels and effects Escriba para buscar comandos, herramientas, paneles y efectos
Search commands Buscar comandos
Search Commands… Buscar comandos…
Secondary Secundario
@@ -5401,6 +5417,7 @@ liquify-list-end {0}, {1} {0}, {1}
@msg no native format no hay formato nativo
@msg no pages no hay páginas
@msg no pattern `{name}` no existe el motivo `{name}`
@msg art painted with `{name}` can't be its tile una ilustración pintada con `{name}` no puede ser su azulejo
@msg no perspective grid preset named `{name}` no hay ningún preajuste de cuadrícula de perspectiva llamado `{name}`
@msg no plug-in {0} is installed no hay ningún plugin {0} instalado
@msg no plug-in {id} is installed no hay ningún plugin {id} instalado
@@ -6453,6 +6470,8 @@ effect Regular Regular
Arrow Flecha
Arrow (open) Flecha (abierta)
Barbed Con púas
arrowhead Feather Emplumado
arrowhead Target Diana
Half Arrow (left) Media flecha (izquierda)
Half Arrow (right) Media flecha (derecha)
Concave Cóncava
@@ -6480,6 +6499,7 @@ effect Regular Regular
Kite Cometa
Triangle to Bar Triángulo a barra
Oval Óvalo
Line Arrow Flecha de líneas
Complementary Complementario
Complementary 2 Complementario 2
Split Complementary Complementario dividido
@@ -8271,6 +8291,7 @@ breakText Glyphs Glifos
Remove Strokes Quitar trazos
Place Brush Art Colocar ilustración del pincel
Replace Brush Art Reemplazar ilustración del pincel
Replace Pattern Art Reemplazar ilustración del motivo
Strokes use this brush. Apply the new art to those strokes, or leave them as they are and add a copy of the brush with the new art? Algunos trazos usan este pincel. ¿Aplicar la nueva ilustración a esos trazos, o dejarlos como están y añadir una copia del pincel con la nueva ilustración?
Apply to Strokes Aplicar a los trazos
Leave Strokes Dejar los trazos
@@ -10609,6 +10630,11 @@ breakText Glyphs Glifos
@msg A joint does not close by {gap} pt. Una unión no cierra por {gap} pt.
@msg Two panels pass through each other. Dos paneles se atraviesan entre sí.
@msg composer must be "singleLine", "everyLine", "standardSingleLine" or "standardEveryLine" composer debe ser "singleLine", "everyLine", "standardSingleLine" o "standardEveryLine"
Engraving Grabado
Fine Hatching Rayado fino
Dense Hatching Rayado denso
Tapered Hatching Rayado afilado
Broken Hatching Rayado discontinuo
Image Brush Pinceles de imagen
Soft Bloom Flor suave
Halftone Field Campo de semitonos
Can't render this file because it is too large.
+25
View File
@@ -3050,6 +3050,11 @@ digits Malayalam Malajalam
Place the pages with the placement again Sijoita sivut uudelleen sijoittelun mukaan
Placement: Sijoittelu:
Preserve CMYK Numbers Säilytä CMYK-arvot
Preserve RGB Numbers Säilytä RGB-arvot
Device to Simulate: Simuloitava laite:
Simulate Paper Color Simuloi paperin väriä
Simulate Black Ink Simuloi mustaa mustetta
Load… Lataa…
Previous page Edellinen sivu
Print Layers: Tulosta tasot:
Print Preset: Tulostuksen esiasetus:
@@ -3127,6 +3132,10 @@ digits Malayalam Malajalam
Add Color Tool Lisää väri -työkalu
Remove Color Tool Poista väri -työkalu
Remove Color Poista väri
Set As Base Color Aseta perusväriksi
Select Shade Valitse sävy
Add New Color Lisää uusi väri
Set Current Color As Base Color Aseta nykyinen väri perusväriksi
Find the selected colors in the artwork Etsi valitut värit kuvituksesta
Harmony Rules Harmoniasäännöt
Keep this row's colors (exclude) Säilytä tämän rivin värit (jätä pois)
@@ -4646,6 +4655,7 @@ font-technology Variable Muuttuvat
@plural {shown} of {n} result. Keep typing to narrow them.|{shown} of {n} results. Keep typing to narrow them. {shown}/{n} tulosta. Kirjoita lisää rajataksesi tuloksia.|{shown}/{n} tulosta. Kirjoita lisää rajataksesi tuloksia.
Recent Commands Viimeisimmät komennot
No recent commands Ei viimeisimpiä komentoja
Type to search commands, tools, panels and effects Kirjoita hakeaksesi komentoja, työkaluja, paneeleita ja tehosteita
Dashed Line Katkoviiva
Panel menu Paneelivalikko
Unembed… Poista upotus…
@@ -4768,6 +4778,7 @@ font-technology Variable Muuttuvat
New type takes this language while Document Setup's language is English: USA; type already in a document keeps its own language. Uusi teksti saa tämän kielen, kun Asiakirjan asetusten kieli on Englanti: USA; asiakirjassa jo oleva teksti säilyttää oman kielensä.
In paragraphs with Hyphenate on, a listed word breaks only at the hyphens typed in it, or nowhere when it has none, whatever its language or case. Kappaleissa, joissa Tavuta on käytössä, luettelon sana tavutetaan vain siihen kirjoitettujen yhdysmerkkien kohdalta tai ei lainkaan, jos niitä ei ole, kielestä ja kirjainkoosta riippumatta.
On the desktop, the .wasm plug-ins in this folder load at startup and when you click OK with a new folder here, except in Safe Mode; the web version does not load them. Työpöytäversiossa tämän kansion .wasm-laajennukset ladataan käynnistettäessä ja kun napsautat OK uuden kansion kanssa tässä, paitsi vikasietotilassa; verkkoversio ei lataa niitä.
How many instructions each run of a plug-in object filter may use; Large allows more than Normal with the same 60-second limit. Heavy filters keep their own budget. Kuinka monta käskyä laajennuksen objektisuotimen kukin suorituskerta saa käyttää; Suuri sallii enemmän kuin Normaali samalla 60 sekunnin rajalla. Raskaat suotimet säilyttävät oman budjettinsa.
The first scratch disk choice: Startup, None or a folder path; VectorCraft stores it but does not use scratch disks yet. Ensimmäinen työlevyvalinta: Startup, None tai kansiopolku; VectorCraft tallentaa sen, mutta ei vielä käytä työlevyjä.
The second scratch disk choice: Startup, None or a folder path; VectorCraft stores it but does not use scratch disks yet. Toinen työlevyvalinta: Startup, None tai kansiopolku; VectorCraft tallentaa sen, mutta ei vielä käytä työlevyjä.
How light or dark the interface is. Kuinka vaalea tai tumma käyttöliittymä on.
@@ -4786,6 +4797,7 @@ font-technology Variable Muuttuvat
Animated Zoom works only while this is on; off, Animated Zoom is dimmed and zooming does not animate. Animoitu zoomaus toimii vain, kun tämä on päällä; pois päältä Animoitu zoomaus on himmennetty eikä zoomausta animoida.
The wheel's zoom glides in, and the Zoom tool zooms as you drag sideways or hold it down; off, the Zoom tool zooms to the area you drag across. Rullalla zoomaus liukuu pehmeästi, ja Zoomaustyökalu zoomaa, kun vedät sivulle tai pidät sitä painettuna; pois päältä Zoomaustyökalu zoomaa alueeseen, jonka yli vedät.
From the next start, the desktop version draws with this kind of graphics processor; Automatic prefers the one that drives the display. The web version does not use it. Seuraavasta käynnistyksestä alkaen työpöytäversio piirtää tämän tyyppisellä grafiikkasuorittimella; Automaattinen suosii näyttöä ohjaavaa. Verkkoversio ei käytä sitä.
From the next start, the window shows frames without waiting for the display to refresh, at most 240 a second; off, the display paces them. A present mode set at launch overrides it. Seuraavasta käynnistyksestä alkaen ikkuna näyttää kuvat odottamatta näytön virkistystä, enintään 240 sekunnissa; pois päältä näyttö tahdittaa ne. Käynnistettäessä asetettu esitystila ohittaa sen.
The most undo steps each document keeps; lowering it drops the oldest steps when you click OK. Steps can also go sooner when they use too much memory. Kumoamisvaiheiden enimmäismäärä, jonka kukin asiakirja säilyttää; pienempi luku poistaa vanhimmat vaiheet, kun napsautat OK. Vaiheita voi poistua aiemmin, jos ne vievät liikaa muistia.
Shows the artwork changing while you drag; off, outlines follow the drag and the artwork changes when you release. A ruler guide always moves as you drag. Näyttää kuvituksen muuttuvan vetäessäsi; pois päältä ääriviivat seuraavat vetoa ja kuvitus muuttuu, kun vapautat. Viivaimen apuviiva liikkuu aina vetäessäsi.
How many worker threads draw the artwork; -1 uses one fewer than the cores VectorCraft may use, at most 8, and 0 uses none. The web version always uses none. Montako työsäiettä piirtää kuvituksen; -1 käyttää yhden vähemmän kuin VectorCraftin käytettävissä olevia ytimiä, enintään 8, ja 0 ei yhtään. Verkkoversio ei käytä koskaan yhtään.
@@ -4812,6 +4824,10 @@ font-technology Variable Muuttuvat
VectorCraft stores this choice, but Copy and Cut do not use a legacy vector clipboard format yet. VectorCraft tallentaa tämän valinnan, mutta Kopioi ja Leikkaa eivät vielä käytä vanhan vektorileikepöydän muotoa.
Preserve Paths or Preserve Appearance and Overprints for the legacy vector clipboard; VectorCraft stores the choice but does not use it yet. Säilytä polut tai Säilytä ulkoasu ja päällepainatukset vanhalle vektorileikepöydälle; VectorCraft tallentaa valinnan, mutta ei vielä käytä sitä.
Keep Formatting keeps the styles of text copied from VectorCraft type when it is pasted into type; Keep Plain Text gives it the style where it lands. Säilytä muotoilu säilyttää VectorCraftin tekstiobjektista kopioidun tekstin tyylit, kun se liitetään tekstiobjektiin; Säilytä pelkkä teksti antaa sille liittämiskohdan tyylin.
Display All Blacks as Rich Black shows pure CMYK black (black ink alone at 100%) as RGB black on the canvas; Display All Blacks Accurately converts it through the CMYK working space. Näytä kaikki mustat syvämustina näyttää puhtaan CMYK-mustan (pelkkä musta muste 100 %:na) RGB-mustana piirtopinnalla; Näytä kaikki mustat tarkasti muuntaa sen työ-CMYK-väriavaruuden kautta.
Output All Blacks as Rich Black draws pure CMYK black as RGB black in RGB and grayscale raster exports and Print as Bitmap; it does not change vector exports, CMYK JPEG, TIFF and PSD, or other printing. Tulosta kaikki mustat syvämustina piirtää puhtaan CMYK-mustan RGB-mustana RGB- ja harmaasävyrasterivienneissä ja Tulosta bittikarttana -asetuksella; se ei muuta vektorivientejä, CMYK-JPEG-, -TIFF- ja -PSD-tiedostoja eikä muuta tulostusta.
On a touch screen, switches to the Touch workspace; turning this off, or losing the touch screen, goes back to the workspace it switched from. Kosketusnäytöllä vaihtaa kosketustyötilaan; asetuksen poistaminen käytöstä tai kosketusnäytön katoaminen palauttaa työtilan, josta vaihdettiin.
A two-finger tap on the canvas undoes, or switches between selection and drawing tools in the Touch workspace, and a three-finger tap redoes; neither works in Presentation Mode. Kahden sormen napautus piirtopinnalla kumoaa tai vaihtaa kosketustyötilassa valinta- ja piirtotyökalujen välillä, ja kolmen sormen napautus tekee uudelleen; kumpikaan ei toimi esitystilassa.
New type takes this language while Document Setup's language is English: USA and [Normal Character Style] sets none; type already in a document keeps its own language. Uusi teksti saa tämän kielen, kun Asiakirjan asetusten kieli on Englanti: USA eikä [Normaali merkkityyli] määritä kieltä; asiakirjassa jo oleva teksti säilyttää oman kielensä.
In paragraphs with Hyphenate on, a listed word breaks only at the hyphens typed in it, or nowhere when it has none, whatever its case; Korean words take no hyphen, and Indian-language words do not break inside a character cluster. Kappaleissa, joissa Tavuta on käytössä, luettelon sana tavutetaan vain siihen kirjoitettujen yhdysmerkkien kohdalta tai ei lainkaan, jos niitä ei ole, kirjainkoosta riippumatta; korealaisiin sanoihin ei tule tavuviivaa, eikä intialaisten kielten sanoja tavuteta merkkiryhmän sisältä.
Reset all preferences to their defaults? Palautetaanko kaikki asetukset oletuksiin?
@@ -5634,6 +5650,7 @@ liquify-list-end {0}, {1} {0} ja {1}
@msg no native format ei omaa tiedostomuotoa
@msg no pages ei sivuja
@msg no pattern `{name}` ei kuviota `{name}`
@msg art painted with `{name}` can't be its tile kuviolla `{name}` maalattu kuvitus ei voi olla sen ruutu
@msg no perspective grid preset named `{name}` ei perspektiiviruudukon esiasetusta nimeltä `{name}`
@msg no plug-in {0} is installed laajennusta {0} ei ole asennettu
@msg no plug-in {id} is installed laajennusta {id} ei ole asennettu
@@ -6415,6 +6432,7 @@ variable-list-end {0}, {1} {0} ja {1}
Arrow Nuoli
Arrow (open) Nuoli (avoin)
Barbed Väkänen
arrowhead Feather Sulka
Half Arrow (left) Puolinuoli (vasen)
Half Arrow (right) Puolinuoli (oikea)
Concave Kovera
@@ -6442,6 +6460,7 @@ variable-list-end {0}, {1} {0} ja {1}
Kite Leija
Triangle to Bar Kolmiosta palkkiin
Oval Soikio
Line Arrow Viivanuoli
Complementary Vastaväri
Complementary 2 Vastaväri 2
Split Complementary Jaettu vastaväri
@@ -8362,6 +8381,7 @@ breakText Glyphs Merkit
Remove Strokes Poista viivat
Place Brush Art Sijoita siveltimen kuvitus
Replace Brush Art Korvaa siveltimen kuvitus
Replace Pattern Art Korvaa kuvion kuvitus
Strokes use this brush. Apply the new art to those strokes, or leave them as they are and add a copy of the brush with the new art? Viivat käyttävät tätä sivellintä. Käytetäänkö uutta kuvitusta näissä viivoissa, vai jätetäänkö ne ennalleen ja lisätään siveltimestä kopio, jossa on uusi kuvitus?
Apply to Strokes Käytä viivoihin
Leave Strokes Jätä viivat ennalleen
@@ -8949,6 +8969,11 @@ breakText Glyphs Merkit
@msg A joint does not close by {gap} pt. Liitos ei sulkeudu, rako {gap} pt.
@msg Two panels pass through each other. Kaksi paneelia kulkee toistensa läpi.
@msg composer must be "singleLine", "everyLine", "standardSingleLine" or "standardEveryLine" composer on oltava "singleLine", "everyLine", "standardSingleLine" tai "standardEveryLine"
Engraving Kaiverrus
Fine Hatching Hieno viivoitus
Dense Hatching Tiheä viivoitus
Tapered Hatching Kapeneva viivoitus
Broken Hatching Katkoviivoitus
Image Brush Kuvasiveltimet
Soft Bloom Pehmeä kukinta
Halftone Field Rasterikenttä
Can't render this file because it is too large.
+25
View File
@@ -1696,6 +1696,10 @@ font-technology Variable Variables
Add Color Tool Outil Ajouter une couleur
Remove Color Tool Outil Supprimer une couleur
Remove Color Supprimer la couleur
Set As Base Color Définir comme couleur de base
Select Shade Sélectionner une nuance
Add New Color Ajouter une nouvelle couleur
Set Current Color As Base Color Définir la couleur actuelle comme couleur de base
Find the selected colors in the artwork Rechercher les couleurs sélectionnées dans l’illustration
Harmony Rules: Règles d’harmonie :
Harmony Sets Ensembles d’harmonies
@@ -2854,6 +2858,11 @@ font-technology Variable Variables
Preserve Alpha Transparency Conserver la transparence alpha
Preserve Appearance and Overprints Conserver l’aspect et les surimpressions
Preserve CMYK Numbers Conserver les valeurs CMJN
Preserve RGB Numbers Conserver les valeurs RVB
Device to Simulate: Périphérique à simuler :
Simulate Paper Color Simuler la couleur du papier
Simulate Black Ink Simuler l’encre noire
Load… Charger…
Preserve Editing Capabilities Conserver les fonctions d’édition
Preserve editing capabilities Conserver les fonctions d’édition
Preserve Lightness Conserver la luminosité
@@ -3354,6 +3363,7 @@ digits Malayalam Malayalam
New type takes this language while Document Setup's language is English: USA; type already in a document keeps its own language. Le nouveau texte prend cette langue tant que la langue de Format de document est l’anglais des États-Unis. Le texte déjà présent dans un document garde sa langue.
In paragraphs with Hyphenate on, a listed word breaks only at the hyphens typed in it, or nowhere when it has none, whatever its language or case. Dans les paragraphes où Césure est activée, un mot de la liste n’est coupé qu’aux traits d’union saisis dedans, ou nulle part s’il n’en a pas, quelles que soient sa langue et sa casse.
On the desktop, the .wasm plug-ins in this folder load at startup and when you click OK with a new folder here, except in Safe Mode; the web version does not load them. Dans la version de bureau, les modules externes .wasm de ce dossier se chargent au démarrage et lorsque vous cliquez sur OK avec un nouveau dossier ici, sauf en mode sans échec. La version web ne les charge pas.
How many instructions each run of a plug-in object filter may use; Large allows more than Normal with the same 60-second limit. Heavy filters keep their own budget. Le nombre d’instructions que chaque exécution d’un filtre d’objets d’un module externe peut utiliser. Grand en autorise plus que Normal, avec la même limite de 60 secondes. Les filtres lourds gardent leur propre budget.
The first scratch disk choice: Startup, None or a folder path; VectorCraft stores it but does not use scratch disks yet. Premier disque de travail (Startup, None ou le chemin d’un dossier). VectorCraft l’enregistre, mais n’utilise pas encore de disques de travail.
The second scratch disk choice: Startup, None or a folder path; VectorCraft stores it but does not use scratch disks yet. Second disque de travail (Startup, None ou le chemin d’un dossier). VectorCraft l’enregistre, mais n’utilise pas encore de disques de travail.
How light or dark the interface is. Le degré de clarté de l’interface, du plus sombre au plus clair.
@@ -3372,6 +3382,7 @@ digits Malayalam Malayalam
Animated Zoom works only while this is on; off, Animated Zoom is dimmed and zooming does not animate. Le Zoom animé ne fonctionne que si cette option est activée. Désactivée, le Zoom animé est grisé et le zoom n’est pas animé.
The wheel's zoom glides in, and the Zoom tool zooms as you drag sideways or hold it down; off, the Zoom tool zooms to the area you drag across. Le zoom à la molette glisse en douceur, et l’Outil Zoom zoome quand vous faites glisser de côté ou le maintenez enfoncé. Désactivée, l’Outil Zoom zoome sur la zone que vous parcourez.
From the next start, the desktop version draws with this kind of graphics processor; Automatic prefers the one that drives the display. The web version does not use it. À partir du prochain démarrage, la version de bureau dessine avec ce type de processeur graphique. Automatique préfère celui qui pilote l’écran. La version web ne l’utilise pas.
From the next start, the window shows frames without waiting for the display to refresh, at most 240 a second; off, the display paces them. A present mode set at launch overrides it. À partir du prochain démarrage, la fenêtre affiche les images sans attendre le rafraîchissement de l’écran, au plus 240 par seconde. Désactivé, l’écran les cadence. Un mode de présentation défini au lancement a la priorité.
The most undo steps each document keeps; lowering it drops the oldest steps when you click OK. Steps can also go sooner when they use too much memory. Le nombre maximal d’étapes d’annulation que chaque document conserve. Un nombre plus bas supprime les plus anciennes quand vous cliquez sur OK. Des étapes peuvent aussi partir plus tôt si elles occupent trop de mémoire.
Shows the artwork changing while you drag; off, outlines follow the drag and the artwork changes when you release. A ruler guide always moves as you drag. Montre l’illustration qui change pendant que vous faites glisser. Désactivée, des contours suivent le glissement et l’illustration change quand vous relâchez. Un repère de règle suit toujours le glissement.
How many worker threads draw the artwork; -1 uses one fewer than the cores VectorCraft may use, at most 8, and 0 uses none. The web version always uses none. Le nombre de threads de travail qui dessinent l’illustration. Avec -1, VectorCraft en utilise un de moins que les cœurs qu’il peut utiliser, 8 au plus, et avec 0 aucun. La version web n’en utilise jamais.
@@ -3398,6 +3409,10 @@ digits Malayalam Malayalam
VectorCraft stores this choice, but Copy and Cut do not use a legacy vector clipboard format yet. VectorCraft enregistre ce choix, mais Copier et Couper n’utilisent pas encore de format de presse-papiers vectoriel hérité.
Preserve Paths or Preserve Appearance and Overprints for the legacy vector clipboard; VectorCraft stores the choice but does not use it yet. Conserver les tracés ou Conserver l’aspect et les surimpressions pour le presse-papiers vectoriel hérité. VectorCraft enregistre le choix mais ne l’utilise pas encore.
Keep Formatting keeps the styles of text copied from VectorCraft type when it is pasted into type; Keep Plain Text gives it the style where it lands. Conserver la mise en forme garde les styles du texte copié depuis un objet texte de VectorCraft quand il est collé dans un objet texte. Conserver le texte brut lui donne le style de l’endroit où il arrive.
Display All Blacks as Rich Black shows pure CMYK black (black ink alone at 100%) as RGB black on the canvas; Display All Blacks Accurately converts it through the CMYK working space. Afficher tous les noirs en noir intense affiche le noir CMJN pur (encre noire seule à 100 %) en noir RVB sur la zone de travail. Afficher tous les noirs avec précision le convertit par l’espace CMJN de travail.
Output All Blacks as Rich Black draws pure CMYK black as RGB black in RGB and grayscale raster exports and Print as Bitmap; it does not change vector exports, CMYK JPEG, TIFF and PSD, or other printing. Reproduire tous les noirs en noir intense dessine le noir CMJN pur en noir RVB dans les exportations matricielles RVB et en niveaux de gris et avec Imprimer en tant que bitmap. Les exportations vectorielles, les JPEG, TIFF et PSD CMJN et les autres impressions ne changent pas.
On a touch screen, switches to the Touch workspace; turning this off, or losing the touch screen, goes back to the workspace it switched from. Sur un écran tactile, passe à l’espace de travail tactile. Désactiver l’option ou perdre l’écran tactile ramène à l’espace de travail d’avant ce changement.
A two-finger tap on the canvas undoes, or switches between selection and drawing tools in the Touch workspace, and a three-finger tap redoes; neither works in Presentation Mode. Un toucher à deux doigts sur la zone de travail annule ou, dans l’espace de travail tactile, bascule entre outils de sélection et de dessin, et un toucher à trois doigts rétablit. Aucun ne fonctionne en mode Présentation.
New type takes this language while Document Setup's language is English: USA and [Normal Character Style] sets none; type already in a document keeps its own language. Le nouveau texte prend cette langue tant que la langue de Format de document est l’anglais des États-Unis et que [Style de caractère normal] n’en définit aucune. Le texte déjà présent dans un document garde sa langue.
In paragraphs with Hyphenate on, a listed word breaks only at the hyphens typed in it, or nowhere when it has none, whatever its case; Korean words take no hyphen, and Indian-language words do not break inside a character cluster. Dans les paragraphes où Césure est activée, un mot de la liste n’est coupé qu’aux traits d’union saisis dedans, ou nulle part s’il n’en a pas, quelle que soit sa casse. Les mots coréens ne prennent pas de trait d’union, et les mots en langues indiennes ne sont pas coupés à l’intérieur d’un groupe de caractères.
Reset all preferences to their defaults? Rétablir toutes les préférences à leur valeur par défaut ?
@@ -3640,6 +3655,7 @@ digits Malayalam Malayalam
@plural {shown} of {n} result. Keep typing to narrow them.|{shown} of {n} results. Keep typing to narrow them. {shown} sur {n} résultat. Continuez à taper pour les affiner.|{shown} sur {n} résultats. Continuez à taper pour les affiner.
Recent Commands Commandes récentes
No recent commands Aucune commande récente
Type to search commands, tools, panels and effects Tapez pour rechercher des commandes, des outils, des panneaux et des effets
Search commands Chercher des commandes
Search Commands… Rechercher des commandes…
Secondary Secondaire
@@ -5360,6 +5376,7 @@ liquify-list-end {0}, {1} {0} et {1}
@msg no native format aucun format natif
@msg no pages aucune page
@msg no pattern `{name}` aucun motif `{name}`
@msg art painted with `{name}` can't be its tile une illustration peinte avec `{name}` ne peut pas être son carreau
@msg no perspective grid preset named `{name}` aucun paramètre prédéfini de grille de perspective nommé `{name}`
@msg no plug-in {0} is installed aucun plug-in {0} n’est installé
@msg no plug-in {id} is installed aucun plug-in {id} n’est installé
@@ -6487,6 +6504,7 @@ lighting Light Lumière
B5 B5
Bar Barre
Barbed Barbelée
arrowhead Feather Empennage
Baseline (Standard) De base (standard)
Baseline Optimized De base optimisé
Basic De base
@@ -6615,6 +6633,7 @@ lighting Light Lumière
Letterhead A4 Papier à en-tête A4
Letterhead Letter Papier à en-tête Lettre US
Line Art Dessin au trait
Line Arrow Flèche filaire
Linear Linéaire
Logo 1000×1000 Logo 1000×1000
Low Fidelity Photo Photo basse fidélité
@@ -8291,6 +8310,7 @@ breakText Glyphs Glyphes
Remove Strokes Supprimer les contours
Place Brush Art Placer l’illustration de la forme
Replace Brush Art Remplacer l’illustration de la forme
Replace Pattern Art Remplacer l’illustration du motif
Strokes use this brush. Apply the new art to those strokes, or leave them as they are and add a copy of the brush with the new art? Des contours utilisent cette forme. Appliquer la nouvelle illustration à ces contours, ou les laisser tels quels et ajouter une copie de la forme avec la nouvelle illustration ?
Apply to Strokes Appliquer aux contours
Leave Strokes Conserver les contours
@@ -10680,6 +10700,11 @@ breakText Glyphs Glyphes
@msg A joint does not close by {gap} pt. Un joint ne se ferme pas, avec un écart de {gap} pt.
@msg Two panels pass through each other. Deux panneaux se traversent.
@msg {_1} × {_2} pixels is too large for GIF (at most 65535 pixels a side): lower the resolution {_1} × {_2} pixels, c’est trop grand pour le GIF (65535 pixels par côté au plus) : réduisez la résolution
Engraving Gravure
Fine Hatching Hachures fines
Dense Hatching Hachures denses
Tapered Hatching Hachures effilées
Broken Hatching Hachures interrompues
Image Brush Pinceaux d’image
Soft Bloom Floraison douce
Halftone Field Champ de demi-teintes
Can't render this file because it is too large.
+54
View File
@@ -2902,6 +2902,11 @@
Preserve Alpha Transparency આલ્ફા પારદર્શિતા જાળવો
Preserve Appearance and Overprints દેખાવ અને ઓવરપ્રિન્ટ જાળવો
Preserve CMYK Numbers CMYK નંબર જાળવો
Preserve RGB Numbers RGB નંબર જાળવો
Device to Simulate: અનુકરણ કરવાનું ઉપકરણ:
Simulate Paper Color કાગળના રંગનું અનુકરણ કરો
Simulate Black Ink કાળી શાહીનું અનુકરણ કરો
Load… લોડ કરો…
Preserve Editing Capabilities સંપાદન ક્ષમતાઓ જાળવો
Preserve Lightness તેજ જાળવો
Preserve Overprints and Spot Colors ઓવરપ્રિન્ટ અને સ્પોટ રંગ જાળવો
@@ -3156,6 +3161,37 @@
Remove Effect ઇફેક્ટ દૂર કરો
Remove Effects ઇફેક્ટ્સ દૂર કરો
Remove Gaps ગેપ દૂર કરો
# Stroke arrowheads (Stroke panel, Dimension Tool Options and Properties › Arrow Style).
Triangle (open) ત્રિકોણ (ખુલ્લો)
Circle (open) વર્તુળ (ખુલ્લું)
Square (open) ચોરસ (ખુલ્લો)
Arrow (open) તીર (ખુલ્લું)
Barbed કાંટાળું
arrowhead Feather પીંછું
Half Arrow (left) અડધું તીર (ડાબે)
Half Arrow (right) અડધું તીર (જમણે)
Double Bar બેવડી પટ્ટી
Dot on Bar પટ્ટી પર બિંદુ
Chevron શેવરોન
Cross ક્રોસ
Plus પ્લસ
Hexagon (open) ષટ્કોણ (ખુલ્લો)
Tag ટૅગ
Tag (open) ટૅગ (ખુલ્લો)
Half Circle અર્ધવર્તુળ
Drop ટીપું
Slash સ્લૅશ
Double Slash બેવડો સ્લૅશ
Diamond (open) ડાયમંડ (ખુલ્લો)
Reverse Triangle ઊંધો ત્રિકોણ
Swallowtail અબાબીલની પૂંછડી
Bracket કૌંસ
Fork કાંટો
Leaf પાંદડું
Kite પતંગ
Triangle to Bar ત્રિકોણથી પટ્ટી
Oval અંડાકાર
Line Arrow રેખા તીર
# Path Precision Tools add-on: Common Tangents.
Common Tangents… સામાન્ય સ્પર્શરેખાઓ…
Common Tangents સામાન્ય સ્પર્શરેખાઓ
@@ -3405,6 +3441,7 @@
New type takes this language while Document Setup's language is English: USA; type already in a document keeps its own language. દસ્તાવેજ સેટઅપની ભાષા અંગ્રેજી: USA હોય ત્યાં સુધી નવા ટેક્સ્ટને આ ભાષા મળે છે; દસ્તાવેજમાં પહેલેથી રહેલું ટેક્સ્ટ પોતાની ભાષા રાખે છે.
In paragraphs with Hyphenate on, a listed word breaks only at the hyphens typed in it, or nowhere when it has none, whatever its language or case. હાઇફનેટ કરો ચાલુ હોય તેવા ફકરાઓમાં, સૂચિમાંનો શબ્દ ફક્ત તેમાં લખેલા હાઇફન પર જ તૂટે છે, અથવા કોઈ ન હોય તો ક્યાંય નહીં, તેની ભાષા કે કેસ ગમે તે હોય.
On the desktop, the .wasm plug-ins in this folder load at startup and when you click OK with a new folder here, except in Safe Mode; the web version does not load them. ડેસ્કટોપ સંસ્કરણમાં, આ ફોલ્ડરના .wasm પ્લગ-ઇન્સ શરૂઆતમાં અને અહીં નવા ફોલ્ડર સાથે ઠીક પર ક્લિક કરો ત્યારે લોડ થાય છે, સેફ મોડ સિવાય; વેબ સંસ્કરણ તેમને લોડ કરતું નથી.
How many instructions each run of a plug-in object filter may use; Large allows more than Normal with the same 60-second limit. Heavy filters keep their own budget. પ્લગ-ઇનના ઑબ્જેક્ટ ફિલ્ટરનું દરેક રન કેટલી સૂચનાઓ વાપરી શકે; મોટું સામાન્ય કરતાં વધુ મંજૂરી આપે છે, 60 સેકન્ડની એ જ મર્યાદા સાથે. ભારે ફિલ્ટર પોતાનું બજેટ રાખે છે.
The first scratch disk choice: Startup, None or a folder path; VectorCraft stores it but does not use scratch disks yet. પ્રથમ સ્ક્રેચ ડિસ્ક પસંદગી: Startup, None અથવા ફોલ્ડરનો પાથ; VectorCraft તેને સાચવે છે, પરંતુ હજી સ્ક્રેચ ડિસ્કનો ઉપયોગ કરતું નથી.
The second scratch disk choice: Startup, None or a folder path; VectorCraft stores it but does not use scratch disks yet. બીજી સ્ક્રેચ ડિસ્ક પસંદગી: Startup, None અથવા ફોલ્ડરનો પાથ; VectorCraft તેને સાચવે છે, પરંતુ હજી સ્ક્રેચ ડિસ્કનો ઉપયોગ કરતું નથી.
How light or dark the interface is. ઇન્ટરફેસ કેટલું આછું કે ઘેરું છે.
@@ -3423,6 +3460,7 @@
Animated Zoom works only while this is on; off, Animated Zoom is dimmed and zooming does not animate. ઍનિમેટેડ ઝૂમ ફક્ત આ ચાલુ હોય ત્યારે જ કામ કરે છે; બંધ હોય ત્યારે, ઍનિમેટેડ ઝૂમ ઝાંખું થાય છે અને ઝૂમ ઍનિમેટ થતું નથી.
The wheel's zoom glides in, and the Zoom tool zooms as you drag sideways or hold it down; off, the Zoom tool zooms to the area you drag across. વ્હીલથી ઝૂમ સરળતાથી સરકે છે, અને ઝૂમ ટૂલ તમે બાજુમાં ખેંચો અથવા દબાવી રાખો ત્યારે ઝૂમ કરે છે; બંધ હોય ત્યારે, ઝૂમ ટૂલ તમે ખેંચો તે વિસ્તાર પર ઝૂમ કરે છે.
From the next start, the desktop version draws with this kind of graphics processor; Automatic prefers the one that drives the display. The web version does not use it. આગલી શરૂઆતથી, ડેસ્કટોપ સંસ્કરણ આ પ્રકારના ગ્રાફિક્સ પ્રોસેસરથી દોરે છે; સ્વચાલિત ડિસ્પ્લે ચલાવતા પ્રોસેસરને પસંદ કરે છે. વેબ સંસ્કરણ તેનો ઉપયોગ કરતું નથી.
From the next start, the window shows frames without waiting for the display to refresh, at most 240 a second; off, the display paces them. A present mode set at launch overrides it. આગલી શરૂઆતથી, વિન્ડો ડિસ્પ્લે રિફ્રેશની રાહ જોયા વિના ફ્રેમ બતાવે છે, સેકન્ડમાં વધુમાં વધુ 240; બંધ હોય ત્યારે ગતિ ડિસ્પ્લે નક્કી કરે છે. શરૂઆતમાં સેટ કરેલો પ્રેઝન્ટ મોડ પ્રાથમિકતા ધરાવે છે.
The most undo steps each document keeps; lowering it drops the oldest steps when you click OK. Steps can also go sooner when they use too much memory. દરેક દસ્તાવેજ રાખે તે પૂર્વવત્ પગલાંની મહત્તમ સંખ્યા; ઓછી સંખ્યા ઠીક પર ક્લિક કરો ત્યારે સૌથી જૂનાં પગલાં દૂર કરે છે. પગલાં વધુ મેમરી લે ત્યારે વહેલાં પણ દૂર થઈ શકે છે.
Shows the artwork changing while you drag; off, outlines follow the drag and the artwork changes when you release. A ruler guide always moves as you drag. તમે ખેંચો ત્યારે આર્ટ બદલાતી બતાવે છે; બંધ હોય ત્યારે, રૂપરેખાઓ ખેંચાણને અનુસરે છે અને તમે છોડો ત્યારે આર્ટ બદલાય છે. રૂલરની માર્ગદર્શિકા ખેંચતી વખતે હંમેશા ખસે છે.
How many worker threads draw the artwork; -1 uses one fewer than the cores VectorCraft may use, at most 8, and 0 uses none. The web version always uses none. કેટલા વર્કર થ્રેડ આર્ટ દોરે છે; -1 VectorCraft વાપરી શકે તે કોરથી એક ઓછો વાપરે છે, વધુમાં વધુ 8, અને 0 એક પણ નહીં. વેબ સંસ્કરણ ક્યારેય કોઈ વાપરતું નથી.
@@ -3449,6 +3487,10 @@
VectorCraft stores this choice, but Copy and Cut do not use a legacy vector clipboard format yet. VectorCraft આ પસંદગી સાચવે છે, પણ નકલ અને કાપો હજી લેગસી વેક્ટર ક્લિપબોર્ડ ફોર્મેટ વાપરતા નથી.
Preserve Paths or Preserve Appearance and Overprints for the legacy vector clipboard; VectorCraft stores the choice but does not use it yet. લેગસી વેક્ટર ક્લિપબોર્ડ માટે પાથ જાળવો અથવા દેખાવ અને ઓવરપ્રિન્ટ જાળવો; VectorCraft પસંદગી સાચવે છે પણ હજી તેને વાપરતું નથી.
Keep Formatting keeps the styles of text copied from VectorCraft type when it is pasted into type; Keep Plain Text gives it the style where it lands. ફોર્મેટિંગ રાખો VectorCraftના ટેક્સ્ટ ઑબ્જેક્ટમાંથી નકલ કરેલા ટેક્સ્ટને ટેક્સ્ટ ઑબ્જેક્ટમાં ચોંટાડતાં તેની શૈલીઓ રાખે છે; સાદો ટેક્સ્ટ રાખો તેને જ્યાં પડે ત્યાંની શૈલી આપે છે.
Display All Blacks as Rich Black shows pure CMYK black (black ink alone at 100%) as RGB black on the canvas; Display All Blacks Accurately converts it through the CMYK working space. બધા બ્લેક્સ રિચ બ્લેક તરીકે બતાવો કેનવાસ પર શુદ્ધ CMYK બ્લેક (માત્ર 100% બ્લેક શાહી)ને RGB બ્લેક તરીકે બતાવે છે; બધા બ્લેક્સ ચોક્કસ રીતે બતાવો તેને કાર્યકારી CMYK સ્પેસ દ્વારા રૂપાંતરિત કરે છે.
Output All Blacks as Rich Black draws pure CMYK black as RGB black in RGB and grayscale raster exports and Print as Bitmap; it does not change vector exports, CMYK JPEG, TIFF and PSD, or other printing. બધા બ્લેકને રિચ બ્લેક તરીકે આઉટપુટ કરો RGB અને ગ્રેસ્કેલ રાસ્ટર એક્સપોર્ટમાં અને બિટમેપ તરીકે પ્રિન્ટ કરો સાથે શુદ્ધ CMYK બ્લેકને RGB બ્લેક તરીકે દોરે છે; તે વેક્ટર એક્સપોર્ટ, CMYK JPEG, TIFF અને PSD કે અન્ય પ્રિન્ટિંગ બદલતું નથી.
On a touch screen, switches to the Touch workspace; turning this off, or losing the touch screen, goes back to the workspace it switched from. ટચ સ્ક્રીન પર ટચ વર્કસ્પેસમાં બદલે છે; આ વિકલ્પ બંધ કરવાથી અથવા ટચ સ્ક્રીન ન મળે ત્યારે તે પહેલાંના વર્કસ્પેસમાં પાછું જાય છે.
A two-finger tap on the canvas undoes, or switches between selection and drawing tools in the Touch workspace, and a three-finger tap redoes; neither works in Presentation Mode. કેનવાસ પર બે આંગળીનો ટૅપ પૂર્વવત્ કરે છે, અથવા ટચ વર્કસ્પેસમાં પસંદગી અને ડ્રોઇંગ ટૂલ વચ્ચે બદલે છે, અને ત્રણ આંગળીનો ટૅપ ફરીથી કરે છે; પ્રેઝન્ટેશન મોડમાં બેમાંથી કોઈ કામ કરતું નથી.
New type takes this language while Document Setup's language is English: USA and [Normal Character Style] sets none; type already in a document keeps its own language. દસ્તાવેજ સેટઅપની ભાષા અંગ્રેજી: USA હોય અને [Normal Character Style] કોઈ ભાષા સેટ ન કરે ત્યાં સુધી નવા ટેક્સ્ટને આ ભાષા મળે છે; દસ્તાવેજમાં પહેલેથી રહેલું ટેક્સ્ટ પોતાની ભાષા રાખે છે.
In paragraphs with Hyphenate on, a listed word breaks only at the hyphens typed in it, or nowhere when it has none, whatever its case; Korean words take no hyphen, and Indian-language words do not break inside a character cluster. હાઇફનેટ કરો ચાલુ હોય તેવા ફકરાઓમાં, સૂચિમાંનો શબ્દ ફક્ત તેમાં લખેલા હાઇફન પર જ તૂટે છે, અથવા કોઈ ન હોય તો ક્યાંય નહીં, તેનો કેસ ગમે તે હોય; કોરિયન શબ્દોને હાઇફન મળતો નથી, અને ભારતીય ભાષાઓના શબ્દો અક્ષર-સમૂહની અંદર તૂટતા નથી.
Restored documents open unsaved: save them to keep them. પુનઃસ્થાપિત દસ્તાવેજો અસાચવેલા ખુલશે: તેમને રાખવા માટે સાચવો.
@@ -3732,6 +3774,8 @@
@plural {shown} of {n} result. Keep typing to narrow them.|{shown} of {n} results. Keep typing to narrow them. {n} માંથી {shown} પરિણામ. તેમને સંકુચિત કરવા લખતા રહો.|{n} માંથી {shown} પરિણામો. તેમને સંકુચિત કરવા લખતા રહો.
Recent Commands તાજેતરના આદેશો
No recent commands કોઈ તાજેતરના આદેશો નથી
Type to search commands, tools, panels and effects આદેશો, ટૂલ્સ, પેનલ્સ અને ઇફેક્ટ્સ શોધવા માટે લખો
Recent તાજેતરના
Search commands આદેશો શોધો
Search images છબીઓ શોધો
Searching… શોધી રહ્યા છીએ…
@@ -3957,6 +4001,10 @@
Add Color Tool રંગ ઉમેરો સાધન
Remove Color Tool રંગ દૂર કરો સાધન
Remove Color રંગ દૂર કરો
Set As Base Color આધાર રંગ તરીકે સેટ કરો
Select Shade છાયા પસંદ કરો
Add New Color નવો રંગ ઉમેરો
Set Current Color As Base Color વર્તમાન રંગને આધાર રંગ તરીકે સેટ કરો
Find the selected colors in the artwork પસંદ કરેલા રંગો આર્ટવર્કમાં શોધો
Show handles when multiple anchors are selected બહુવિધ એન્કર પસંદ હોય ત્યારે હૅન્ડલ બતાવો
Show in Folder ફોલ્ડરમાં બતાવો
@@ -5059,6 +5107,7 @@ antiAlias Sharp શાર્પ
Composition કમ્પોઝિશન
Place Brush Art બ્રશ આર્ટ પ્લેસ કરો
Replace Brush Art બ્રશ આર્ટ બદલો
Replace Pattern Art પેટર્ન આર્ટ બદલો
Strokes use this brush. Apply the new art to those strokes, or leave them as they are and add a copy of the brush with the new art? સ્ટ્રોક્સ આ બ્રશ વાપરે છે. તે સ્ટ્રોક્સ પર નવી આર્ટ લાગુ કરવી છે કે તેમને જેમ છે તેમ રાખીને નવી આર્ટવાળી બ્રશની નકલ ઉમેરવી છે?
Apply to Strokes સ્ટ્રોક્સ પર લાગુ કરો
Leave Strokes સ્ટ્રોક્સ જેમ છે તેમ રાખો
@@ -5580,6 +5629,11 @@ swatch [Registration] [રજિસ્ટ્રેશન]
Standard Single-line Composer સ્ટાન્ડર્ડ સિંગલ-લાઇન કમ્પોઝર
Standard Every-line Composer સ્ટાન્ડર્ડ એવરી-લાઇન કમ્પોઝર
@msg composer must be "singleLine", "everyLine", "standardSingleLine" or "standardEveryLine" composer આમાંથી એક હોવું જોઈએ: "singleLine", "everyLine", "standardSingleLine" અથવા "standardEveryLine"
Engraving કોતરણી
Fine Hatching ઝીણી રેખાઓ
Dense Hatching ગાઢ રેખાઓ
Tapered Hatching પાતળી થતી રેખાઓ
Broken Hatching તૂટક રેખાઓ
Image Brush છબી બ્રશ
Soft Bloom નરમ ફૂલ
Halftone Field હાફટોન ક્ષેત્ર
Can't render this file because it contains an unexpected character in line 72 and column 5.
+25
View File
@@ -811,6 +811,7 @@ antiAlias Sharp शार्प
Bar बार
Bar Graph Tool बार ग्राफ़ टूल
Barbed कंटीले
arrowhead Feather पंख
Bas Relief बास रिलीफ़
Bas Relief… बास रिलीफ़…
Base Along: आधार के साथ:
@@ -3113,6 +3114,7 @@ antiAlias Sharp शार्प
Limit: सीमा:
Limited लिमिटेड
Line लाइन
Line Arrow लाइन तीर
line {line} लाइन {line}
Line {line} लाइन {line}
Line {line}: {name}: {status} लाइन {line}: {name}: {status}
@@ -4165,6 +4167,11 @@ antiAlias Sharp शार्प
Preserve Appearance उपस्थिति संरक्षित करें
Preserve Appearance and Overprints उपस्थिति और ओवरप्रिंट को संरक्षित करें
Preserve CMYK Numbers CMYK नंबर संरक्षित करें
Preserve RGB Numbers RGB नंबर संरक्षित करें
Device to Simulate: सिम्युलेट करने के लिए डिवाइस:
Simulate Paper Color पेपर का रंग सिम्युलेट करें
Simulate Black Ink काली स्याही सिम्युलेट करें
Load… लोड करें…
Preserve editing capabilities संपादन क्षमताओं को संरक्षित करना
Preserve Editing Capabilities संपादन क्षमताओं को संरक्षित करना
Preserve Lightness प्रकाश संरक्षण
@@ -4491,6 +4498,7 @@ antiAlias Sharp शार्प
Remove Strokes स्ट्रोक हटाएँ
Place Brush Art ब्रश आर्टवर्क रखें
Replace Brush Art ब्रश आर्टवर्क बदलें
Replace Pattern Art पैटर्न आर्टवर्क बदलें
Strokes use this brush. Apply the new art to those strokes, or leave them as they are and add a copy of the brush with the new art? स्ट्रोक्स इस ब्रश का उपयोग कर रहे हैं। नया आर्टवर्क उन स्ट्रोक्स पर लागू करें, या उन्हें जैसा है वैसा छोड़कर नए आर्टवर्क वाले ब्रश की एक कॉपी जोड़ें?
Apply to Strokes स्ट्रोक्स पर लागू करें
Leave Strokes स्ट्रोक्स जैसे हैं वैसे छोड़ें
@@ -4750,6 +4758,7 @@ antiAlias Sharp शार्प
New type takes this language while Document Setup's language is English: USA; type already in a document keeps its own language. जब तक डॉक्यूमेंट सेटअप की भाषा अंग्रेज़ी: USA है, नए टेक्स्ट को यह भाषा मिलती है; डॉक्यूमेंट में पहले से मौजूद टेक्स्ट अपनी भाषा रखता है।
In paragraphs with Hyphenate on, a listed word breaks only at the hyphens typed in it, or nowhere when it has none, whatever its language or case. जिन पैराग्राफ़ में हाइफ़नेशन चालू है, उनमें सूची का शब्द केवल उसमें टाइप किए गए हाइफ़न पर टूटता है, या कोई न हो तो कहीं नहीं, उसकी भाषा या केस चाहे जो हो।
On the desktop, the .wasm plug-ins in this folder load at startup and when you click OK with a new folder here, except in Safe Mode; the web version does not load them. डेस्कटॉप संस्करण में, इस फ़ोल्डर के .wasm प्लग-इन शुरू होने पर और यहाँ नया फ़ोल्डर देकर ठीक है पर क्लिक करने पर लोड होते हैं, सुरक्षित मोड को छोड़कर; वेब संस्करण उन्हें लोड नहीं करता।
How many instructions each run of a plug-in object filter may use; Large allows more than Normal with the same 60-second limit. Heavy filters keep their own budget. प्लग-इन के ऑब्जेक्ट फ़िल्टर का हर रन कितने निर्देश इस्तेमाल कर सकता है; बड़ा सामान्य से अधिक की अनुमति देता है, 60 सेकंड की उसी सीमा के साथ। भारी फ़िल्टर अपना बजट रखते हैं।
The first scratch disk choice: Startup, None or a folder path; VectorCraft stores it but does not use scratch disks yet. पहला स्क्रैच डिस्क विकल्प: Startup, None या फ़ोल्डर पाथ; VectorCraft इसे सहेजता है, पर अभी स्क्रैच डिस्क का उपयोग नहीं करता।
The second scratch disk choice: Startup, None or a folder path; VectorCraft stores it but does not use scratch disks yet. दूसरा स्क्रैच डिस्क विकल्प: Startup, None या फ़ोल्डर पाथ; VectorCraft इसे सहेजता है, पर अभी स्क्रैच डिस्क का उपयोग नहीं करता।
How light or dark the interface is. इंटरफ़ेस कितना हल्का या गहरा है।
@@ -4768,6 +4777,7 @@ antiAlias Sharp शार्प
Animated Zoom works only while this is on; off, Animated Zoom is dimmed and zooming does not animate. एनिमेटेड ज़ूम केवल तभी काम करता है जब यह चालू हो; बंद होने पर, एनिमेटेड ज़ूम धुंधला हो जाता है और ज़ूम एनिमेट नहीं होता।
The wheel's zoom glides in, and the Zoom tool zooms as you drag sideways or hold it down; off, the Zoom tool zooms to the area you drag across. व्हील से ज़ूम सहजता से सरकता है, और ज़ूम टूल बगल में खींचने या दबाए रखने पर ज़ूम करता है; बंद होने पर, ज़ूम टूल उस क्षेत्र पर ज़ूम करता है जिस पर आप खींचते हैं।
From the next start, the desktop version draws with this kind of graphics processor; Automatic prefers the one that drives the display. The web version does not use it. अगली शुरुआत से, डेस्कटॉप संस्करण इस प्रकार के ग्राफ़िक्स प्रोसेसर से बनाता है; स्वचालित उस प्रोसेसर को प्राथमिकता देता है जो डिस्प्ले चलाता है। वेब संस्करण इसका उपयोग नहीं करता।
From the next start, the window shows frames without waiting for the display to refresh, at most 240 a second; off, the display paces them. A present mode set at launch overrides it. अगली शुरुआत से, विंडो डिस्प्ले रीफ़्रेश का इंतज़ार किए बिना फ़्रेम दिखाती है, एक सेकंड में अधिकतम 240; बंद होने पर गति डिस्प्ले तय करता है। शुरुआत पर सेट किया गया प्रेज़ेंट मोड प्राथमिकता रखता है।
The most undo steps each document keeps; lowering it drops the oldest steps when you click OK. Steps can also go sooner when they use too much memory. हर दस्तावेज़ अधिकतम जितने पूर्ववत चरण रखता है; कम संख्या ठीक है पर क्लिक करने पर सबसे पुराने चरण हटा देती है। ज़्यादा मेमोरी लेने पर चरण पहले भी हट सकते हैं।
Shows the artwork changing while you drag; off, outlines follow the drag and the artwork changes when you release. A ruler guide always moves as you drag. खींचते समय आर्टवर्क को बदलते हुए दिखाता है; बंद होने पर, रूपरेखाएँ खींचने के साथ चलती हैं और छोड़ने पर आर्टवर्क बदलता है। रूलर गाइड खींचते समय हमेशा चलती है।
How many worker threads draw the artwork; -1 uses one fewer than the cores VectorCraft may use, at most 8, and 0 uses none. The web version always uses none. कितने वर्कर थ्रेड आर्टवर्क बनाते हैं; -1 उन कोर से एक कम उपयोग करता है जिन्हें VectorCraft उपयोग कर सकता है, अधिकतम 8, और 0 एक भी नहीं। वेब संस्करण कभी कोई उपयोग नहीं करता।
@@ -4794,6 +4804,10 @@ antiAlias Sharp शार्प
VectorCraft stores this choice, but Copy and Cut do not use a legacy vector clipboard format yet. VectorCraft यह विकल्प सेव करता है, लेकिन कॉपी करें और काटें अभी विरासत वेक्टर क्लिपबोर्ड फ़ॉर्मेट का उपयोग नहीं करते।
Preserve Paths or Preserve Appearance and Overprints for the legacy vector clipboard; VectorCraft stores the choice but does not use it yet. विरासत वेक्टर क्लिपबोर्ड के लिए “संरक्षित पाथ” (पाथ संरक्षित रखें) या “उपस्थिति और ओवरप्रिंट को संरक्षित करें”; VectorCraft विकल्प सेव करता है, पर अभी उसका उपयोग नहीं करता।
Keep Formatting keeps the styles of text copied from VectorCraft type when it is pasted into type; Keep Plain Text gives it the style where it lands. स्वरूपण रखना, VectorCraft के टेक्स्ट ऑब्जेक्ट से कॉपी किया टेक्स्ट टेक्स्ट ऑब्जेक्ट में पेस्ट करने पर उसकी शैलियाँ रखता है; प्लेन टेक्स्ट रखें उसे पेस्ट की जगह की शैली देता है।
Display All Blacks as Rich Black shows pure CMYK black (black ink alone at 100%) as RGB black on the canvas; Display All Blacks Accurately converts it through the CMYK working space. सभी ब्लैक्स को रिच ब्लैक के रूप में प्रदर्शित करें, कैनवास पर शुद्ध CMYK ब्लैक (केवल 100% काली स्याही) को RGB ब्लैक के रूप में दिखाता है; सभी ब्लैक्स को सटीक रूप से प्रदर्शित करें उसे कार्य CMYK स्पेस के ज़रिए बदलता है।
Output All Blacks as Rich Black draws pure CMYK black as RGB black in RGB and grayscale raster exports and Print as Bitmap; it does not change vector exports, CMYK JPEG, TIFF and PSD, or other printing. सभी ब्लैक्स को रिच ब्लैक के रूप में आउटपुट करें, RGB और ग्रेस्केल रास्टर एक्सपोर्ट और बिटमैप के रूप में प्रिंट करें में शुद्ध CMYK ब्लैक को RGB ब्लैक के रूप में बनाता है; यह वेक्टर एक्सपोर्ट, CMYK JPEG, TIFF और PSD या अन्य प्रिंटिंग को नहीं बदलता।
On a touch screen, switches to the Touch workspace; turning this off, or losing the touch screen, goes back to the workspace it switched from. टच स्क्रीन पर टच वर्कस्पेस पर बदलता है; यह विकल्प बंद करने या टच स्क्रीन न मिलने पर पिछले वर्कस्पेस पर लौट आता है।
A two-finger tap on the canvas undoes, or switches between selection and drawing tools in the Touch workspace, and a three-finger tap redoes; neither works in Presentation Mode. कैनवास पर दो उँगलियों का टैप पूर्ववत करता है, या टच वर्कस्पेस में सिलेक्शन और ड्रॉइंग टूल के बीच बदलता है, और तीन उँगलियों का टैप फिर से करता है; प्रस्तुति मोड में दोनों काम नहीं करते।
New type takes this language while Document Setup's language is English: USA and [Normal Character Style] sets none; type already in a document keeps its own language. जब तक डॉक्यूमेंट सेटअप की भाषा अंग्रेज़ी: USA है और [सामान्य कैरेक्टर स्टाइल] कोई भाषा सेट नहीं करती, नए टेक्स्ट को यह भाषा मिलती है; डॉक्यूमेंट में पहले से मौजूद टेक्स्ट अपनी भाषा रखता है।
In paragraphs with Hyphenate on, a listed word breaks only at the hyphens typed in it, or nowhere when it has none, whatever its case; Korean words take no hyphen, and Indian-language words do not break inside a character cluster. जिन पैराग्राफ़ में हाइफ़नेशन चालू है, उनमें सूची का शब्द केवल उसमें टाइप किए गए हाइफ़न पर टूटता है, या कोई न हो तो कहीं नहीं, उसका केस चाहे जो हो; कोरियाई शब्दों में हाइफ़न नहीं लगता, और भारतीय भाषाओं के शब्द किसी अक्षर-समूह के भीतर नहीं टूटते।
Reset all preferences to their defaults? सभी प्रेफ़रेंसेज़ को उनके डिफ़ॉल्ट पर रीसेट करें?
@@ -5105,6 +5119,7 @@ antiAlias Sharp शार्प
@plural {shown} of {n} result. Keep typing to narrow them.|{shown} of {n} results. Keep typing to narrow them. {n} में से {shown} परिणाम। इन्हें सीमित करने के लिए लिखते रहें।|{n} में से {shown} परिणाम। इन्हें सीमित करने के लिए लिखते रहें।
Recent Commands हाल के आदेश
No recent commands कोई हाल का आदेश नहीं
Type to search commands, tools, panels and effects आदेश, टूल, पैनल्स और इफ़ेक्ट्स खोजने के लिए टाइप करें
Search commands आदेश खोजें
Search Commands… कमांड खोजें…
Search Fonts Folder खोज फ़ॉन्ट फ़ोल्डर
@@ -5334,6 +5349,10 @@ antiAlias Sharp शार्प
Add Color Tool रंग जोड़ें टूल
Remove Color Tool रंग हटाएँ टूल
Remove Color रंग हटाएँ
Set As Base Color आधार रंग के रूप में सेट करें
Select Shade शेड चुनें
Add New Color नया रंग जोड़ें
Set Current Color As Base Color वर्तमान रंग को आधार रंग के रूप में सेट करें
Find the selected colors in the artwork चयनित रंगों को आर्टवर्क में खोजें
Show Color Groups रंग समूह दिखाएँ
Show Color Swatches रंग स्वॉचेस दिखाएँ
@@ -8390,6 +8409,7 @@ liquify-list-end {0}, {1} {0} और {1}
@msg no parent layer कोई अभिभावक लेयर नहीं
@msg no Pathfinder operation applied yet अभी तक कोई पाथफाइंडर ऑपरेशन लागू नहीं है
@msg no pattern `{name}` कोई पैटर्न `{name}` नहीं
@msg art painted with `{name}` can't be its tile `{name}` से रंगी कला उसकी टाइल नहीं हो सकती
@msg no pattern named `{choice}` `{choice}` नाम का कोई पैटर्न नहीं
@msg no pattern swatch `{name}` कोई पैटर्न स्वॉच `{name}` नहीं
@msg no PDF preset named `{n}` कोई PDF प्रीसेट नहीं है जिसका नाम `{n}` है
@@ -10323,6 +10343,11 @@ theme Appearance अपीयरेंस
@msg A panel is not joined to the rest by a crease. कोई पैनल किसी क्रीज़ लाइन से बाकी से जुड़ा नहीं है।
@msg A fold line is on a non-printing layer. एक फ़ोल्ड लाइन नॉन-प्रिंटिंग लेयर पर है।
@msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} पैनल: {panels}, हिंज: {hinges}, एरर: {errors}, वॉर्निंग: {warnings}
Engraving नक्काशी
Fine Hatching बारीक रेखांकन
Dense Hatching घना रेखांकन
Tapered Hatching पतला होता रेखांकन
Broken Hatching टूटा रेखांकन
Image Brush छवि ब्रश
Soft Bloom कोमल खिलावट
Halftone Field हाफ़टोन क्षेत्र
Can't render this file because it is too large.
+26
View File
@@ -409,6 +409,8 @@ font-technology Variable Változó
Bar Vonal
Bar Graph Tool Sávdiagram
Barbed Szakállas
arrowhead Feather Tollazat
arrowhead Target Céltábla
Baseline Alapvonal
Baseline (Standard) Alapvonali (szabványos)
Baseline Optimized Alapvonali, optimalizált
@@ -2118,6 +2120,10 @@ file-filter Templates Sablonok
Add Color Tool Szín hozzáadása eszköz
Remove Color Tool Szín eltávolítása eszköz
Remove Color Szín eltávolítása
Set As Base Color Beállítás alapszínként
Select Shade Árnyalat kiválasztása
Add New Color Új szín hozzáadása
Set Current Color As Base Color Aktuális szín beállítása alapszínként
Find the selected colors in the artwork A kijelölt színek keresése a grafikában
Harmony Sets Harmóniakészletek
HDTV 1080p HDTV 1080p
@@ -2609,6 +2615,7 @@ file-filter Templates Sablonok
Limit: Határ:
Limited Korlátozott
Line Vonal
Line Arrow Vonalas nyíl
Line Art Vonalas rajz
Line Art and Text Resolution: Vonalas grafika és szöveg felbontása:
Line Breaks Sortörések
@@ -3430,6 +3437,11 @@ diagnostics ui felület
Preserve Appearance Megjelenés megőrzése
Preserve Appearance and Overprints Megjelenés és felülnyomások megtartása
Preserve CMYK Numbers CMYK-értékek megtartása
Preserve RGB Numbers RGB-értékek megtartása
Device to Simulate: Szimulálandó eszköz:
Simulate Paper Color Papírszín szimulálása
Simulate Black Ink Fekete festék szimulálása
Load… Betöltés…
Preserve editing capabilities Szerkeszthetőség megtartása
Preserve Editing Capabilities Szerkeszthetőség megtartása
Preserve Lightness Világosság megtartása
@@ -3955,6 +3967,7 @@ mark-style Japanese Japán
New type takes this language while Document Setup's language is English: USA; type already in a document keeps its own language. Az új szöveg ezt a nyelvet kapja, amíg a Dokumentumbeállítás nyelve Angol: amerikai; a dokumentumban már meglévő szöveg megtartja a saját nyelvét.
In paragraphs with Hyphenate on, a listed word breaks only at the hyphens typed in it, or nowhere when it has none, whatever its language or case. Azokban a bekezdésekben, ahol az Elválasztás be van kapcsolva, a felsorolt szó csak a beleírt kötőjeleknél válik el, vagy sehol, ha nincs benne, nyelvétől és kis- vagy nagybetűitől függetlenül.
On the desktop, the .wasm plug-ins in this folder load at startup and when you click OK with a new folder here, except in Safe Mode; the web version does not load them. Az asztali változatban a mappa .wasm bővítményei indításkor töltődnek be, és amikor itt új mappával az OK gombra kattint, kivéve csökkentett módban; a webes változat nem tölti be őket.
How many instructions each run of a plug-in object filter may use; Large allows more than Normal with the same 60-second limit. Heavy filters keep their own budget. Hány utasítást használhat egy bővítmény objektumszűrőjének egy-egy futása; a Nagy többet enged, mint a Normál, ugyanazzal a 60 másodperces korláttal. A nehéz szűrők megtartják saját keretüket.
The first scratch disk choice: Startup, None or a folder path; VectorCraft stores it but does not use scratch disks yet. Az első munkalemez-választás: Startup, None vagy egy mappa elérési útja; a VectorCraft tárolja, de munkalemezeket még nem használ.
The second scratch disk choice: Startup, None or a folder path; VectorCraft stores it but does not use scratch disks yet. A második munkalemez-választás: Startup, None vagy egy mappa elérési útja; a VectorCraft tárolja, de munkalemezeket még nem használ.
How light or dark the interface is. Milyen világos vagy sötét a felület.
@@ -3973,6 +3986,7 @@ mark-style Japanese Japán
Animated Zoom works only while this is on; off, Animated Zoom is dimmed and zooming does not animate. Az Animált nagyítás csak akkor működik, ha ez be van kapcsolva; kikapcsolva az Animált nagyítás halvány, és a nagyítás nem animált.
The wheel's zoom glides in, and the Zoom tool zooms as you drag sideways or hold it down; off, the Zoom tool zooms to the area you drag across. A görgős nagyítás simán úszik be, a Nagyító pedig akkor nagyít, amikor oldalra húz vagy lenyomva tartja; kikapcsolva a Nagyító arra a területre nagyít, amelyen áthúz.
From the next start, the desktop version draws with this kind of graphics processor; Automatic prefers the one that drives the display. The web version does not use it. A következő indítástól az asztali változat ilyen típusú grafikus processzorral rajzol; az Automatikus a kijelzőt meghajtót részesíti előnyben. A webes változat nem használja.
From the next start, the window shows frames without waiting for the display to refresh, at most 240 a second; off, the display paces them. A present mode set at launch overrides it. A következő indítástól az ablak a képkockákat a kijelző frissítésére várás nélkül jeleníti meg, legfeljebb másodpercenként 240-et; kikapcsolva a kijelző diktálja az ütemet. Az indításkor megadott megjelenítési mód felülírja.
The most undo steps each document keeps; lowering it drops the oldest steps when you click OK. Steps can also go sooner when they use too much memory. A dokumentumonként megőrzött visszavonási lépések legnagyobb száma; kisebb szám az OK gombra kattintáskor törli a legrégebbi lépéseket. A lépések korábban is törlődhetnek, ha túl sok memóriát foglalnak.
Shows the artwork changing while you drag; off, outlines follow the drag and the artwork changes when you release. A ruler guide always moves as you drag. Húzás közben mutatja a grafika változását; kikapcsolva körvonalak követik a húzást, és a grafika elengedéskor változik. A vonalzó segédvonala húzás közben mindig mozog.
How many worker threads draw the artwork; -1 uses one fewer than the cores VectorCraft may use, at most 8, and 0 uses none. The web version always uses none. Hány munkaszál rajzolja a grafikát; a -1 eggyel kevesebbet használ, mint ahány magot a VectorCraft használhat, legfeljebb 8-at, a 0 egyet sem. A webes változat soha nem használ egyet sem.
@@ -3999,6 +4013,10 @@ mark-style Japanese Japán
VectorCraft stores this choice, but Copy and Cut do not use a legacy vector clipboard format yet. A VectorCraft menti ezt a választást, de a Másolás és a Kivágás még nem használ régi vektoros vágólapformátumot.
Preserve Paths or Preserve Appearance and Overprints for the legacy vector clipboard; VectorCraft stores the choice but does not use it yet. Útvonalak megtartása vagy Megjelenés és felülnyomások megtartása a régi vektoros vágólaphoz; a VectorCraft menti a választást, de még nem használja.
Keep Formatting keeps the styles of text copied from VectorCraft type when it is pasted into type; Keep Plain Text gives it the style where it lands. A Formázás megtartása megőrzi a VectorCraft szövegobjektumából másolt szöveg stílusait, amikor szövegobjektumba illesztik; a Csak a szöveg megtartása a beillesztés helyének stílusát adja neki.
Display All Blacks as Rich Black shows pure CMYK black (black ink alone at 100%) as RGB black on the canvas; Display All Blacks Accurately converts it through the CMYK working space. A Minden fekete megjelenítése mélyfeketeként a tiszta CMYK feketét (csak fekete festék 100%-on) RGB feketeként mutatja a vásznon; a Minden fekete pontos megjelenítése a munka-CMYK színtéren keresztül alakítja át.
Output All Blacks as Rich Black draws pure CMYK black as RGB black in RGB and grayscale raster exports and Print as Bitmap; it does not change vector exports, CMYK JPEG, TIFF and PSD, or other printing. A Minden fekete kimenete mélyfeketeként a tiszta CMYK feketét RGB feketeként rajzolja az RGB és szürkeárnyalatos raszteres exportokban és a Nyomtatás bitképként beállítással; nem változtatja meg a vektoros exportokat, a CMYK JPEG, TIFF és PSD fájlokat és a többi nyomtatást.
On a touch screen, switches to the Touch workspace; turning this off, or losing the touch screen, goes back to the workspace it switched from. Bekapcsolva érintőképernyőn az érintéses munkaterületre vált; kikapcsolásakor, vagy ha az érintőképernyő már nem érhető el, visszavált az előző munkaterületre.
A two-finger tap on the canvas undoes, or switches between selection and drawing tools in the Touch workspace, and a three-finger tap redoes; neither works in Presentation Mode. Bekapcsolva a kétujjas koppintás a vásznon visszavon, az érintéses munkaterületen pedig a kijelölő és a rajzoló eszközök között vált, a háromujjas koppintás újra végrehajt; bemutató módban egyik sem működik.
New type takes this language while Document Setup's language is English: USA and [Normal Character Style] sets none; type already in a document keeps its own language. Az új szöveg ezt a nyelvet kapja, amíg a Dokumentumbeállítás nyelve Angol: amerikai, és a [Normál karakterstílus] nem állít be nyelvet; a dokumentumban már meglévő szöveg megtartja a saját nyelvét.
In paragraphs with Hyphenate on, a listed word breaks only at the hyphens typed in it, or nowhere when it has none, whatever its case; Korean words take no hyphen, and Indian-language words do not break inside a character cluster. Azokban a bekezdésekben, ahol az Elválasztás be van kapcsolva, a felsorolt szó csak a beleírt kötőjeleknél válik el, vagy sehol, ha nincs benne, kis- vagy nagybetűitől függetlenül; a koreai szavak nem kapnak kötőjelet, az indiai nyelvű szavak pedig nem válnak el egy karaktercsoporton belül.
Reset all preferences to their defaults? Visszaállítja az összes beállítást az alapértékre?
@@ -4283,6 +4301,7 @@ mark-style Japanese Japán
@plural {shown} of {n} result. Keep typing to narrow them.|{shown} of {n} results. Keep typing to narrow them. {n} találatból {shown} látható. Gépeljen tovább a szűkítéshez.
Recent Commands Legutóbbi parancsok
No recent commands Nincsenek legutóbbi parancsok
Type to search commands, tools, panels and effects Gépeljen parancsok, eszközök, panelek és effektusok kereséséhez
Search commands Parancsok keresése
Search Commands… Parancsok keresése…
Search Fonts Folder Keresés betűtípusmappában
@@ -6091,6 +6110,7 @@ liquify-list-end {0}, {1} {0} és {1}
@msg no native format nincs natív formátum
@msg no pages nincsenek oldalak
@msg no pattern `{name}` nincs ilyen mintázat: `{name}`
@msg art painted with `{name}` can't be its tile a(z) `{name}` mintázattal festett grafika nem lehet annak csempéje
@msg no perspective grid preset named `{name}` nincs ilyen nevű perspektivikusrács-előbeállítás: `{name}`
@msg no plug-in {0} is installed nincs telepítve ilyen bővítmény: {0}
@msg no plug-in {id} is installed nincs telepítve ilyen bővítmény: {id}
@@ -8280,6 +8300,7 @@ breakText Glyphs Glifák
Remove Strokes Körvonalak eltávolítása
Place Brush Art Ecsetgrafika elhelyezése
Replace Brush Art Ecsetgrafika cseréje
Replace Pattern Art Mintázatgrafika cseréje
Strokes use this brush. Apply the new art to those strokes, or leave them as they are and add a copy of the brush with the new art? Körvonalak használják ezt az ecsetet. Alkalmazod az új grafikát ezekre a körvonalakra, vagy változatlanul hagyod őket, és hozzáadod az ecset egy másolatát az új grafikával?
Apply to Strokes Alkalmazás a körvonalakra
Leave Strokes Körvonalak megtartása
@@ -10705,6 +10726,11 @@ breakText Glyphs Glifák
@msg A panel is not joined to the rest by a crease. Egy panelt egyetlen bigvonal sem köt a többihez.
@msg A fold line is on a non-printing layer. Egy hajtásvonal nem nyomtatható rétegen van.
@msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} Panelek: {panels}, zsanérok: {hinges}, hibák: {errors}, figyelmeztetések: {warnings}
Engraving Metszet
Fine Hatching Finom vonalkázás
Dense Hatching Sűrű vonalkázás
Tapered Hatching Elvékonyodó vonalkázás
Broken Hatching Szaggatott vonalkázás
Image Brush Képecsetek
Soft Bloom Lágy virágzás
Halftone Field Féltónusmező
Can't render this file because it is too large.
+24
View File
@@ -3504,6 +3504,11 @@ digits Malayalam Malayalam
Place the pages with the placement again Tempatkan halaman lagi dengan penempatan tersebut
Placement: Penempatan:
Preserve CMYK Numbers Pertahankan angka CMYK
Preserve RGB Numbers Pertahankan angka RGB
Device to Simulate: Perangkat yang disimulasikan:
Simulate Paper Color Simulasikan warna kertas
Simulate Black Ink Simulasikan tinta hitam
Load… Muat…
Previous page Halaman sebelumnya
Print Layers: Lapisan cetak:
Print Preset: Preset cetak:
@@ -3581,6 +3586,10 @@ digits Malayalam Malayalam
Add Color Tool Alat Tambah Warna
Remove Color Tool Alat Hapus Warna
Remove Color Hapus Warna
Set As Base Color Atur sebagai Warna Dasar
Select Shade Pilih Corak
Add New Color Tambah Warna Baru
Set Current Color As Base Color Atur Warna Saat Ini sebagai Warna Dasar
Find the selected colors in the artwork Temukan warna yang dipilih di karya seni
Harmony Rules Aturan harmoni
Keep this row's colors (exclude) Pertahankan warna baris ini (kecualikan)
@@ -5045,6 +5054,7 @@ font-technology Variable Variabel
@plural {shown} of {n} result. Keep typing to narrow them.|{shown} of {n} results. Keep typing to narrow them. {shown} dari {n} hasil. Terus ketik untuk mempersempitnya.
Recent Commands Perintah terbaru
No recent commands Tidak ada perintah terbaru
Type to search commands, tools, panels and effects Ketik untuk mencari perintah, alat, panel, dan efek
Dashed Line Garis putus-putus
Panel menu Menu panel
Unembed… Lepaskan sematan…
@@ -5167,6 +5177,7 @@ font-technology Variable Variabel
New type takes this language while Document Setup's language is English: USA; type already in a document keeps its own language. Teks baru mendapat bahasa ini selama bahasa di Pengaturan dokumen adalah Inggris: USA; teks yang sudah ada di dokumen mempertahankan bahasanya sendiri.
In paragraphs with Hyphenate on, a listed word breaks only at the hyphens typed in it, or nowhere when it has none, whatever its language or case. Di paragraf dengan Pemenggalan kata aktif, kata dalam daftar hanya dipenggal pada tanda hubung yang diketik di dalamnya, atau tidak di mana pun jika tidak ada, apa pun bahasa atau huruf besar-kecilnya.
On the desktop, the .wasm plug-ins in this folder load at startup and when you click OK with a new folder here, except in Safe Mode; the web version does not load them. Di versi desktop, plug-in .wasm di folder ini dimuat saat memulai dan saat Anda mengeklik OK dengan folder baru di sini, kecuali dalam Mode aman; versi web tidak memuatnya.
How many instructions each run of a plug-in object filter may use; Large allows more than Normal with the same 60-second limit. Heavy filters keep their own budget. Berapa banyak instruksi yang boleh dipakai setiap jalannya filter objek dari plug-in; Besar mengizinkan lebih banyak daripada Normal dengan batas 60 detik yang sama. Filter berat mempertahankan anggarannya sendiri.
The first scratch disk choice: Startup, None or a folder path; VectorCraft stores it but does not use scratch disks yet. Pilihan disk scratch pertama: Startup, None, atau jalur folder; VectorCraft menyimpannya, tetapi belum menggunakan disk scratch.
The second scratch disk choice: Startup, None or a folder path; VectorCraft stores it but does not use scratch disks yet. Pilihan disk scratch kedua: Startup, None, atau jalur folder; VectorCraft menyimpannya, tetapi belum menggunakan disk scratch.
How light or dark the interface is. Seberapa terang atau gelap antarmuka.
@@ -5185,6 +5196,7 @@ font-technology Variable Variabel
Animated Zoom works only while this is on; off, Animated Zoom is dimmed and zooming does not animate. Zoom animasi hanya berfungsi selama ini aktif; jika nonaktif, Zoom animasi diredupkan dan zoom tidak dianimasikan.
The wheel's zoom glides in, and the Zoom tool zooms as you drag sideways or hold it down; off, the Zoom tool zooms to the area you drag across. Zoom dengan roda meluncur halus, dan Alat zoom memperbesar saat Anda menyeret ke samping atau menahannya; jika nonaktif, Alat zoom memperbesar ke area yang Anda seret.
From the next start, the desktop version draws with this kind of graphics processor; Automatic prefers the one that drives the display. The web version does not use it. Mulai dari peluncuran berikutnya, versi desktop menggambar dengan jenis prosesor grafis ini; Otomatis mengutamakan yang menjalankan layar. Versi web tidak menggunakannya.
From the next start, the window shows frames without waiting for the display to refresh, at most 240 a second; off, the display paces them. A present mode set at launch overrides it. Mulai dari peluncuran berikutnya, jendela menampilkan bingkai tanpa menunggu layar menyegarkan, paling banyak 240 per detik; jika nonaktif, layar mengatur lajunya. Mode presentasi yang diatur saat peluncuran menggantikannya.
The most undo steps each document keeps; lowering it drops the oldest steps when you click OK. Steps can also go sooner when they use too much memory. Jumlah maksimum langkah urungkan yang disimpan setiap dokumen; angka yang lebih kecil menghapus langkah terlama saat Anda mengeklik OK. Langkah juga dapat hilang lebih awal jika memakai terlalu banyak memori.
Shows the artwork changing while you drag; off, outlines follow the drag and the artwork changes when you release. A ruler guide always moves as you drag. Menampilkan gambar yang berubah saat Anda menyeret; jika nonaktif, garis luar mengikuti seretan dan gambar berubah saat Anda melepas. Panduan penggaris selalu bergerak saat Anda menyeret.
How many worker threads draw the artwork; -1 uses one fewer than the cores VectorCraft may use, at most 8, and 0 uses none. The web version always uses none. Berapa banyak thread pekerja yang menggambar; -1 memakai satu lebih sedikit dari inti yang boleh dipakai VectorCraft, paling banyak 8, dan 0 tidak memakai sama sekali. Versi web tidak pernah memakainya.
@@ -5211,6 +5223,10 @@ font-technology Variable Variabel
VectorCraft stores this choice, but Copy and Cut do not use a legacy vector clipboard format yet. VectorCraft menyimpan pilihan ini, tetapi Salin dan Potong belum memakai format clipboard vektor lama.
Preserve Paths or Preserve Appearance and Overprints for the legacy vector clipboard; VectorCraft stores the choice but does not use it yet. Pertahankan jalur atau Pertahankan tampilan dan overprint untuk clipboard vektor lama; VectorCraft menyimpan pilihan itu tetapi belum memakainya.
Keep Formatting keeps the styles of text copied from VectorCraft type when it is pasted into type; Keep Plain Text gives it the style where it lands. Pertahankan pemformatan menjaga gaya teks yang disalin dari objek teks VectorCraft saat ditempel ke objek teks; Pertahankan teks polos memberinya gaya di tempat teks itu ditempel.
Display All Blacks as Rich Black shows pure CMYK black (black ink alone at 100%) as RGB black on the canvas; Display All Blacks Accurately converts it through the CMYK working space. Tampilkan semua warna hitam sebagai rich black menampilkan hitam CMYK murni (hanya tinta hitam 100%) sebagai hitam RGB di kanvas; Tampilkan semua warna hitam secara akurat mengonversinya melalui ruang CMYK kerja.
Output All Blacks as Rich Black draws pure CMYK black as RGB black in RGB and grayscale raster exports and Print as Bitmap; it does not change vector exports, CMYK JPEG, TIFF and PSD, or other printing. Keluarkan semua warna hitam sebagai rich black menggambar hitam CMYK murni sebagai hitam RGB dalam ekspor raster RGB dan skala abu-abu serta Cetak sebagai bitmap; opsi ini tidak mengubah ekspor vektor, JPEG, TIFF, dan PSD CMYK, atau pencetakan lain.
On a touch screen, switches to the Touch workspace; turning this off, or losing the touch screen, goes back to the workspace it switched from. Pada layar sentuh, beralih ke ruang kerja sentuh; mematikan opsi ini atau hilangnya layar sentuh mengembalikan ruang kerja sebelum peralihan.
A two-finger tap on the canvas undoes, or switches between selection and drawing tools in the Touch workspace, and a three-finger tap redoes; neither works in Presentation Mode. Ketukan dua jari di kanvas mengurungkan, atau di ruang kerja sentuh beralih antara alat seleksi dan alat gambar, dan ketukan tiga jari mengulangi; keduanya tidak berfungsi dalam mode presentasi.
New type takes this language while Document Setup's language is English: USA and [Normal Character Style] sets none; type already in a document keeps its own language. Teks baru mendapat bahasa ini selama bahasa di Pengaturan dokumen adalah Inggris: USA dan [Gaya karakter normal] tidak menetapkan bahasa; teks yang sudah ada di dokumen mempertahankan bahasanya sendiri.
In paragraphs with Hyphenate on, a listed word breaks only at the hyphens typed in it, or nowhere when it has none, whatever its case; Korean words take no hyphen, and Indian-language words do not break inside a character cluster. Di paragraf dengan Pemenggalan kata aktif, kata dalam daftar hanya dipenggal pada tanda hubung yang diketik di dalamnya, atau tidak di mana pun jika tidak ada, apa pun huruf besar-kecilnya; kata Korea tidak diberi tanda hubung, dan kata dalam bahasa India tidak dipenggal di dalam satu gugus karakter.
Reset all preferences to their defaults? Atur ulang semua preferensi ke defaultnya?
@@ -6379,6 +6395,7 @@ imageTrace Outline Kontur
Arrow Panah
Arrow (open) Panah (terbuka)
Barbed Berduri
arrowhead Feather Bulu
Half Arrow (left) Setengah panah (kiri)
Half Arrow (right) Setengah panah (kanan)
Concave Cekung
@@ -6406,6 +6423,7 @@ imageTrace Outline Kontur
Kite Layang-layang
Triangle to Bar Segitiga ke batang
Oval Oval
Line Arrow Panah garis
Complementary Komplementer
Complementary 2 Komplementer 2
Split Complementary Komplementer terpisah
@@ -8145,6 +8163,7 @@ breakText Glyphs Glif
Remove Strokes Hapus Stroke
Place Brush Art Tempatkan karya seni kuas
Replace Brush Art Ganti karya seni kuas
Replace Pattern Art Ganti karya seni pola
Strokes use this brush. Apply the new art to those strokes, or leave them as they are and add a copy of the brush with the new art? Stroke menggunakan kuas ini. Terapkan karya seni baru ke stroke tersebut, atau biarkan apa adanya dan tambahkan salinan kuas dengan karya seni baru?
Apply to Strokes Terapkan ke Stroke
Leave Strokes Biarkan Stroke
@@ -8560,6 +8579,11 @@ breakText Glyphs Glif
@msg A joint does not close by {gap} pt. Sebuah sambungan tidak menutup sejauh {gap} pt.
@msg Two panels pass through each other. Dua panel saling menembus.
@msg composer must be "singleLine", "everyLine", "standardSingleLine" or "standardEveryLine" composer harus "singleLine", "everyLine", "standardSingleLine", atau "standardEveryLine"
Engraving Ukiran
Fine Hatching Arsiran halus
Dense Hatching Arsiran rapat
Tapered Hatching Arsiran meruncing
Broken Hatching Arsiran terputus
Image Brush Kuas gambar
Soft Bloom Mekar lembut
Halftone Field Bidang halftone
Can't render this file because it is too large.
+54
View File
@@ -1731,6 +1731,10 @@ file-filter Templates Modelli
Add Color Tool Strumento Aggiungi colore
Remove Color Tool Strumento Rimuovi colore
Remove Color Rimuovi colore
Set As Base Color Imposta come colore base
Select Shade Seleziona sfumatura
Add New Color Aggiungi nuovo colore
Set Current Color As Base Color Imposta il colore corrente come colore base
Find the selected colors in the artwork Trova i colori selezionati nella grafica
Harmony Sets Gruppi di armonia
Height Altezza
@@ -2911,6 +2915,11 @@ diagnostics ui interfaccia
Preserve Alpha Transparency Mantieni trasparenza alfa
Preserve Appearance and Overprints Mantieni aspetto e sovrastampe
Preserve CMYK Numbers Mantieni valori CMYK
Preserve RGB Numbers Mantieni valori RGB
Device to Simulate: Dispositivo da simulare:
Simulate Paper Color Simula colore carta
Simulate Black Ink Simula inchiostro nero
Load… Carica…
Preserve Editing Capabilities Mantieni possibilità di modifica
Preserve editing capabilities Mantieni possibilità di modifica
Preserve Lightness Mantieni luminosità
@@ -3414,6 +3423,7 @@ digits Malayalam Malayalam
New type takes this language while Document Setup's language is English: USA; type already in a document keeps its own language. Il nuovo testo prende questa lingua finché la lingua di Imposta documento è Inglese: Stati Uniti; il testo già presente in un documento mantiene la propria lingua.
In paragraphs with Hyphenate on, a listed word breaks only at the hyphens typed in it, or nowhere when it has none, whatever its language or case. Nei paragrafi con Sillaba attivo, una parola dell'elenco va a capo solo ai trattini digitati al suo interno, o in nessun punto se non ne ha, qualunque sia la sua lingua o l'uso delle maiuscole.
On the desktop, the .wasm plug-ins in this folder load at startup and when you click OK with a new folder here, except in Safe Mode; the web version does not load them. Nella versione desktop, i plug-in .wasm di questa cartella vengono caricati all'avvio e quando fai clic su OK con una nuova cartella qui, tranne in modalità provvisoria; la versione web non li carica.
How many instructions each run of a plug-in object filter may use; Large allows more than Normal with the same 60-second limit. Heavy filters keep their own budget. Quante istruzioni può usare ogni esecuzione di un filtro di oggetti di un plug-in; Grande ne consente più di Normale con lo stesso limite di 60 secondi. I filtri pesanti mantengono il proprio budget.
The first scratch disk choice: Startup, None or a folder path; VectorCraft stores it but does not use scratch disks yet. La prima scelta del disco di memoria virtuale: Startup, None o il percorso di una cartella; VectorCraft la memorizza, ma non usa ancora dischi di memoria virtuale.
The second scratch disk choice: Startup, None or a folder path; VectorCraft stores it but does not use scratch disks yet. La seconda scelta del disco di memoria virtuale: Startup, None o il percorso di una cartella; VectorCraft la memorizza, ma non usa ancora dischi di memoria virtuale.
How light or dark the interface is. Quanto è chiara o scura l'interfaccia.
@@ -3432,6 +3442,7 @@ digits Malayalam Malayalam
Animated Zoom works only while this is on; off, Animated Zoom is dimmed and zooming does not animate. Lo Zoom animato funziona solo mentre questa opzione è attiva; se disattivata, lo Zoom animato è attenuato e lo zoom non è animato.
The wheel's zoom glides in, and the Zoom tool zooms as you drag sideways or hold it down; off, the Zoom tool zooms to the area you drag across. Lo zoom con la rotellina scorre in modo fluido, e lo Strumento Zoom ingrandisce mentre trascini di lato o lo tieni premuto; se disattivata, lo Strumento Zoom ingrandisce l'area che trascini.
From the next start, the desktop version draws with this kind of graphics processor; Automatic prefers the one that drives the display. The web version does not use it. Dal prossimo avvio, la versione desktop disegna con questo tipo di processore grafico; Automatico preferisce quello che gestisce lo schermo. La versione web non lo usa.
From the next start, the window shows frames without waiting for the display to refresh, at most 240 a second; off, the display paces them. A present mode set at launch overrides it. Dal prossimo avvio, la finestra mostra i fotogrammi senza attendere l'aggiornamento dello schermo, al massimo 240 al secondo; disattivato, è lo schermo a scandirli. Una modalità di presentazione impostata all'avvio ha la precedenza.
The most undo steps each document keeps; lowering it drops the oldest steps when you click OK. Steps can also go sooner when they use too much memory. Il numero massimo di passaggi di annullamento che ogni documento conserva; un numero più basso rimuove i passaggi più vecchi quando fai clic su OK. I passaggi possono sparire anche prima se occupano troppa memoria.
Shows the artwork changing while you drag; off, outlines follow the drag and the artwork changes when you release. A ruler guide always moves as you drag. Mostra la grafica che cambia mentre trascini; se disattivata, i contorni seguono il trascinamento e la grafica cambia quando rilasci. Una guida del righello si muove sempre mentre trascini.
How many worker threads draw the artwork; -1 uses one fewer than the cores VectorCraft may use, at most 8, and 0 uses none. The web version always uses none. Quanti thread di lavoro disegnano la grafica; -1 ne usa uno in meno dei core che VectorCraft può usare, al massimo 8, e 0 nessuno. La versione web non ne usa mai.
@@ -3458,6 +3469,10 @@ digits Malayalam Malayalam
VectorCraft stores this choice, but Copy and Cut do not use a legacy vector clipboard format yet. VectorCraft salva questa scelta, ma Copia e Taglia non usano ancora un formato degli appunti vettoriali tradizionali.
Preserve Paths or Preserve Appearance and Overprints for the legacy vector clipboard; VectorCraft stores the choice but does not use it yet. Mantieni tracciati o Mantieni aspetto e sovrastampe per gli appunti vettoriali tradizionali; VectorCraft salva la scelta ma non la usa ancora.
Keep Formatting keeps the styles of text copied from VectorCraft type when it is pasted into type; Keep Plain Text gives it the style where it lands. Mantieni formattazione conserva gli stili del testo copiato da un oggetto di testo di VectorCraft quando viene incollato in un oggetto di testo; Mantieni solo testo gli dà lo stile del punto in cui arriva.
Display All Blacks as Rich Black shows pure CMYK black (black ink alone at 100%) as RGB black on the canvas; Display All Blacks Accurately converts it through the CMYK working space. Visualizza tutti i neri come nero ricco mostra il nero CMYK puro (solo inchiostro nero al 100%) come nero RGB nell'area di lavoro; Visualizza tutti i neri con precisione lo converte attraverso lo spazio CMYK di lavoro.
Output All Blacks as Rich Black draws pure CMYK black as RGB black in RGB and grayscale raster exports and Print as Bitmap; it does not change vector exports, CMYK JPEG, TIFF and PSD, or other printing. Riproduci tutti i neri come nero ricco disegna il nero CMYK puro come nero RGB nelle esportazioni raster RGB e in scala di grigi e con Stampa come bitmap; non cambia le esportazioni vettoriali, i JPEG, TIFF e PSD CMYK né le altre stampe.
On a touch screen, switches to the Touch workspace; turning this off, or losing the touch screen, goes back to the workspace it switched from. Su uno schermo touch passa all'area di lavoro touch; disattivando l'opzione o se lo schermo touch non è più rilevato, torna all'area di lavoro precedente.
A two-finger tap on the canvas undoes, or switches between selection and drawing tools in the Touch workspace, and a three-finger tap redoes; neither works in Presentation Mode. Un tocco con due dita sull'area di lavoro annulla o, nell'area di lavoro touch, alterna tra strumenti di selezione e di disegno, e un tocco con tre dita ripete; nessuno dei due funziona in modalità presentazione.
New type takes this language while Document Setup's language is English: USA and [Normal Character Style] sets none; type already in a document keeps its own language. Il nuovo testo prende questa lingua finché la lingua di Imposta documento è Inglese: Stati Uniti e [Stile carattere normale] non ne imposta una; il testo già presente in un documento mantiene la propria lingua.
In paragraphs with Hyphenate on, a listed word breaks only at the hyphens typed in it, or nowhere when it has none, whatever its case; Korean words take no hyphen, and Indian-language words do not break inside a character cluster. Nei paragrafi con Sillaba attivo, una parola dell'elenco va a capo solo ai trattini digitati al suo interno, o in nessun punto se non ne ha, qualunque sia l'uso delle maiuscole; le parole coreane non prendono trattino e le parole in lingue indiane non vanno a capo all'interno di un gruppo di caratteri.
Reset all preferences to their defaults? Ripristinare tutte le preferenze ai valori predefiniti?
@@ -3704,6 +3719,7 @@ digits Malayalam Malayalam
@plural {shown} of {n} result. Keep typing to narrow them.|{shown} of {n} results. Keep typing to narrow them. {shown} di {n} risultato. Continua a digitare per restringerli.|{shown} di {n} risultati. Continua a digitare per restringerli.
Recent Commands Comandi recenti
No recent commands Nessun comando recente
Type to search commands, tools, panels and effects Digita per cercare comandi, strumenti, pannelli ed effetti
Search commands Cerca comandi
Search Commands… Cerca comandi…
Secondary Secondario
@@ -5427,6 +5443,7 @@ liquify-list-end {0}, {1} {0} e {1}
@msg no native format nessun formato nativo
@msg no pages nessuna pagina
@msg no pattern `{name}` nessun motivo `{name}`
@msg art painted with `{name}` can't be its tile una grafica dipinta con `{name}` non può esserne la porzione
@msg no perspective grid preset named `{name}` nessun preset di griglia prospettica denominato `{name}`
@msg no plug-in {0} is installed nessun plug-in {0} installato
@msg no plug-in {id} is installed nessun plug-in {id} installato
@@ -7638,6 +7655,37 @@ anchor Points: Punti:
@msg `{id}` is not a colour adjustment `{id}` non è una regolazione del colore
@msg missing `effect` manca `effect`
@msg `params` must be an object `params` deve essere un oggetto
# Stroke arrowheads (Stroke panel, Dimension Tool Options and Properties › Arrow Style).
Triangle (open) Triangolo (aperto)
Circle (open) Cerchio (aperto)
Square (open) Quadrato (aperto)
Arrow (open) Freccia (aperta)
Barbed Uncinata
arrowhead Feather Piuma
arrowhead Target Bersaglio
Half Arrow (left) Mezza freccia (sinistra)
Half Arrow (right) Mezza freccia (destra)
Double Bar Doppia barra
Dot on Bar Punto su barra
Chevron Gallone
Plus Più
Hexagon (open) Esagono (aperto)
Tag Etichetta
Tag (open) Etichetta (aperta)
Half Circle Semicerchio
Drop Goccia
Slash Barra obliqua
Double Slash Doppia barra obliqua
Diamond (open) Rombo (aperto)
Reverse Triangle Triangolo invertito
Swallowtail Coda di rondine
Bracket Parentesi
Fork Forcella
Leaf Foglia
Kite Aquilone
Triangle to Bar Da triangolo a barra
Oval Ovale
Line Arrow Freccia a linee
# Path Precision Tools add-on (Object › Plug-ins › Path Precision Tools): its tools, Anchor Inspector panel, commands and messages.
Path Precision Tools Strumenti di precisione per tracciati
Anchor Eraser Brush Pennello gomma punti di ancoraggio
@@ -7928,6 +7976,7 @@ breakText Glyphs Glifi
Remove Strokes Rimuovi tracce
Place Brush Art Inserisci grafica del pennello
Replace Brush Art Sostituisci grafica del pennello
Replace Pattern Art Sostituisci grafica del motivo
Strokes use this brush. Apply the new art to those strokes, or leave them as they are and add a copy of the brush with the new art? Alcune tracce usano questo pennello. Applicare la nuova grafica a queste tracce, o lasciarle come sono e aggiungere una copia del pennello con la nuova grafica?
Apply to Strokes Applica alle tracce
Leave Strokes Lascia le tracce
@@ -10363,6 +10412,11 @@ breakText Glyphs Glifi
@msg A panel is not joined to the rest by a crease. Un pannello non è unito al resto da alcuna linea di cordonatura.
@msg A fold line is on a non-printing layer. Una linea di piega si trova su un livello non stampabile.
@msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} Pannelli: {panels}, cerniere: {hinges}, errori: {errors}, avvisi: {warnings}
Engraving Incisione
Fine Hatching Tratteggio fine
Dense Hatching Tratteggio fitto
Tapered Hatching Tratteggio affusolato
Broken Hatching Tratteggio spezzato
Image Brush Pennelli immagine
Soft Bloom Fioritura morbida
Halftone Field Campo mezzitoni
Can't render this file because it is too large.
+53
View File
@@ -2115,6 +2115,10 @@ antiAlias Sharp シャープ
Add Color Tool カラー追加ツール
Remove Color Tool カラー削除ツール
Remove Color カラーを削除
Set As Base Color ベースカラーに設定
Select Shade シェードを選択
Add New Color 新規カラーを追加
Set Current Color As Base Color 現在のカラーをベースカラーに設定
Find the selected colors in the artwork 選択したカラーをアートワーク内で検索
Height 高さ
Height: 高さ:
@@ -2986,6 +2990,11 @@ diagnostics ui UI
Preserve Alpha Transparency アルファ透明を保持
Preserve Appearance and Overprints アピアランスとオーバープリントを保持
Preserve CMYK Numbers CMYK 値を保持
Preserve RGB Numbers RGB 値を保持
Device to Simulate: シミュレートするデバイス:
Simulate Paper Color 用紙の色をシミュレート
Simulate Black Ink インキの黒をシミュレート
Load… 読み込み…
Preserve Editing Capabilities 編集機能を保持
Preserve Lightness 明度を保持
Preserve Overprints and Spot Colors オーバープリントと特色を保持
@@ -3387,6 +3396,7 @@ mark-style Japanese 日本式
New type takes this language while Document Setup's language is English: USA; type already in a document keeps its own language. ドキュメント設定の言語が英語 (米国) の間は、新しいテキストにこの言語が設定されます。ドキュメント内の既存のテキストは自身の言語を保ちます。
In paragraphs with Hyphenate on, a listed word breaks only at the hyphens typed in it, or nowhere when it has none, whatever its language or case. ハイフネーションがオンの段落では、リストの単語は入力したハイフンの位置でのみ分割され、ハイフンがなければ分割されません。言語や大文字小文字は問いません。
On the desktop, the .wasm plug-ins in this folder load at startup and when you click OK with a new folder here, except in Safe Mode; the web version does not load them. デスクトップ版では、このフォルダーの .wasm プラグインが起動時と、ここに新しいフォルダーを指定して OK をクリックしたときに読み込まれます (セーフモードを除く)。Web 版では読み込まれません。
How many instructions each run of a plug-in object filter may use; Large allows more than Normal with the same 60-second limit. Heavy filters keep their own budget. プラグインのオブジェクトフィルターを 1 回実行するときに使える命令の数です。大では通常より多く使え、60 秒の制限は変わりません。重いフィルターは独自の予算を保ちます。
The first scratch disk choice: Startup, None or a folder path; VectorCraft stores it but does not use scratch disks yet. 1 つ目の仮想記憶ディスクの選択です。Startup、None またはフォルダーのパスを指定します。VectorCraft は保存しますが、仮想記憶ディスクはまだ使用しません。
The second scratch disk choice: Startup, None or a folder path; VectorCraft stores it but does not use scratch disks yet. 2 つ目の仮想記憶ディスクの選択です。Startup、None またはフォルダーのパスを指定します。VectorCraft は保存しますが、仮想記憶ディスクはまだ使用しません。
How light or dark the interface is. インターフェイスをどの程度明るく、または暗く表示するかです。
@@ -3405,6 +3415,7 @@ mark-style Japanese 日本式
Animated Zoom works only while this is on; off, Animated Zoom is dimmed and zooming does not animate. アニメーションズームは、これがオンのときだけ働きます。オフの場合、アニメーションズームは淡色表示になり、ズームはアニメーションしません。
The wheel's zoom glides in, and the Zoom tool zooms as you drag sideways or hold it down; off, the Zoom tool zooms to the area you drag across. ホイールによるズームはなめらかに動き、ズームツールは横にドラッグするか押したままにするとズームします。オフの場合、ズームツールはドラッグした範囲にズームします。
From the next start, the desktop version draws with this kind of graphics processor; Automatic prefers the one that drives the display. The web version does not use it. 次回の起動から、デスクトップ版はこの種類のグラフィックプロセッサーで描画します。自動ではディスプレイを駆動しているものが優先されます。Web 版では使われません。
From the next start, the window shows frames without waiting for the display to refresh, at most 240 a second; off, the display paces them. A present mode set at launch overrides it. 次回の起動から、ウィンドウはディスプレイの更新を待たずにフレームを表示します。上限は毎秒 240 フレームです。オフにすると、ディスプレイがフレームの間隔を決めます。起動時に指定した表示モードが優先されます。
The most undo steps each document keeps; lowering it drops the oldest steps when you click OK. Steps can also go sooner when they use too much memory. 各ドキュメントが保持する取り消しステップの最大数です。値を下げると、OK をクリックしたときに古いステップから削除されます。メモリを使いすぎる場合は、さらに早く削除されることがあります。
Shows the artwork changing while you drag; off, outlines follow the drag and the artwork changes when you release. A ruler guide always moves as you drag. ドラッグ中にアートワークが変わる様子を表示します。オフの場合、ドラッグ中はアウトラインが動き、ボタンを離すとアートワークが変わります。定規ガイドはドラッグ中も常に動きます。
How many worker threads draw the artwork; -1 uses one fewer than the cores VectorCraft may use, at most 8, and 0 uses none. The web version always uses none. アートワークを描画するワーカースレッドの数です。-1 は VectorCraft が使えるコア数より 1 つ少なく (最大 8)、0 はワーカーを使いません。Web 版では常に使いません。
@@ -3431,6 +3442,10 @@ mark-style Japanese 日本式
VectorCraft stores this choice, but Copy and Cut do not use a legacy vector clipboard format yet. VectorCraft はこの選択を保存しますが、コピーと切り取りはまだ従来のベクタークリップボードの形式を使用しません。
Preserve Paths or Preserve Appearance and Overprints for the legacy vector clipboard; VectorCraft stores the choice but does not use it yet. 従来のベクタークリップボードの「パスを保持」または「アピアランスとオーバープリントを保持」です。VectorCraft は選択を保存しますが、まだ使用しません。
Keep Formatting keeps the styles of text copied from VectorCraft type when it is pasted into type; Keep Plain Text gives it the style where it lands. 「書式を保持」では、VectorCraft のテキストオブジェクトからコピーしたテキストをテキストオブジェクトに貼り付けるとスタイルを保持します。「テキストのみを保持」では、貼り付け先のスタイルになります。
Display All Blacks as Rich Black shows pure CMYK black (black ink alone at 100%) as RGB black on the canvas; Display All Blacks Accurately converts it through the CMYK working space. 「すべてのブラックをリッチブラックで表示」では、純粋な CMYK ブラック(ブラックインキのみ 100%)をカンバス上で RGB ブラックとして表示します。「すべてのブラックを正確に表示」では、作業用 CMYK スペースを通して変換します。
Output All Blacks as Rich Black draws pure CMYK black as RGB black in RGB and grayscale raster exports and Print as Bitmap; it does not change vector exports, CMYK JPEG, TIFF and PSD, or other printing. 「すべてのブラックをリッチブラックで出力」では、RGB とグレースケールのラスター書き出しと「ビットマップとしてプリント」で純粋な CMYK ブラックを RGB ブラックとして描画します。ベクター書き出し、CMYK の JPEG、TIFF と PSD、その他のプリントは変わりません。
On a touch screen, switches to the Touch workspace; turning this off, or losing the touch screen, goes back to the workspace it switched from. タッチスクリーンではタッチワークスペースに切り替えます。オフにするか、タッチスクリーンが使えなくなると、切り替える前のワークスペースに戻ります。
A two-finger tap on the canvas undoes, or switches between selection and drawing tools in the Touch workspace, and a three-finger tap redoes; neither works in Presentation Mode. カンバスを 2 本指でタップすると取り消し、タッチワークスペースでは選択ツールと描画ツールを切り替えます。3 本指でタップするとやり直します。どちらもプレゼンテーションモードでは動作しません。
New type takes this language while Document Setup's language is English: USA and [Normal Character Style] sets none; type already in a document keeps its own language. ドキュメント設定の言語が英語 (米国) で、[標準文字スタイル] が言語を設定していない間は、新しいテキストにこの言語が設定されます。ドキュメント内の既存のテキストは自身の言語を保ちます。
In paragraphs with Hyphenate on, a listed word breaks only at the hyphens typed in it, or nowhere when it has none, whatever its case; Korean words take no hyphen, and Indian-language words do not break inside a character cluster. ハイフネーションがオンの段落では、リストの単語は入力したハイフンの位置でのみ分割され、ハイフンがなければ分割されません。大文字小文字は問いません。韓国語の単語にはハイフンが付かず、インドの言語の単語は文字のまとまりの途中では分割されません。
Reset all preferences to their defaults? すべての環境設定を初期値に戻しますか?
@@ -3576,6 +3591,7 @@ mark-style Japanese 日本式
@plural {shown} of {n} result. Keep typing to narrow them.|{shown} of {n} results. Keep typing to narrow them. {n} 件中 {shown} 件。続けて入力すると絞り込めます。
Recent Commands 最近使ったコマンド
No recent commands 最近使ったコマンドはありません
Type to search commands, tools, panels and effects 入力してコマンド、ツール、パネル、効果を検索
Search commands コマンドを検索
Secondary セカンダリ
Select All Art on Layer レイヤー上のすべてのアートを選択
@@ -5193,6 +5209,7 @@ variable-list-end {0}, {1} {0}、{1}
@msg {label} produced an empty result: a line or other open path encloses no area; to include it, apply Object › Path › Outline Stroke to it first {label} の結果が空になりました。領域を囲まない直線などのオープンパスがあります。含めるには、先にそのパスに「オブジェクト › パス › パスのアウトライン」を適用してください
@msg already editing a pattern すでにパターンを編集中です
@msg no pattern `{name}` パターン `{name}` が見つかりません
@msg art painted with `{name}` can't be its tile `{name}` でペイントされたアートはそのタイルにできません
@msg not in pattern editing mode パターン編集モードではありません
@msg finish editing the pattern first 先にパターンの編集を終了してください
@msg pattern missing パターンが見つかりません
@@ -9528,6 +9545,36 @@ anchor Points: ポイント:
@msg `{id}` is not a colour adjustment `{id}` はカラー補正ではありません
@msg missing `effect` `effect` が指定されていません
@msg `params` must be an object `params` にはオブジェクトを指定してください
# Stroke arrowheads (Stroke panel, Dimension Tool Options and Properties › Arrow Style).
Triangle (open) 三角形 (白抜き)
Circle (open) 円 (白抜き)
Square (open) 正方形 (白抜き)
Arrow (open) 矢印 (白抜き)
Barbed かえし付き
arrowhead Feather 矢羽根
Half Arrow (left) 片矢印 (左)
Half Arrow (right) 片矢印 (右)
Double Bar 二重バー
Dot on Bar バー上のドット
Chevron 山形
Plus プラス
Hexagon (open) 六角形 (白抜き)
Tag タグ
Tag (open) タグ (白抜き)
Half Circle 半円
Drop しずく
Slash スラッシュ
Double Slash 二重スラッシュ
Diamond (open) ひし形 (白抜き)
Reverse Triangle 逆三角形
Swallowtail 燕尾
Bracket 角かっこ
Fork フォーク
Leaf 葉
Kite カイト
Triangle to Bar 三角形からバー
Oval 楕円
Line Arrow 線矢印
# Path Precision Tools add-on (Object › Plug-ins › Path Precision Tools): its tools, Anchor Inspector panel, commands and messages.
Path Precision Tools パス精密ツール
Anchor Eraser Brush アンカーポイント消去ブラシ
@@ -9818,6 +9865,7 @@ breakText Glyphs 字形
Remove Strokes 線を削除
Place Brush Art ブラシのアートを配置
Replace Brush Art ブラシのアートを置き換え
Replace Pattern Art パターンのアートを置き換え
Strokes use this brush. Apply the new art to those strokes, or leave them as they are and add a copy of the brush with the new art? このブラシは線で使われています。新しいアートをそれらの線に適用しますか?それとも線をそのままにして、新しいアートを持つブラシのコピーを追加しますか?
Apply to Strokes 線に適用
Leave Strokes 線を保持
@@ -10427,6 +10475,11 @@ breakText Glyphs 字形
@msg A panel is not joined to the rest by a crease. パネルがどの筋入れ線でも他とつながっていません。
@msg A fold line is on a non-printing layer. 折り線が印刷しないレイヤーにあります。
@msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} パネル: {panels}、ヒンジ: {hinges}、エラー: {errors}、警告: {warnings}
Engraving 彫刻
Fine Hatching 細いハッチング
Dense Hatching 密なハッチング
Tapered Hatching 先細りハッチング
Broken Hatching 途切れたハッチング
Image Brush 画像ブラシ
Soft Bloom やわらかな花
Halftone Field ハーフトーンの面
Can't render this file because it is too large.
+25
View File
@@ -4995,6 +4995,11 @@ digits Malayalam მალაიალამური
Place the pages with the placement again გვერდების ხელახლა განთავსება განთავსების მიხედვით
Placement: განთავსება:
Preserve CMYK Numbers CMYK მნიშვნელობების შენარჩუნება
Preserve RGB Numbers RGB მნიშვნელობების შენარჩუნება
Device to Simulate: სიმულირებადი მოწყობილობა:
Simulate Paper Color ქაღალდის ფერის იმიტაცია
Simulate Black Ink შავი მელნის იმიტაცია
Load… ჩატვირთვა…
Previous page წინა გვერდი
Print Layers: შრეების ბეჭდვა:
Print Preset: ბეჭდვის პრესეტი:
@@ -5067,6 +5072,10 @@ digits Malayalam მალაიალამური
Add Color Tool ფერის დამატების ხელსაწყო
Remove Color Tool ფერის წაშლის ხელსაწყო
Remove Color ფერის წაშლა
Set As Base Color საბაზო ფერად დაყენება
Select Shade ელფერის არჩევა
Add New Color ახალი ფერის დამატება
Set Current Color As Base Color მიმდინარე ფერის საბაზო ფერად დაყენება
Find the selected colors in the artwork მონიშნული ფერების ძებნა ნახატში
Keep this row's colors (exclude) ამ სტრიქონის ფერების შენარჩუნება (გამორიცხვა)
Limit to Library: ბიბლიოთეკით შეზღუდვა:
@@ -6437,6 +6446,7 @@ font-technology Variable ცვლადი
@plural {shown} of {n} result. Keep typing to narrow them.|{shown} of {n} results. Keep typing to narrow them. {n} შედეგიდან {shown}. გააგრძელეთ აკრეფა მათ შესამცირებლად.
Recent Commands ბოლოდროინდელი ბრძანებები
No recent commands ბოლოდროინდელი ბრძანებები არ არის
Type to search commands, tools, panels and effects აკრიფეთ ბრძანებების, ხელსაწყოების, პანელებისა და ეფექტების მოსაძებნად
Dashed Line ტირეებიანი ხაზი
Panel menu პანელის მენიუ
Unembed… ჩაშენების მოხსნა…
@@ -6560,6 +6570,7 @@ font-technology Variable ცვლადი
New type takes this language while Document Setup's language is English: USA; type already in a document keeps its own language. ახალი ტექსტი იღებს ამ ენას, სანამ დოკუმენტის პარამეტრების ენაა ინგლისური: აშშ; დოკუმენტში უკვე არსებული ტექსტი ინარჩუნებს თავის ენას.
In paragraphs with Hyphenate on, a listed word breaks only at the hyphens typed in it, or nowhere when it has none, whatever its language or case. აბზაცებში, სადაც სიტყვების გადატანა ჩართულია, სიაში მოცემული სიტყვა მხოლოდ მასში აკრეფილ დეფისებთან გადაიტანება, ან არსად, თუ ისინი არ აქვს, მიუხედავად ენისა და რეგისტრისა.
On the desktop, the .wasm plug-ins in this folder load at startup and when you click OK with a new folder here, except in Safe Mode; the web version does not load them. დესკტოპის ვერსიაში ამ საქაღალდის .wasm პლაგინები იტვირთება გაშვებისას და როცა აქ ახალი საქაღალდით OK-ს დააწკაპუნებთ, გარდა უსაფრთხო რეჟიმისა; ვებ-ვერსია მათ არ ტვირთავს.
How many instructions each run of a plug-in object filter may use; Large allows more than Normal with the same 60-second limit. Heavy filters keep their own budget. რამდენი ინსტრუქციის გამოყენება შეუძლია პლაგინის ობიექტების ფილტრის თითოეულ გაშვებას; დიდი ჩვეულებრივზე მეტს უშვებს, იმავე 60-წამიანი ლიმიტით. მძიმე ფილტრები საკუთარ ბიუჯეტს ინარჩუნებენ.
The first scratch disk choice: Startup, None or a folder path; VectorCraft stores it but does not use scratch disks yet. სამუშაო დისკის პირველი არჩევანი: Startup, None ან საქაღალდის მისამართი; VectorCraft მას ინახავს, მაგრამ სამუშაო დისკებს ჯერ არ იყენებს.
The second scratch disk choice: Startup, None or a folder path; VectorCraft stores it but does not use scratch disks yet. სამუშაო დისკის მეორე არჩევანი: Startup, None ან საქაღალდის მისამართი; VectorCraft მას ინახავს, მაგრამ სამუშაო დისკებს ჯერ არ იყენებს.
How light or dark the interface is. რამდენად ღია ან მუქია ინტერფეისი.
@@ -6578,6 +6589,7 @@ font-technology Variable ცვლადი
Animated Zoom works only while this is on; off, Animated Zoom is dimmed and zooming does not animate. ანიმირებული მასშტაბირება მუშაობს მხოლოდ მაშინ, როცა ეს ჩართულია; გამორთულისას ანიმირებული მასშტაბირება მკრთალია და მასშტაბირება არ ანიმირდება.
The wheel's zoom glides in, and the Zoom tool zooms as you drag sideways or hold it down; off, the Zoom tool zooms to the area you drag across. ბორბლით მასშტაბირება რბილად სრიალებს, მასშტაბის ხელსაწყო კი ადიდებს, როცა გვერდზე გადაათრევთ ან დაჭერილს გაჩერებთ; გამორთულისას ის ადიდებს არეს, რომელზეც გადაათრევთ.
From the next start, the desktop version draws with this kind of graphics processor; Automatic prefers the one that drives the display. The web version does not use it. შემდეგი გაშვებიდან დესკტოპის ვერსია ხატავს ამ ტიპის გრაფიკული პროცესორით; ავტომატური უპირატესობას ანიჭებს ეკრანის მმართველს. ვებ-ვერსია მას არ იყენებს.
From the next start, the window shows frames without waiting for the display to refresh, at most 240 a second; off, the display paces them. A present mode set at launch overrides it. შემდეგი გაშვებიდან ფანჯარა აჩვენებს კადრებს ეკრანის განახლების მოლოდინის გარეშე, წამში არაუმეტეს 240-ისა; გამორთულისას ტემპს ეკრანი განსაზღვრავს. უპირატესობა აქვს გაშვებისას დაყენებულ ჩვენების რეჟიმს.
The most undo steps each document keeps; lowering it drops the oldest steps when you click OK. Steps can also go sooner when they use too much memory. გაუქმების ნაბიჯების მაქსიმალური რაოდენობა თითო დოკუმენტში; მცირე რიცხვი OK-ზე დაწკაპუნებისას შლის უძველეს ნაბიჯებს. ნაბიჯები შეიძლება ადრეც წაიშალოს, თუ ბევრ მეხსიერებას იკავებს.
Shows the artwork changing while you drag; off, outlines follow the drag and the artwork changes when you release. A ruler guide always moves as you drag. აჩვენებს, როგორ იცვლება ნახატი გადათრევისას; გამორთულისას კონტურები მისდევს გადათრევას, ნახატი კი ხელის აშვებისას იცვლება. სახაზავის დამხმარე ხაზი გადათრევისას ყოველთვის მოძრაობს.
How many worker threads draw the artwork; -1 uses one fewer than the cores VectorCraft may use, at most 8, and 0 uses none. The web version always uses none. რამდენი სამუშაო ნაკადი ხატავს ნახატს; -1 იყენებს ერთით ნაკლებს VectorCraft-ისთვის ხელმისაწვდომ ბირთვებზე, მაქსიმუმ 8-ს, 0 კი არცერთს. ვებ-ვერსია არასდროს იყენებს.
@@ -6604,6 +6616,10 @@ font-technology Variable ცვლადი
VectorCraft stores this choice, but Copy and Cut do not use a legacy vector clipboard format yet. VectorCraft ამ არჩევანს ინახავს, მაგრამ კოპირება და ამოჭრა ძველი ვექტორული ბუფერის ფორმატს ჯერ არ იყენებს.
Preserve Paths or Preserve Appearance and Overprints for the legacy vector clipboard; VectorCraft stores the choice but does not use it yet. ტრაექტორიების შენარჩუნება ან იერსახისა და ზედდაბეჭდვების შენარჩუნება ძველი ვექტორული ბუფერისთვის; VectorCraft არჩევანს ინახავს, მაგრამ ჯერ არ იყენებს.
Keep Formatting keeps the styles of text copied from VectorCraft type when it is pasted into type; Keep Plain Text gives it the style where it lands. ფორმატირების შენარჩუნება VectorCraft-ის ტექსტური ობიექტიდან კოპირებული ტექსტის სტილებს ინახავს ტექსტურ ობიექტში ჩასმისას; მხოლოდ ტექსტის შენარჩუნება მას ჩასმის ადგილის სტილს აძლევს.
Display All Blacks as Rich Black shows pure CMYK black (black ink alone at 100%) as RGB black on the canvas; Display All Blacks Accurately converts it through the CMYK working space. ყველა შავის მდიდარ შავად ჩვენება სუფთა CMYK შავს (მხოლოდ შავი მელანი 100%-ზე) ტილოზე RGB შავად აჩვენებს; ყველა შავის ზუსტად ჩვენება მას სამუშაო CMYK სივრცით გარდაქმნის.
Output All Blacks as Rich Black draws pure CMYK black as RGB black in RGB and grayscale raster exports and Print as Bitmap; it does not change vector exports, CMYK JPEG, TIFF and PSD, or other printing. ყველა შავის მდიდარ შავად გამოტანა სუფთა CMYK შავს RGB შავად ხატავს RGB და ნაცრისფერი გრადაციების რასტრულ ექსპორტებში და ბიტმაპად ბეჭდვისას; ის არ ცვლის ვექტორულ ექსპორტებს, CMYK JPEG-ს, TIFF-სა და PSD-ს ან სხვა ბეჭდვას.
On a touch screen, switches to the Touch workspace; turning this off, or losing the touch screen, goes back to the workspace it switched from. სენსორულ ეკრანზე გადადის სენსორულ სამუშაო სივრცეზე; პარამეტრის გამორთვისას ან სენსორული ეკრანის დაკარგვისას ბრუნდება წინა სამუშაო სივრცეზე.
A two-finger tap on the canvas undoes, or switches between selection and drawing tools in the Touch workspace, and a three-finger tap redoes; neither works in Presentation Mode. ტილოზე ორი თითით შეხება აბრუნებს მოქმედებას, სენსორულ სამუშაო სივრცეში კი მონიშვნისა და ხატვის ხელსაწყოებს შორის გადართავს; სამი თითით შეხება ხელახლა ასრულებს. პრეზენტაციის რეჟიმში არცერთი არ მუშაობს.
New type takes this language while Document Setup's language is English: USA and [Normal Character Style] sets none; type already in a document keeps its own language. ახალი ტექსტი იღებს ამ ენას, სანამ დოკუმენტის პარამეტრების ენაა ინგლისური: აშშ და [ჩვეულებრივი სიმბოლოს სტილი] ენას არ ადგენს; დოკუმენტში უკვე არსებული ტექსტი ინარჩუნებს თავის ენას.
In paragraphs with Hyphenate on, a listed word breaks only at the hyphens typed in it, or nowhere when it has none, whatever its case; Korean words take no hyphen, and Indian-language words do not break inside a character cluster. გადატანის ჩართვისას სიის სიტყვა მხოლოდ აკრეფილ დეფისებთან გადაიტანება, ან არსად, თუ არ აქვს, რეგისტრის მიუხედავად; კორეულ სიტყვებს დეფისი არ ემატება, ინდური ენების სიტყვები კი სიმბოლოთა ჯგუფის შიგნით არ გადაიტანება.
Reset all preferences to their defaults? დავაბრუნოთ ყველა პარამეტრი ნაგულისხმევ მნიშვნელობებზე?
@@ -7168,6 +7184,7 @@ font-technology Variable ცვლადი
@msg no native format საკუთარი ფორმატი არ არის
@msg no pages გვერდები არ არის
@msg no pattern `{name}` პატერნი `{name}` არ არის
@msg art painted with `{name}` can't be its tile `{name}`-ით შეღებილი ნახატი მისი ფილა ვერ იქნება
@msg no perspective grid preset named `{name}` პერსპექტივის ბადის პრესეტი სახელით `{name}` არ არის
@msg no plug-in {0} is installed პლაგინი {0} დაინსტალირებული არ არის
@msg no plug-in {id} is installed პლაგინი {id} დაინსტალირებული არ არის
@@ -7870,6 +7887,7 @@ font-technology Variable ცვლადი
Arrow ისარი
Arrow (open) ისარი (ღია)
Barbed წვეტიანი
arrowhead Feather ბუმბული
Half Arrow (left) ნახევარი ისარი (მარცხენა)
Half Arrow (right) ნახევარი ისარი (მარჯვენა)
Concave ჩაზნექილი
@@ -7897,6 +7915,7 @@ font-technology Variable ცვლადი
Kite ფრანი
Triangle to Bar სამკუთხედიდან ზოლამდე
Oval ოვალი
Line Arrow ხაზოვანი ისარი
Complementary დამატებითი
Complementary 2 დამატებითი 2
Split Complementary გაყოფილი დამატებითი
@@ -10469,6 +10488,7 @@ breakText Glyphs გლიფები
Remove Strokes კონტურების მოხსნა
Place Brush Art ფუნჯის ნახატის განთავსება
Replace Brush Art ფუნჯის ნახატის ჩანაცვლება
Replace Pattern Art პატერნის ნახატის ჩანაცვლება
Strokes use this brush. Apply the new art to those strokes, or leave them as they are and add a copy of the brush with the new art? კონტურები იყენებს ამ ფუნჯს. გამოყენებულ იქნას ახალი ნახატი ამ კონტურებზე, თუ დარჩეს ისინი როგორც არის და დაემატოს ფუნჯის ასლი ახალი ნახატით?
Apply to Strokes კონტურებზე გამოყენება
Leave Strokes კონტურების დატოვება
@@ -11003,6 +11023,11 @@ font-script Japanese იაპონური
@msg A joint does not close by {gap} pt. შეერთება არ იხურება {gap} pt-ით.
@msg Two panels pass through each other. ორი პანელი ერთმანეთში გადის.
@msg composer must be "singleLine", "everyLine", "standardSingleLine" or "standardEveryLine" composer უნდა იყოს "singleLine", "everyLine", "standardSingleLine" ან "standardEveryLine"
Engraving გრავიურა
Fine Hatching წვრილი შტრიხები
Dense Hatching მჭიდრო შტრიხები
Tapered Hatching შევიწროებული შტრიხები
Broken Hatching წყვეტილი შტრიხები
Image Brush გამოსახულების ფუნჯები
Soft Bloom რბილი ყვავილი
Halftone Field ნახევარტონური ველი
Can't render this file because it is too large.
+54
View File
@@ -2105,6 +2105,10 @@ antiAlias Sharp 날카롭게
Add Color Tool 색상 추가 도구
Remove Color Tool 색상 제거 도구
Remove Color 색상 제거
Set As Base Color 기본 색상으로 설정
Select Shade 음영 선택
Add New Color 새 색상 추가
Set Current Color As Base Color 현재 색상을 기본 색상으로 설정
Find the selected colors in the artwork 선택한 색상을 아트웍에서 찾기
Height 높이
Height: 높이:
@@ -2976,6 +2980,11 @@ diagnostics ui UI
Preserve Alpha Transparency 알파 투명도 보존
Preserve Appearance and Overprints 모양 및 오버프린트 보존
Preserve CMYK Numbers CMYK 수치 보존
Preserve RGB Numbers RGB 수치 보존
Device to Simulate: 시뮬레이션할 장치:
Simulate Paper Color 용지 색상 시뮬레이션
Simulate Black Ink 검정 잉크 시뮬레이션
Load… 불러오기…
Preserve Editing Capabilities 편집 기능 보존
Preserve Lightness 명도 보존
Preserve Overprints and Spot Colors 오버프린트 및 별색 보존
@@ -3376,6 +3385,7 @@ mark-style Japanese 일본식
New type takes this language while Document Setup's language is English: USA; type already in a document keeps its own language. 문서 설정의 언어가 영어: 미국인 동안 새 텍스트는 이 언어를 받습니다. 문서에 이미 있는 텍스트는 자체 언어를 유지합니다.
In paragraphs with Hyphenate on, a listed word breaks only at the hyphens typed in it, or nowhere when it has none, whatever its language or case. 하이픈 넣기가 켜진 단락에서는 목록의 단어가 입력한 하이픈 위치에서만 나뉘며, 하이픈이 없으면 나뉘지 않습니다. 언어나 대소문자는 상관없습니다.
On the desktop, the .wasm plug-ins in this folder load at startup and when you click OK with a new folder here, except in Safe Mode; the web version does not load them. 데스크톱 버전에서는 이 폴더의 .wasm 플러그인이 시작할 때와 여기에 새 폴더를 지정하고 확인을 클릭할 때 로드됩니다(안전 모드 제외). 웹 버전은 로드하지 않습니다.
How many instructions each run of a plug-in object filter may use; Large allows more than Normal with the same 60-second limit. Heavy filters keep their own budget. 플러그인의 개체 필터를 한 번 실행할 때 쓸 수 있는 명령어 수입니다. 크게는 표준보다 많이 허용하며 60초 제한은 같습니다. 무거운 필터는 자체 예산을 유지합니다.
The first scratch disk choice: Startup, None or a folder path; VectorCraft stores it but does not use scratch disks yet. 첫 번째 스크래치 디스크 선택: Startup, None 또는 폴더 경로. VectorCraft는 이 값을 저장하지만 아직 스크래치 디스크를 사용하지 않습니다.
The second scratch disk choice: Startup, None or a folder path; VectorCraft stores it but does not use scratch disks yet. 두 번째 스크래치 디스크 선택: Startup, None 또는 폴더 경로. VectorCraft는 이 값을 저장하지만 아직 스크래치 디스크를 사용하지 않습니다.
How light or dark the interface is. 인터페이스를 얼마나 밝게 또는 어둡게 표시할지입니다.
@@ -3394,6 +3404,7 @@ mark-style Japanese 일본식
Animated Zoom works only while this is on; off, Animated Zoom is dimmed and zooming does not animate. 애니메이션 확대/축소는 이 옵션이 켜져 있을 때만 작동합니다. 끄면 애니메이션 확대/축소가 흐리게 표시되고 확대/축소에 애니메이션이 없습니다.
The wheel's zoom glides in, and the Zoom tool zooms as you drag sideways or hold it down; off, the Zoom tool zooms to the area you drag across. 휠로 확대/축소하면 부드럽게 움직이고, 확대/축소 도구는 옆으로 드래그하거나 누르고 있으면 확대/축소합니다. 끄면 확대/축소 도구는 드래그한 영역으로 확대합니다.
From the next start, the desktop version draws with this kind of graphics processor; Automatic prefers the one that drives the display. The web version does not use it. 다음 시작부터 데스크톱 버전은 이 종류의 그래픽 프로세서로 그립니다. 자동은 디스플레이를 구동하는 프로세서를 우선합니다. 웹 버전은 사용하지 않습니다.
From the next start, the window shows frames without waiting for the display to refresh, at most 240 a second; off, the display paces them. A present mode set at launch overrides it. 다음 시작부터 창은 디스플레이 새로 고침을 기다리지 않고 프레임을 표시하며, 초당 최대 240프레임입니다. 끄면 디스플레이가 프레임 속도를 정합니다. 시작할 때 지정한 표시 모드가 우선합니다.
The most undo steps each document keeps; lowering it drops the oldest steps when you click OK. Steps can also go sooner when they use too much memory. 각 문서가 보관하는 실행 취소 단계의 최대 수입니다. 낮추면 확인을 클릭할 때 가장 오래된 단계가 삭제됩니다. 메모리를 너무 많이 쓰면 단계가 더 일찍 삭제될 수도 있습니다.
Shows the artwork changing while you drag; off, outlines follow the drag and the artwork changes when you release. A ruler guide always moves as you drag. 드래그하는 동안 아트가 바뀌는 모습을 보여 줍니다. 끄면 윤곽선이 드래그를 따라가고 놓을 때 아트가 바뀝니다. 눈금자 안내선은 드래그하는 동안 항상 움직입니다.
How many worker threads draw the artwork; -1 uses one fewer than the cores VectorCraft may use, at most 8, and 0 uses none. The web version always uses none. 아트를 그리는 작업자 스레드 수입니다. -1은 VectorCraft가 쓸 수 있는 코어보다 하나 적게(최대 8개) 쓰고, 0은 하나도 쓰지 않습니다. 웹 버전은 항상 쓰지 않습니다.
@@ -3420,6 +3431,10 @@ mark-style Japanese 일본식
VectorCraft stores this choice, but Copy and Cut do not use a legacy vector clipboard format yet. VectorCraft는 이 선택을 저장하지만 복사와 잘라내기는 아직 레거시 벡터 클립보드 형식을 사용하지 않습니다.
Preserve Paths or Preserve Appearance and Overprints for the legacy vector clipboard; VectorCraft stores the choice but does not use it yet. 레거시 벡터 클립보드의 패스 보존 또는 모양 및 오버프린트 보존입니다. VectorCraft는 선택을 저장하지만 아직 사용하지 않습니다.
Keep Formatting keeps the styles of text copied from VectorCraft type when it is pasted into type; Keep Plain Text gives it the style where it lands. 서식 유지는 VectorCraft 텍스트 개체에서 복사한 텍스트를 텍스트 개체에 붙여넣을 때 스타일을 유지하고, 일반 텍스트 유지는 붙여넣은 위치의 스타일을 적용합니다.
Display All Blacks as Rich Black shows pure CMYK black (black ink alone at 100%) as RGB black on the canvas; Display All Blacks Accurately converts it through the CMYK working space. 모든 검정을 리치 블랙으로 표시는 순수 CMYK 검정(검정 잉크만 100%)을 캔버스에서 RGB 검정으로 표시하고, 모든 검정 정확히 표시는 작업용 CMYK 공간을 통해 변환합니다.
Output All Blacks as Rich Black draws pure CMYK black as RGB black in RGB and grayscale raster exports and Print as Bitmap; it does not change vector exports, CMYK JPEG, TIFF and PSD, or other printing. 모든 검정을 리치 블랙으로 출력은 RGB 및 그레이스케일 래스터 내보내기와 비트맵으로 인쇄에서 순수 CMYK 검정을 RGB 검정으로 그리며, 벡터 내보내기, CMYK JPEG, TIFF 및 PSD, 기타 인쇄는 바꾸지 않습니다.
On a touch screen, switches to the Touch workspace; turning this off, or losing the touch screen, goes back to the workspace it switched from. 터치 스크린에서는 터치 작업 영역으로 전환합니다. 이 설정을 끄거나 터치 스크린이 사라지면 전환하기 전의 작업 영역으로 돌아갑니다.
A two-finger tap on the canvas undoes, or switches between selection and drawing tools in the Touch workspace, and a three-finger tap redoes; neither works in Presentation Mode. 캔버스를 두 손가락으로 탭하면 실행 취소하거나 터치 작업 영역에서 선택 도구와 그리기 도구를 전환하고, 세 손가락으로 탭하면 다시 실행합니다. 프레젠테이션 모드에서는 둘 다 작동하지 않습니다.
New type takes this language while Document Setup's language is English: USA and [Normal Character Style] sets none; type already in a document keeps its own language. 문서 설정의 언어가 영어: 미국이고 [기본 문자 스타일]이 언어를 지정하지 않는 동안 새 텍스트는 이 언어를 받습니다. 문서에 이미 있는 텍스트는 자체 언어를 유지합니다.
In paragraphs with Hyphenate on, a listed word breaks only at the hyphens typed in it, or nowhere when it has none, whatever its case; Korean words take no hyphen, and Indian-language words do not break inside a character cluster. 하이픈 넣기가 켜진 단락에서는 목록의 단어가 입력한 하이픈 위치에서만 나뉘며, 하이픈이 없으면 나뉘지 않습니다. 대소문자는 상관없습니다. 한국어 단어에는 하이픈이 붙지 않으며, 인도 언어의 단어는 문자 묶음 안에서 나뉘지 않습니다.
Reset all preferences to their defaults? 모든 환경 설정을 기본값으로 재설정하시겠습니까?
@@ -3567,6 +3582,7 @@ mark-style Japanese 일본식
@plural {shown} of {n} result. Keep typing to narrow them.|{shown} of {n} results. Keep typing to narrow them. 결과 {n}개 중 {shown}개. 계속 입력하여 범위를 좁히세요.
Recent Commands 최근 명령
No recent commands 최근 명령 없음
Type to search commands, tools, panels and effects 입력하여 명령, 도구, 패널 및 효과 검색
Search commands 명령 검색
Secondary 보조
Select All Art on Layer 레이어의 모든 아트웍 선택
@@ -5122,6 +5138,7 @@ variable-list-end {0}, {1} {0} 및 {1}
@msg {label} produced an empty result: a line or other open path encloses no area; to include it, apply Object › Path › Outline Stroke to it first {label}의 결과가 비어 있습니다. 선이나 기타 열린 패스가 영역을 둘러싸지 않습니다. 포함하려면 먼저 개체 › 패스 › 선 윤곽선화를 적용하세요
@msg already editing a pattern 이미 패턴을 편집 중입니다
@msg no pattern `{name}` `{name}` 패턴이 없습니다
@msg art painted with `{name}` can't be its tile `{name}` 패턴으로 칠한 아트웍은 그 타일이 될 수 없습니다
@msg not in pattern editing mode 패턴 편집 모드가 아닙니다
@msg finish editing the pattern first 먼저 패턴 편집을 마치세요
@msg pattern missing 패턴이 없습니다
@@ -7610,6 +7627,37 @@ anchor Points: 포인트:
@msg `{id}` is not a colour adjustment `{id}`은(는) 색상 조정이 아닙니다
@msg missing `effect` `effect`이 없습니다
@msg `params` must be an object `params`는 개체여야 합니다
# Stroke arrowheads (Stroke panel, Dimension Tool Options and Properties › Arrow Style).
Triangle (open) 삼각형 (윤곽)
Circle (open) 원 (윤곽)
Square (open) 사각 (윤곽)
Arrow (open) 화살표 (윤곽)
Barbed 미늘
arrowhead Feather 깃털
arrowhead Target 과녁
Half Arrow (left) 반쪽 화살표 (왼쪽)
Half Arrow (right) 반쪽 화살표 (오른쪽)
Double Bar 이중 막대
Dot on Bar 막대 위 점
Chevron 갈매기형
Plus 더하기
Hexagon (open) 육각형 (윤곽)
Tag 태그
Tag (open) 태그 (윤곽)
Half Circle 반원
Drop 물방울
Slash 슬래시
Double Slash 이중 슬래시
Diamond (open) 다이아몬드 (윤곽)
Reverse Triangle 역삼각형
Swallowtail 제비 꼬리
Bracket 대괄호
Fork 포크
Leaf 잎
Kite 연
Triangle to Bar 삼각형에서 막대
Oval 타원
Line Arrow 선 화살표
# Path Precision Tools add-on (Object › Plug-ins › Path Precision Tools): its tools, Anchor Inspector panel, commands and messages.
Path Precision Tools 패스 정밀 도구
Anchor Eraser Brush 앵커 포인트 지우개 브러시
@@ -7900,6 +7948,7 @@ breakText Glyphs 글리프
Remove Strokes 선 제거
Place Brush Art 브러시 아트 배치
Replace Brush Art 브러시 아트 바꾸기
Replace Pattern Art 패턴 아트 바꾸기
Strokes use this brush. Apply the new art to those strokes, or leave them as they are and add a copy of the brush with the new art? 선에서 이 브러시를 사용합니다. 새 아트를 해당 선에 적용하시겠습니까, 아니면 선을 그대로 두고 새 아트로 브러시 사본을 추가하시겠습니까?
Apply to Strokes 선에 적용
Leave Strokes 선 유지
@@ -10326,6 +10375,11 @@ breakText Glyphs 글리프
@msg A panel is not joined to the rest by a crease. 패널이 어떤 오시선으로도 나머지와 연결되어 있지 않습니다.
@msg A fold line is on a non-printing layer. 접는 선이 인쇄되지 않는 레이어에 있습니다.
@msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} 패널: {panels}, 힌지: {hinges}, 오류: {errors}, 경고: {warnings}
Engraving 판화
Fine Hatching 가는 해칭
Dense Hatching 촘촘한 해칭
Tapered Hatching 가늘어지는 해칭
Broken Hatching 끊긴 해칭
Image Brush 이미지 브러시
Soft Bloom 부드러운 꽃
Halftone Field 하프톤 필드
Can't render this file because it is too large.
+25
View File
@@ -3503,6 +3503,11 @@ digits Malayalam Malayalam
Place the pages with the placement again Plaats de pagina's opnieuw met de plaatsing
Placement: Plaatsing:
Preserve CMYK Numbers CMYK-waarden behouden
Preserve RGB Numbers RGB-waarden behouden
Device to Simulate: Te simuleren apparaat:
Simulate Paper Color Papierkleur simuleren
Simulate Black Ink Zwarte inkt simuleren
Load… Laden…
Previous page Vorige pagina
Print Layers: Lagen afdrukken:
Print Preset: Afdrukvoorinstelling:
@@ -3580,6 +3585,10 @@ digits Malayalam Malayalam
Add Color Tool Gereedschap Kleur toevoegen
Remove Color Tool Gereedschap Kleur verwijderen
Remove Color Kleur verwijderen
Set As Base Color Instellen als basiskleur
Select Shade Schakering selecteren
Add New Color Nieuwe kleur toevoegen
Set Current Color As Base Color Huidige kleur instellen als basiskleur
Find the selected colors in the artwork De geselecteerde kleuren zoeken in de artwork
Harmony Rules Harmonieregels
Keep this row's colors (exclude) De kleuren van deze rij behouden (uitsluiten)
@@ -5050,6 +5059,7 @@ font-technology Variable Variabel
@plural {shown} of {n} result. Keep typing to narrow them.|{shown} of {n} results. Keep typing to narrow them. {shown} van {n} resultaat. Typ verder om ze te beperken.|{shown} van {n} resultaten. Typ verder om ze te beperken.
Recent Commands Recente opdrachten
No recent commands Geen recente opdrachten
Type to search commands, tools, panels and effects Typ om opdrachten, gereedschappen, panelen en effecten te zoeken
Dashed Line Streepjeslijn
Panel menu Paneelmenu
Unembed… Insluiten ongedaan maken…
@@ -5172,6 +5182,7 @@ font-technology Variable Variabel
New type takes this language while Document Setup's language is English: USA; type already in a document keeps its own language. Nieuwe tekst krijgt deze taal zolang de taal in Documentinstellingen Engels: VS is; tekst die al in een document staat, behoudt zijn eigen taal.
In paragraphs with Hyphenate on, a listed word breaks only at the hyphens typed in it, or nowhere when it has none, whatever its language or case. In alinea's met Afbreken aan wordt een opgesomd woord alleen afgebroken bij de koppeltekens die erin getypt zijn, of nergens als het er geen heeft, ongeacht taal of hoofdletters.
On the desktop, the .wasm plug-ins in this folder load at startup and when you click OK with a new folder here, except in Safe Mode; the web version does not load them. In de desktopversie worden de .wasm-plug-ins in deze map geladen bij het starten en wanneer u hier met een nieuwe map op OK klikt, behalve in de veilige modus; de webversie laadt ze niet.
How many instructions each run of a plug-in object filter may use; Large allows more than Normal with the same 60-second limit. Heavy filters keep their own budget. Hoeveel instructies elke uitvoering van een objectfilter uit een plug-in mag gebruiken; Groot staat er meer toe dan Normaal, met dezelfde limiet van 60 seconden. Zware filters houden hun eigen budget.
The first scratch disk choice: Startup, None or a folder path; VectorCraft stores it but does not use scratch disks yet. De eerste keuze voor de scratchschijf: Startup, None of een mappad; VectorCraft slaat deze op, maar gebruikt nog geen scratchschijven.
The second scratch disk choice: Startup, None or a folder path; VectorCraft stores it but does not use scratch disks yet. De tweede keuze voor de scratchschijf: Startup, None of een mappad; VectorCraft slaat deze op, maar gebruikt nog geen scratchschijven.
How light or dark the interface is. Hoe licht of donker de gebruikersinterface is.
@@ -5190,6 +5201,7 @@ font-technology Variable Variabel
Animated Zoom works only while this is on; off, Animated Zoom is dimmed and zooming does not animate. Geanimeerd zoomen werkt alleen zolang dit aan staat; uit is Geanimeerd zoomen gedimd en wordt zoomen niet geanimeerd.
The wheel's zoom glides in, and the Zoom tool zooms as you drag sideways or hold it down; off, the Zoom tool zooms to the area you drag across. Zoomen met het wieltje glijdt soepel, en het Zoom-gereedschap zoomt terwijl u opzij sleept of het ingedrukt houdt; uit zoomt het Zoom-gereedschap in op het gebied waarover u sleept.
From the next start, the desktop version draws with this kind of graphics processor; Automatic prefers the one that drives the display. The web version does not use it. Vanaf de volgende start tekent de desktopversie met dit soort grafische processor; Automatisch kiest bij voorkeur de processor die het beeldscherm aanstuurt. De webversie gebruikt het niet.
From the next start, the window shows frames without waiting for the display to refresh, at most 240 a second; off, the display paces them. A present mode set at launch overrides it. Vanaf de volgende start toont het venster beelden zonder op de verversing van het beeldscherm te wachten, hoogstens 240 per seconde; uit bepaalt het beeldscherm het tempo. Een presentatiemodus die bij het starten is ingesteld, gaat voor.
The most undo steps each document keeps; lowering it drops the oldest steps when you click OK. Steps can also go sooner when they use too much memory. Het grootste aantal ongedaanmaakstappen dat elk document bewaart; een lager getal verwijdert de oudste stappen wanneer u op OK klikt. Stappen kunnen ook eerder verdwijnen als ze te veel geheugen gebruiken.
Shows the artwork changing while you drag; off, outlines follow the drag and the artwork changes when you release. A ruler guide always moves as you drag. Toont tijdens het slepen hoe de illustratie verandert; uit volgen contouren het slepen en verandert de illustratie wanneer u loslaat. Een hulplijn van de liniaal beweegt altijd mee tijdens het slepen.
How many worker threads draw the artwork; -1 uses one fewer than the cores VectorCraft may use, at most 8, and 0 uses none. The web version always uses none. Hoeveel werkthreads de illustratie tekenen; -1 gebruikt er één minder dan de kernen die VectorCraft mag gebruiken, hoogstens 8, en 0 geen. De webversie gebruikt er nooit een.
@@ -5216,6 +5228,10 @@ font-technology Variable Variabel
VectorCraft stores this choice, but Copy and Cut do not use a legacy vector clipboard format yet. VectorCraft slaat deze keuze op, maar Kopiëren en Knippen gebruiken nog geen indeling van het verouderde vectorklembord.
Preserve Paths or Preserve Appearance and Overprints for the legacy vector clipboard; VectorCraft stores the choice but does not use it yet. Paden behouden of Vormgeving en overprint behouden voor het verouderde vectorklembord; VectorCraft slaat de keuze op, maar gebruikt die nog niet.
Keep Formatting keeps the styles of text copied from VectorCraft type when it is pasted into type; Keep Plain Text gives it the style where it lands. Opmaak behouden behoudt de stijlen van tekst uit een tekstobject in VectorCraft wanneer die in een tekstobject wordt geplakt; Platte tekst behouden geeft die de stijl van de plek waar hij terechtkomt.
Display All Blacks as Rich Black shows pure CMYK black (black ink alone at 100%) as RGB black on the canvas; Display All Blacks Accurately converts it through the CMYK working space. Alle zwarttinten weergeven als rijk zwart toont zuiver CMYK-zwart (alleen zwarte inkt op 100%) op het canvas als RGB-zwart; Alle zwarttinten nauwkeurig weergeven zet het om via de werk-CMYK-kleurruimte.
Output All Blacks as Rich Black draws pure CMYK black as RGB black in RGB and grayscale raster exports and Print as Bitmap; it does not change vector exports, CMYK JPEG, TIFF and PSD, or other printing. Alle zwarttinten uitvoeren als rijk zwart tekent zuiver CMYK-zwart als RGB-zwart in RGB- en grijswaarden-rasterexports en met Afdrukken als bitmap; het verandert niets aan vectorexports, CMYK-JPEG, -TIFF en -PSD of ander afdrukken.
On a touch screen, switches to the Touch workspace; turning this off, or losing the touch screen, goes back to the workspace it switched from. Op een aanraakscherm wordt naar de Touch-werkruimte gewisseld; uitschakelen of het wegvallen van het aanraakscherm zet de werkruimte van daarvoor terug.
A two-finger tap on the canvas undoes, or switches between selection and drawing tools in the Touch workspace, and a three-finger tap redoes; neither works in Presentation Mode. Tikken met twee vingers op het canvas maakt ongedaan of wisselt in de Touch-werkruimte tussen selectie- en tekengereedschap, en tikken met drie vingers voert opnieuw uit; geen van beide werkt in de presentatiemodus.
New type takes this language while Document Setup's language is English: USA and [Normal Character Style] sets none; type already in a document keeps its own language. Nieuwe tekst krijgt deze taal zolang de taal in Documentinstellingen Engels: VS is en [Normale tekenstijl] geen taal instelt; tekst die al in een document staat, behoudt zijn eigen taal.
In paragraphs with Hyphenate on, a listed word breaks only at the hyphens typed in it, or nowhere when it has none, whatever its case; Korean words take no hyphen, and Indian-language words do not break inside a character cluster. In alinea's met Afbreken aan wordt een opgesomd woord alleen afgebroken bij de koppeltekens die erin getypt zijn, of nergens als het er geen heeft, ongeacht hoofdletters; Koreaanse woorden krijgen geen afbreekstreepje, en woorden in Indiase talen worden niet binnen een tekengroep afgebroken.
Reset all preferences to their defaults? Alle voorkeuren terugzetten naar de standaardwaarden?
@@ -5783,6 +5799,7 @@ imageTrace Outline Contour
@msg no native format geen eigen indeling
@msg no pages geen pagina's
@msg no pattern `{name}` geen patroon `{name}`
@msg art painted with `{name}` can't be its tile illustratie die met `{name}` is geverfd, kan niet de tegel ervan zijn
@msg no perspective grid preset named `{name}` geen perspectiefrastervoorinstelling met de naam `{name}`
@msg no plug-in {0} is installed er is geen plug-in {0} geïnstalleerd
@msg no plug-in {id} is installed er is geen plug-in {id} geïnstalleerd
@@ -8289,6 +8306,7 @@ imageTrace Outline Contour
Arrow Pijl
Arrow (open) Pijl (open)
Barbed Weerhaak
arrowhead Feather Veer
Half Arrow (left) Halve pijl (links)
Half Arrow (right) Halve pijl (rechts)
Concave Concaaf
@@ -8316,6 +8334,7 @@ imageTrace Outline Contour
Kite Vlieger
Triangle to Bar Driehoek naar balk
Oval Ovaal
Line Arrow Lijnpijl
Complementary Complementair
Complementary 2 Complementair 2
Split Complementary Gesplitst complementair
@@ -10189,6 +10208,7 @@ breakText Glyphs Glyphs
Remove Strokes Contouren verwijderen
Place Brush Art Penseelillustratie plaatsen
Replace Brush Art Penseelillustratie vervangen
Replace Pattern Art Patroonillustratie vervangen
Strokes use this brush. Apply the new art to those strokes, or leave them as they are and add a copy of the brush with the new art? Contouren gebruiken dit penseel. De nieuwe illustratie op deze contouren toepassen, of ze laten zoals ze zijn en een kopie van het penseel met de nieuwe illustratie toevoegen?
Apply to Strokes Op contouren toepassen
Leave Strokes Contouren behouden
@@ -10756,6 +10776,11 @@ breakText Glyphs Glyphs
@msg A panel is not joined to the rest by a crease. Een paneel is door geen rillijn met de rest verbonden.
@msg A fold line is on a non-printing layer. Een vouwlijn staat op een laag die niet wordt afgedrukt.
@msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} Panelen: {panels}, scharnieren: {hinges}, fouten: {errors}, waarschuwingen: {warnings}
Engraving Gravure
Fine Hatching Fijne arcering
Dense Hatching Dichte arcering
Tapered Hatching Taps toelopende arcering
Broken Hatching Onderbroken arcering
Image Brush Afbeeldingspenselen
Soft Bloom Zachte bloei
Halftone Field Halftoonveld
Can't render this file because it is too large.
+25
View File
@@ -3021,6 +3021,11 @@ digits Malayalam Malajalam
Place the pages with the placement again Ponownie rozmieść strony według położenia
Placement: Położenie:
Preserve CMYK Numbers Zachowaj wartości CMYK
Preserve RGB Numbers Zachowaj wartości RGB
Device to Simulate: Symulowane urządzenie:
Simulate Paper Color Symuluj kolor papieru
Simulate Black Ink Symuluj czarną farbę
Load… Wczytaj…
Previous page Poprzednia strona
Print Layers: Drukuj warstwy:
Print Preset: Ustawienie drukowania:
@@ -3095,6 +3100,10 @@ digits Malayalam Malajalam
Add Color Tool Narzędzie Dodaj kolor
Remove Color Tool Narzędzie Usuń kolor
Remove Color Usuń kolor
Set As Base Color Ustaw jako kolor bazowy
Select Shade Wybierz odcień
Add New Color Dodaj nowy kolor
Set Current Color As Base Color Ustaw bieżący kolor jako bazowy
Find the selected colors in the artwork Znajdź zaznaczone kolory w kompozycji
Keep this row's colors (exclude) Zachowaj kolory tego wiersza (wyklucz)
Limit to Library: Ogranicz do biblioteki:
@@ -4579,6 +4588,7 @@ font-technology Variable Zmienne
@plural {shown} of {n} result. Keep typing to narrow them.|{shown} of {n} results. Keep typing to narrow them. {shown} z {n} wyniku. Pisz dalej, aby je zawęzić.|{shown} z {n} wyników. Pisz dalej, aby je zawęzić.|{shown} z {n} wyników. Pisz dalej, aby je zawęzić.
Recent Commands Ostatnie polecenia
No recent commands Brak ostatnich poleceń
Type to search commands, tools, panels and effects Pisz, aby szukać poleceń, narzędzi, paneli i efektów
Dashed Line Linia przerywana
Panel menu Menu panelu
Unembed… Wyodrębnij…
@@ -4701,6 +4711,7 @@ font-technology Variable Zmienne
New type takes this language while Document Setup's language is English: USA; type already in a document keeps its own language. Nowy tekst otrzymuje ten język, dopóki językiem w Ustawieniach dokumentu jest Angielski: USA; tekst, który już jest w dokumencie, zachowuje swój język.
In paragraphs with Hyphenate on, a listed word breaks only at the hyphens typed in it, or nowhere when it has none, whatever its language or case. W akapitach z włączoną opcją Dziel wyrazy wyraz z listy jest dzielony tylko w miejscach wpisanych w nim łączników albo wcale, jeśli ich nie ma, bez względu na język i wielkość liter.
On the desktop, the .wasm plug-ins in this folder load at startup and when you click OK with a new folder here, except in Safe Mode; the web version does not load them. W wersji na komputer wtyczki .wasm z tego folderu są wczytywane przy uruchomieniu i po kliknięciu OK z nowym folderem tutaj, z wyjątkiem trybu awaryjnego; wersja internetowa ich nie wczytuje.
How many instructions each run of a plug-in object filter may use; Large allows more than Normal with the same 60-second limit. Heavy filters keep their own budget. Ile instrukcji może zużyć każde uruchomienie filtra obiektów z wtyczki; Duże pozwala na więcej niż Normalny przy tym samym limicie 60 sekund. Ciężkie filtry zachowują własny budżet.
The first scratch disk choice: Startup, None or a folder path; VectorCraft stores it but does not use scratch disks yet. Pierwszy wybór dysku roboczego: Startup, None lub ścieżka folderu; VectorCraft go zapisuje, ale jeszcze nie używa dysków roboczych.
The second scratch disk choice: Startup, None or a folder path; VectorCraft stores it but does not use scratch disks yet. Drugi wybór dysku roboczego: Startup, None lub ścieżka folderu; VectorCraft go zapisuje, ale jeszcze nie używa dysków roboczych.
How light or dark the interface is. Jak jasny lub ciemny jest interfejs.
@@ -4719,6 +4730,7 @@ font-technology Variable Zmienne
Animated Zoom works only while this is on; off, Animated Zoom is dimmed and zooming does not animate. Animowane powiększanie działa tylko wtedy, gdy to jest włączone; po wyłączeniu Animowane powiększanie jest wyszarzone, a powiększanie nie jest animowane.
The wheel's zoom glides in, and the Zoom tool zooms as you drag sideways or hold it down; off, the Zoom tool zooms to the area you drag across. Powiększanie kółkiem przebiega płynnie, a Narzędzie Lupka powiększa, gdy przeciągasz w bok lub je przytrzymujesz; po wyłączeniu Narzędzie Lupka powiększa obszar, przez który przeciągniesz.
From the next start, the desktop version draws with this kind of graphics processor; Automatic prefers the one that drives the display. The web version does not use it. Od następnego uruchomienia wersja na komputer rysuje tym rodzajem procesora graficznego; Automatycznie wybiera najpierw ten, który obsługuje ekran. Wersja internetowa go nie używa.
From the next start, the window shows frames without waiting for the display to refresh, at most 240 a second; off, the display paces them. A present mode set at launch overrides it. Od następnego uruchomienia okno pokazuje klatki bez czekania na odświeżenie ekranu, najwyżej 240 na sekundę; po wyłączeniu tempo wyznacza ekran. Tryb prezentacji ustawiony przy uruchomieniu ma pierwszeństwo.
The most undo steps each document keeps; lowering it drops the oldest steps when you click OK. Steps can also go sooner when they use too much memory. Największa liczba kroków cofania, które zachowuje każdy dokument; mniejsza liczba usuwa najstarsze kroki po kliknięciu OK. Kroki mogą też zniknąć wcześniej, gdy zajmują zbyt dużo pamięci.
Shows the artwork changing while you drag; off, outlines follow the drag and the artwork changes when you release. A ruler guide always moves as you drag. Pokazuje zmiany kompozycji podczas przeciągania; po wyłączeniu kontury podążają za przeciąganiem, a kompozycja zmienia się po puszczeniu. Linia pomocnicza z linijki zawsze porusza się podczas przeciągania.
How many worker threads draw the artwork; -1 uses one fewer than the cores VectorCraft may use, at most 8, and 0 uses none. The web version always uses none. Ile wątków roboczych rysuje kompozycję; -1 używa o jeden mniej niż rdzeni, których VectorCraft może używać, najwyżej 8, a 0 żadnego. Wersja internetowa nigdy żadnego nie używa.
@@ -4745,6 +4757,10 @@ font-technology Variable Zmienne
VectorCraft stores this choice, but Copy and Cut do not use a legacy vector clipboard format yet. VectorCraft zapisuje ten wybór, ale Kopiuj i Wytnij nie używają jeszcze formatu starszego schowka wektorowego.
Preserve Paths or Preserve Appearance and Overprints for the legacy vector clipboard; VectorCraft stores the choice but does not use it yet. Zachowaj ścieżki lub Zachowaj wygląd i nadruki dla starszego schowka wektorowego; VectorCraft zapisuje wybór, ale jeszcze go nie używa.
Keep Formatting keeps the styles of text copied from VectorCraft type when it is pasted into type; Keep Plain Text gives it the style where it lands. Zachowaj formatowanie zachowuje style tekstu skopiowanego z obiektu tekstowego VectorCraft po wklejeniu do obiektu tekstowego; Zachowaj zwykły tekst nadaje mu styl miejsca, w które trafia.
Display All Blacks as Rich Black shows pure CMYK black (black ink alone at 100%) as RGB black on the canvas; Display All Blacks Accurately converts it through the CMYK working space. Wyświetlaj wszystkie czernie jako czerń głęboką pokazuje czystą czerń CMYK (sam czarny atrament w 100%) na obszarze roboczym jako czerń RGB; Wyświetlaj wszystkie czernie dokładnie przekształca ją przez roboczą przestrzeń CMYK.
Output All Blacks as Rich Black draws pure CMYK black as RGB black in RGB and grayscale raster exports and Print as Bitmap; it does not change vector exports, CMYK JPEG, TIFF and PSD, or other printing. Wyprowadzaj wszystkie czernie jako czerń głęboką rysuje czystą czerń CMYK jako czerń RGB w rastrowych eksportach RGB i w skali szarości oraz przy Drukuj jako bitmapę; nie zmienia eksportów wektorowych, plików JPEG, TIFF i PSD CMYK ani innego drukowania.
On a touch screen, switches to the Touch workspace; turning this off, or losing the touch screen, goes back to the workspace it switched from. Na ekranie dotykowym przełącza na dotykowy obszar roboczy; wyłączenie opcji lub utrata ekranu dotykowego przywraca obszar roboczy sprzed przełączenia.
A two-finger tap on the canvas undoes, or switches between selection and drawing tools in the Touch workspace, and a three-finger tap redoes; neither works in Presentation Mode. Stuknięcie dwoma palcami w obszar roboczy cofa, a w dotykowym obszarze roboczym przełącza między narzędziami zaznaczania i rysowania; stuknięcie trzema palcami ponawia. Żadne nie działa w trybie prezentacji.
New type takes this language while Document Setup's language is English: USA and [Normal Character Style] sets none; type already in a document keeps its own language. Nowy tekst otrzymuje ten język, dopóki językiem w Ustawieniach dokumentu jest Angielski: USA, a [Normalny styl znakowy] nie ustawia języka; tekst, który już jest w dokumencie, zachowuje swój język.
In paragraphs with Hyphenate on, a listed word breaks only at the hyphens typed in it, or nowhere when it has none, whatever its case; Korean words take no hyphen, and Indian-language words do not break inside a character cluster. W akapitach z włączoną opcją Dziel wyrazy wyraz z listy jest dzielony tylko w miejscach wpisanych w nim łączników albo wcale, jeśli ich nie ma, bez względu na wielkość liter; wyrazy koreańskie nie dostają łącznika, a wyrazy w językach indyjskich nie są dzielone wewnątrz grupy znaków.
Reset all preferences to their defaults? Przywrócić domyślne wartości wszystkich preferencji?
@@ -5530,6 +5546,7 @@ liquify-list-end {0}, {1} {0} i {1}
@msg no native format brak formatu natywnego
@msg no pages brak stron
@msg no pattern `{name}` brak wzorka `{name}`
@msg art painted with `{name}` can't be its tile kompozycja malowana wzorkiem `{name}` nie może być jego kafelkiem
@msg no perspective grid preset named `{name}` brak ustawienia siatki perspektywy o nazwie `{name}`
@msg no plug-in {0} is installed wtyczka {0} nie jest zainstalowana
@msg no plug-in {id} is installed wtyczka {id} nie jest zainstalowana
@@ -6352,6 +6369,7 @@ variable-list-end {0}, {1} {0} i {1}
Arrow Strzałka
Arrow (open) Strzałka (otwarta)
Barbed Zadziorowata
arrowhead Feather Pióro
Half Arrow (left) Pół strzałki (lewa)
Half Arrow (right) Pół strzałki (prawa)
Concave Wklęsła
@@ -6379,6 +6397,7 @@ variable-list-end {0}, {1} {0} i {1}
Kite Latawiec
Triangle to Bar Trójkąt z kreską
Oval Owal
Line Arrow Strzałka liniowa
Complementary Dopełniające
Complementary 2 Dopełniające 2
Split Complementary Rozdzielone dopełniające
@@ -8152,6 +8171,7 @@ breakText Glyphs Glify
Remove Strokes Usuń obrysy
Place Brush Art Umieść kompozycję pędzla
Replace Brush Art Zastąp kompozycję pędzla
Replace Pattern Art Zastąp kompozycję wzorka
Strokes use this brush. Apply the new art to those strokes, or leave them as they are and add a copy of the brush with the new art? Obrysy używają tego pędzla. Zastosować nową kompozycję do tych obrysów, czy pozostawić je bez zmian i dodać kopię pędzla z nową kompozycją?
Apply to Strokes Zastosuj do obrysów
Leave Strokes Pozostaw obrysy
@@ -10580,6 +10600,11 @@ breakText Glyphs Glify
@msg A panel is not joined to the rest by a crease. Panel nie jest połączony z resztą żadną linią bigowania.
@msg A fold line is on a non-printing layer. Linia zgięcia znajduje się na warstwie niedrukowanej.
@msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} Panele: {panels}, zawiasy: {hinges}, błędy: {errors}, ostrzeżenia: {warnings}
Engraving Grawerowanie
Fine Hatching Drobne kreskowanie
Dense Hatching Gęste kreskowanie
Tapered Hatching Zwężane kreskowanie
Broken Hatching Przerywane kreskowanie
Image Brush Pędzle obrazkowe
Soft Bloom Miękki kwiat
Halftone Field Pole półtonów
Can't render this file because it is too large.
+25
View File
@@ -1481,6 +1481,10 @@ antiAlias Sharp Nítido
Add Color Tool Ferramenta Adicionar cor
Remove Color Tool Ferramenta Remover cor
Remove Color Remover cor
Set As Base Color Definir como cor base
Select Shade Selecionar tonalidade
Add New Color Adicionar nova cor
Set Current Color As Base Color Definir cor atual como cor base
Find the selected colors in the artwork Localizar as cores selecionadas na arte
Harmony Sets Conjuntos de Harmonia
Height Altura
@@ -2369,6 +2373,11 @@ antiAlias Sharp Nítido
Preserve Alpha Transparency Preservar Transparência Alfa
Preserve Appearance and Overprints Preservar Aparência e Sobreimpressões
Preserve CMYK Numbers Preservar Números CMYK
Preserve RGB Numbers Preservar Números RGB
Device to Simulate: Dispositivo a Simular:
Simulate Paper Color Simular Cor do Papel
Simulate Black Ink Simular Tinta Preta
Load… Carregar…
Preserve Editing Capabilities Preservar Capacidades de Edição
Preserve Lightness Preservar Luminosidade
Preserve Overprints and Spot Colors Preservar Sobreimpressões e Cores Spot
@@ -2830,6 +2839,7 @@ digits Malayalam Malaiala
New type takes this language while Document Setup's language is English: USA; type already in a document keeps its own language. O texto novo recebe este idioma enquanto o idioma da Configuração do Documento for Inglês: EUA; o texto que já está em um documento mantém o próprio idioma.
In paragraphs with Hyphenate on, a listed word breaks only at the hyphens typed in it, or nowhere when it has none, whatever its language or case. Em parágrafos com Hifenizar ativado, uma palavra da lista é dividida apenas nos hifens digitados nela, ou em nenhum ponto se não tiver nenhum, qualquer que seja o idioma ou o uso de maiúsculas.
On the desktop, the .wasm plug-ins in this folder load at startup and when you click OK with a new folder here, except in Safe Mode; the web version does not load them. Na versão para desktop, os plug-ins .wasm desta pasta são carregados ao iniciar e quando você clica em OK com uma nova pasta aqui, exceto no Modo de Segurança; a versão web não os carrega.
How many instructions each run of a plug-in object filter may use; Large allows more than Normal with the same 60-second limit. Heavy filters keep their own budget. Quantas instruções cada execução de um filtro de objetos de um plug-in pode usar; Grande permite mais que Normal com o mesmo limite de 60 segundos. Filtros pesados mantêm seu próprio orçamento.
The first scratch disk choice: Startup, None or a folder path; VectorCraft stores it but does not use scratch disks yet. A primeira opção de disco de cópia: Startup, None ou o caminho de uma pasta; o VectorCraft a armazena, mas ainda não usa discos de cópia.
The second scratch disk choice: Startup, None or a folder path; VectorCraft stores it but does not use scratch disks yet. A segunda opção de disco de cópia: Startup, None ou o caminho de uma pasta; o VectorCraft a armazena, mas ainda não usa discos de cópia.
How light or dark the interface is. O quanto a interface é clara ou escura.
@@ -2848,6 +2858,7 @@ digits Malayalam Malaiala
Animated Zoom works only while this is on; off, Animated Zoom is dimmed and zooming does not animate. O Zoom Animado só funciona enquanto isto está ativado; desativado, o Zoom Animado fica esmaecido e o zoom não é animado.
The wheel's zoom glides in, and the Zoom tool zooms as you drag sideways or hold it down; off, the Zoom tool zooms to the area you drag across. O zoom com a roda desliza suavemente, e a Ferramenta Zoom amplia enquanto você arrasta para o lado ou a mantém pressionada; desativado, a Ferramenta Zoom amplia a área que você arrasta.
From the next start, the desktop version draws with this kind of graphics processor; Automatic prefers the one that drives the display. The web version does not use it. A partir da próxima inicialização, a versão para desktop desenha com este tipo de processador gráfico; Automático prefere o que controla a tela. A versão web não o usa.
From the next start, the window shows frames without waiting for the display to refresh, at most 240 a second; off, the display paces them. A present mode set at launch overrides it. A partir da próxima inicialização, a janela mostra os quadros sem esperar a tela atualizar, no máximo 240 por segundo; desativado, a tela dita o ritmo. Um modo de apresentação definido na inicialização tem prioridade.
The most undo steps each document keeps; lowering it drops the oldest steps when you click OK. Steps can also go sooner when they use too much memory. O número máximo de etapas de desfazer que cada documento guarda; um número menor remove as etapas mais antigas quando você clica em OK. Etapas também podem sair antes quando usam memória demais.
Shows the artwork changing while you drag; off, outlines follow the drag and the artwork changes when you release. A ruler guide always moves as you drag. Mostra a arte mudando enquanto você arrasta; desativado, contornos seguem o arraste e a arte muda quando você solta. Uma guia de régua sempre se move enquanto você arrasta.
How many worker threads draw the artwork; -1 uses one fewer than the cores VectorCraft may use, at most 8, and 0 uses none. The web version always uses none. Quantas threads de trabalho desenham a arte; -1 usa uma a menos que os núcleos que o VectorCraft pode usar, no máximo 8, e 0 nenhuma. A versão web nunca usa nenhuma.
@@ -2874,6 +2885,10 @@ digits Malayalam Malaiala
VectorCraft stores this choice, but Copy and Cut do not use a legacy vector clipboard format yet. O VectorCraft salva esta escolha, mas Copiar e Recortar ainda não usam um formato de área de transferência vetorial legada.
Preserve Paths or Preserve Appearance and Overprints for the legacy vector clipboard; VectorCraft stores the choice but does not use it yet. Preservar Caminhos ou Preservar Aparência e Sobreimpressões para a área de transferência vetorial legada; o VectorCraft salva a escolha, mas ainda não a usa.
Keep Formatting keeps the styles of text copied from VectorCraft type when it is pasted into type; Keep Plain Text gives it the style where it lands. Manter Formatação mantém os estilos do texto copiado de um objeto de texto do VectorCraft ao colá-lo em um objeto de texto; Manter Texto Simples dá a ele o estilo do local onde é colado.
Display All Blacks as Rich Black shows pure CMYK black (black ink alone at 100%) as RGB black on the canvas; Display All Blacks Accurately converts it through the CMYK working space. Exibir Todos os Pretos como Preto Rico mostra o preto CMYK puro (apenas tinta preta a 100%) como preto RGB na tela; Exibir Todos os Pretos com Precisão o converte pelo espaço CMYK de trabalho.
Output All Blacks as Rich Black draws pure CMYK black as RGB black in RGB and grayscale raster exports and Print as Bitmap; it does not change vector exports, CMYK JPEG, TIFF and PSD, or other printing. Gerar Todos os Pretos como Preto Rico desenha o preto CMYK puro como preto RGB nas exportações raster RGB e em escala de cinza e com Imprimir como Bitmap; não altera exportações vetoriais, JPEG, TIFF e PSD CMYK nem outras impressões.
On a touch screen, switches to the Touch workspace; turning this off, or losing the touch screen, goes back to the workspace it switched from. Em uma tela sensível ao toque, muda para o espaço de trabalho de toque; desativar a opção ou perder a tela sensível ao toque volta ao espaço de trabalho anterior.
A two-finger tap on the canvas undoes, or switches between selection and drawing tools in the Touch workspace, and a three-finger tap redoes; neither works in Presentation Mode. Um toque com dois dedos na tela de desenho desfaz ou, no espaço de trabalho de toque, alterna entre ferramentas de seleção e de desenho, e um toque com três dedos refaz; nenhum funciona no Modo de Apresentação.
New type takes this language while Document Setup's language is English: USA and [Normal Character Style] sets none; type already in a document keeps its own language. O texto novo recebe este idioma enquanto o idioma da Configuração do Documento for Inglês: EUA e o [Estilo de Caractere Normal] não definir nenhum; o texto que já está em um documento mantém o próprio idioma.
In paragraphs with Hyphenate on, a listed word breaks only at the hyphens typed in it, or nowhere when it has none, whatever its case; Korean words take no hyphen, and Indian-language words do not break inside a character cluster. Em parágrafos com Hifenizar ativado, uma palavra da lista é dividida apenas nos hifens digitados nela, ou em nenhum ponto se não tiver nenhum, qualquer que seja o uso de maiúsculas; palavras coreanas não recebem hífen, e palavras em línguas indianas não são divididas dentro de um grupo de caracteres.
Reset all preferences to their defaults? Redefinir todas as preferências para o padrão?
@@ -3083,6 +3098,7 @@ digits Malayalam Malaiala
@plural {shown} of {n} result. Keep typing to narrow them.|{shown} of {n} results. Keep typing to narrow them. {shown} de {n} resultado. Continue digitando para filtrá-los.|{shown} de {n} resultados. Continue digitando para filtrá-los.
Recent Commands Comandos recentes
No recent commands Nenhum comando recente
Type to search commands, tools, panels and effects Digite para pesquisar comandos, ferramentas, painéis e efeitos
Search commands Pesquisar comandos
Secondary Secundária
Section Symbol Símbolo de Seção
@@ -4675,6 +4691,7 @@ axis Both Ambos
@msg no native format sem formato nativo
@msg no pages sem páginas
@msg no pattern `{name}` nenhum padrão `{name}`
@msg art painted with `{name}` can't be its tile uma arte pintada com `{name}` não pode ser o ladrilho dele
@msg no perspective grid preset named `{name}` nenhuma predefinição de grade de perspectiva chamada `{name}`
@msg no plug-in {0} is installed o plug-in {0} não está instalado
@msg no plug-in {id} is installed o plug-in {id} não está instalado
@@ -6435,6 +6452,7 @@ effect Regular Regular
Arrow Seta
Arrow (open) Seta (aberta)
Barbed Farpada
arrowhead Feather Pena
Half Arrow (left) Meia Seta (esquerda)
Half Arrow (right) Meia Seta (direita)
Concave Côncava
@@ -6462,6 +6480,7 @@ effect Regular Regular
Kite Pipa
Triangle to Bar Triângulo para Barra
Oval Oval
Line Arrow Seta de Linha
Complementary Complementar
Complementary 2 Complementar 2
Split Complementary Complementar Dividida
@@ -8314,6 +8333,7 @@ breakText Glyphs Glifos
Remove Strokes Remover Traçados
Place Brush Art Colocar Arte do Pincel
Replace Brush Art Substituir Arte do Pincel
Replace Pattern Art Substituir Arte do Padrão
Strokes use this brush. Apply the new art to those strokes, or leave them as they are and add a copy of the brush with the new art? Traçados usam este pincel. Aplicar a nova arte a esses traçados, ou deixá-los como estão e adicionar uma cópia do pincel com a nova arte?
Apply to Strokes Aplicar aos Traçados
Leave Strokes Manter Traçados
@@ -10789,6 +10809,11 @@ swatch Yellow Green Verde-amarelado
@msg A panel is not joined to the rest by a crease. Um painel não está unido ao restante por nenhuma linha de vinco.
@msg A fold line is on a non-printing layer. Uma linha de dobra está em uma camada não imprimível.
@msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} Painéis: {panels}, dobradiças: {hinges}, erros: {errors}, avisos: {warnings}
Engraving Gravura
Fine Hatching Hachuras finas
Dense Hatching Hachuras densas
Tapered Hatching Hachuras afiladas
Broken Hatching Hachuras interrompidas
Image Brush Pincéis de imagem
Soft Bloom Flor suave
Halftone Field Campo de meios-tons
Can't render this file because it is too large.
+26
View File
@@ -1717,6 +1717,10 @@ file-filter Templates Шаблоны
Add Color Tool Инструмент «Добавить цвет»
Remove Color Tool Инструмент «Удалить цвет»
Remove Color Удалить цвет
Set As Base Color Сделать базовым цветом
Select Shade Выбрать оттенок
Add New Color Добавить новый цвет
Set Current Color As Base Color Сделать текущий цвет базовым
Find the selected colors in the artwork Найти выбранные цвета в рисунке
Harmony Sets Наборы гармонии
Height Высота
@@ -2130,6 +2134,7 @@ file-filter Templates Шаблоны
Limit to Library: Ограничить библиотекой:
Limit: Предел:
Line Линия
Line Arrow Линейная стрелка
Line Art and Text Resolution: Разрешение штрихового рисунка и текста:
Line Breaks Разрывы строк
Line Color Цвет линии
@@ -2893,6 +2898,11 @@ diagnostics ui интерфейс
Preserve Alpha Transparency Сохранять альфа-прозрачность
Preserve Appearance and Overprints Сохранять оформление и наложения
Preserve CMYK Numbers Сохранять значения CMYK
Preserve RGB Numbers Сохранять значения RGB
Device to Simulate: Имитируемое устройство:
Simulate Paper Color Имитировать цвет бумаги
Simulate Black Ink Имитировать чёрную краску
Load… Загрузить…
Preserve Editing Capabilities Сохранять возможности редактирования
Preserve editing capabilities Сохранять возможности редактирования
Preserve Lightness Сохранять светлоту
@@ -3396,6 +3406,7 @@ digits Malayalam Малаялам
New type takes this language while Document Setup's language is English: USA; type already in a document keeps its own language. Новый текст получает этот язык, пока в «Параметрах документа» выбран язык Английский: США; текст, который уже есть в документе, сохраняет свой язык.
In paragraphs with Hyphenate on, a listed word breaks only at the hyphens typed in it, or nowhere when it has none, whatever its language or case. В абзацах с включённым параметром «Расставлять переносы» слово из списка переносится только по введённым в нём дефисам или нигде, если их нет, независимо от языка и регистра.
On the desktop, the .wasm plug-ins in this folder load at startup and when you click OK with a new folder here, except in Safe Mode; the web version does not load them. В настольной версии модули .wasm из этой папки загружаются при запуске и при нажатии ОК с новой папкой здесь, кроме безопасного режима; веб-версия их не загружает.
How many instructions each run of a plug-in object filter may use; Large allows more than Normal with the same 60-second limit. Heavy filters keep their own budget. Сколько инструкций может использовать каждый запуск фильтра объектов из модуля; «Большой» разрешает больше, чем «Обычный», при том же ограничении в 60 секунд. Тяжёлые фильтры сохраняют свой бюджет.
The first scratch disk choice: Startup, None or a folder path; VectorCraft stores it but does not use scratch disks yet. Первый выбор рабочего диска: Startup, None или путь к папке; VectorCraft сохраняет его, но пока не использует рабочие диски.
The second scratch disk choice: Startup, None or a folder path; VectorCraft stores it but does not use scratch disks yet. Второй выбор рабочего диска: Startup, None или путь к папке; VectorCraft сохраняет его, но пока не использует рабочие диски.
How light or dark the interface is. Насколько светлый или тёмный интерфейс.
@@ -3414,6 +3425,7 @@ digits Malayalam Малаялам
Animated Zoom works only while this is on; off, Animated Zoom is dimmed and zooming does not animate. Анимированное масштабирование работает, только пока это включено; если выключено, Анимированное масштабирование затенено и масштабирование не анимируется.
The wheel's zoom glides in, and the Zoom tool zooms as you drag sideways or hold it down; off, the Zoom tool zooms to the area you drag across. Масштабирование колесом идёт плавно, а Инструмент «Масштаб» масштабирует, пока вы тянете вбок или удерживаете его; если выключено, он масштабирует до области, по которой вы протянули.
From the next start, the desktop version draws with this kind of graphics processor; Automatic prefers the one that drives the display. The web version does not use it. Со следующего запуска настольная версия рисует этим типом графического процессора; «Автоматически» предпочитает тот, что управляет дисплеем. Веб-версия его не использует.
From the next start, the window shows frames without waiting for the display to refresh, at most 240 a second; off, the display paces them. A present mode set at launch overrides it. Со следующего запуска окно показывает кадры, не дожидаясь обновления дисплея, не более 240 в секунду; если выключено, темп задаёт дисплей. Режим вывода, заданный при запуске, имеет приоритет.
The most undo steps each document keeps; lowering it drops the oldest steps when you click OK. Steps can also go sooner when they use too much memory. Наибольшее число шагов отмены, которое хранит каждый документ; меньшее число удаляет самые старые шаги при нажатии ОК. Шаги могут уйти и раньше, если занимают слишком много памяти.
Shows the artwork changing while you drag; off, outlines follow the drag and the artwork changes when you release. A ruler guide always moves as you drag. Показывает, как меняется графика, пока вы тянете; если выключено, за перетаскиванием следуют контуры, а графика меняется, когда вы отпускаете. Направляющая с линейки всегда движется при перетаскивании.
How many worker threads draw the artwork; -1 uses one fewer than the cores VectorCraft may use, at most 8, and 0 uses none. The web version always uses none. Сколько рабочих потоков рисуют графику; -1 использует на один меньше, чем ядер, доступных VectorCraft, не более 8, а 0 ни одного. Веб-версия не использует их никогда.
@@ -3440,6 +3452,10 @@ digits Malayalam Малаялам
VectorCraft stores this choice, but Copy and Cut do not use a legacy vector clipboard format yet. VectorCraft сохраняет этот выбор, но Копировать и Вырезать пока не используют формат устаревшего векторного буфера обмена.
Preserve Paths or Preserve Appearance and Overprints for the legacy vector clipboard; VectorCraft stores the choice but does not use it yet. Сохранять контуры или Сохранять оформление и наложения для устаревшего векторного буфера обмена; VectorCraft сохраняет выбор, но пока не использует его.
Keep Formatting keeps the styles of text copied from VectorCraft type when it is pasted into type; Keep Plain Text gives it the style where it lands. Сохранять форматирование сохраняет стили текста, скопированного из текстового объекта VectorCraft, при вставке в текстовый объект; Сохранять простой текст даёт ему стиль места вставки.
Display All Blacks as Rich Black shows pure CMYK black (black ink alone at 100%) as RGB black on the canvas; Display All Blacks Accurately converts it through the CMYK working space. Отображать все чёрные как составной чёрный показывает чистый чёрный CMYK (только чёрная краска на 100 %) на холсте как чёрный RGB; Отображать все чёрные точно преобразует его через рабочее пространство CMYK.
Output All Blacks as Rich Black draws pure CMYK black as RGB black in RGB and grayscale raster exports and Print as Bitmap; it does not change vector exports, CMYK JPEG, TIFF and PSD, or other printing. Выводить все чёрные как составной чёрный рисует чистый чёрный CMYK как чёрный RGB в растровых экспортах RGB и в оттенках серого и при «Печатать как растровое изображение»; векторные экспорты, JPEG, TIFF и PSD в CMYK и другую печать он не меняет.
On a touch screen, switches to the Touch workspace; turning this off, or losing the touch screen, goes back to the workspace it switched from. На сенсорном экране переключает на сенсорную рабочую среду; при выключении или пропаже сенсорного экрана возвращает рабочую среду, которая была до переключения.
A two-finger tap on the canvas undoes, or switches between selection and drawing tools in the Touch workspace, and a three-finger tap redoes; neither works in Presentation Mode. Касание двумя пальцами по холсту отменяет действие, а в сенсорной рабочей среде переключает между инструментами выделения и рисования; касание тремя пальцами повторяет. В режиме презентации ни одно не работает.
New type takes this language while Document Setup's language is English: USA and [Normal Character Style] sets none; type already in a document keeps its own language. Новый текст получает этот язык, пока в «Параметрах документа» выбран язык Английский: США, а [Обычный стиль символа] не задаёт язык; текст, который уже есть в документе, сохраняет свой язык.
In paragraphs with Hyphenate on, a listed word breaks only at the hyphens typed in it, or nowhere when it has none, whatever its case; Korean words take no hyphen, and Indian-language words do not break inside a character cluster. В абзацах с включённым параметром «Расставлять переносы» слово из списка переносится только по введённым в нём дефисам или нигде, если их нет, независимо от регистра; корейские слова не получают дефис, а слова на индийских языках не переносятся внутри группы символов.
Reset all preferences to their defaults? Сбросить все настройки до значений по умолчанию?
@@ -3684,6 +3700,7 @@ digits Malayalam Малаялам
@plural {shown} of {n} result. Keep typing to narrow them.|{shown} of {n} results. Keep typing to narrow them. {shown} из {n} результата. Продолжайте вводить, чтобы сузить их.|{shown} из {n} результатов. Продолжайте вводить, чтобы сузить их.|{shown} из {n} результатов. Продолжайте вводить, чтобы сузить их.
Recent Commands Недавние команды
No recent commands Нет недавних команд
Type to search commands, tools, panels and effects Начните вводить для поиска команд, инструментов, панелей и эффектов
Search commands Поиск команд
Search Commands… Поиск команд…
Secondary Вторичный
@@ -5422,6 +5439,7 @@ liquify-list-end {0}, {1} {0} и {1}
@msg no native format нет собственного формата
@msg no pages нет страниц
@msg no pattern `{name}` нет узора `{name}`
@msg art painted with `{name}` can't be its tile графика, окрашенная узором `{name}`, не может быть его плиткой
@msg no perspective grid preset named `{name}` нет набора сетки перспективы с именем `{name}`
@msg no plug-in {0} is installed модуль {0} не установлен
@msg no plug-in {id} is installed модуль {id} не установлен
@@ -7592,6 +7610,8 @@ axis Y Axis Ось Y
Auto Size Авторазмер
Bar Черта
Barbed С зазубриной
arrowhead Feather Перо
arrowhead Target Мишень
Baseline (Standard) Базовый (стандартный)
Baseline Optimized Базовый оптимизированный
Bicubic Бикубическая
@@ -8285,6 +8305,7 @@ breakText Glyphs Глифы
Remove Strokes Убрать обводки
Place Brush Art Поместить рисунок кисти
Replace Brush Art Заменить рисунок кисти
Replace Pattern Art Заменить рисунок узора
Strokes use this brush. Apply the new art to those strokes, or leave them as they are and add a copy of the brush with the new art? Обводки используют эту кисть. Применить новый рисунок к этим обводкам или оставить их как есть и добавить копию кисти с новым рисунком?
Apply to Strokes Применить к обводкам
Leave Strokes Оставить обводки
@@ -10772,6 +10793,11 @@ shape Open Открытый
@msg Two panels pass through each other. Две панели проходят друг сквозь друга.
@msg {w} × {h} pixels is too large for PSD (at most {MAX_SIDE} pixels a side): lower the resolution {w} × {h} пикселей — слишком большой размер для PSD (не более {MAX_SIDE} пикселей по стороне): уменьшите разрешение
@msg composer must be "singleLine", "everyLine", "standardSingleLine" or "standardEveryLine" composer должен быть "singleLine", "everyLine", "standardSingleLine" или "standardEveryLine"
Engraving Гравировка
Fine Hatching Тонкая штриховка
Dense Hatching Плотная штриховка
Tapered Hatching Сужающаяся штриховка
Broken Hatching Прерывистая штриховка
Image Brush Кисти изображений
Soft Bloom Мягкое цветение
Halftone Field Полутоновое поле
Can't render this file because it is too large.
+25
View File
@@ -1654,6 +1654,10 @@ font-technology Variable Variabla
Add Color Tool Verktyget Lägg till färg
Remove Color Tool Verktyget Ta bort färg
Remove Color Ta bort färg
Set As Base Color Ange som grundfärg
Select Shade Välj nyans
Add New Color Lägg till ny färg
Set Current Color As Base Color Ange aktuell färg som grundfärg
Find the selected colors in the artwork Hitta de markerade färgerna i teckningen
Harmony Sets Harmoniuppsättningar
Height Höjd
@@ -2032,6 +2036,7 @@ font-technology Variable Variabla
Limit to Library: Begränsa till bibliotek:
Limit: Gränsvärde:
Line Linje
Line Arrow Linjepil
Line Art and Text Resolution: Upplösning för streckteckning och text:
Line Breaks Radbrytningar
Line Color Linjefärg
@@ -2786,6 +2791,11 @@ font-technology Variable Variabla
Preserve Alpha Transparency Bevara alfatransparens
Preserve Appearance and Overprints Bevara utseende och övertryck
Preserve CMYK Numbers Bevara CMYK-värden
Preserve RGB Numbers Bevara RGB-värden
Device to Simulate: Enhet att simulera:
Simulate Paper Color Simulera pappersfärg
Simulate Black Ink Simulera svart bläck
Load… Läs in…
Preserve Editing Capabilities Bevara redigeringsmöjligheter
Preserve editing capabilities Bevara redigeringsmöjligheter
Preserve Lightness Bevara ljushet
@@ -3285,6 +3295,7 @@ digits Malayalam Malayalam
New type takes this language while Document Setup's language is English: USA; type already in a document keeps its own language. Ny text får det här språket så länge språket i Dokumentinställningar är Engelska: USA; text som redan finns i ett dokument behåller sitt eget språk.
In paragraphs with Hyphenate on, a listed word breaks only at the hyphens typed in it, or nowhere when it has none, whatever its language or case. I stycken med Avstava på avstavas ett listat ord bara vid bindestrecken som skrivits in i det, eller inte alls om det saknar sådana, oavsett språk och skiftläge.
On the desktop, the .wasm plug-ins in this folder load at startup and when you click OK with a new folder here, except in Safe Mode; the web version does not load them. I skrivbordsversionen läses .wasm-plugins i den här mappen in vid start och när du klickar på OK med en ny mapp här, utom i felsäkert läge; webbversionen läser inte in dem.
How many instructions each run of a plug-in object filter may use; Large allows more than Normal with the same 60-second limit. Heavy filters keep their own budget. Hur många instruktioner varje körning av ett objektfilter från ett plugin får använda; Stor tillåter fler än Normal med samma gräns på 60 sekunder. Tunga filter behåller sin egen budget.
The first scratch disk choice: Startup, None or a folder path; VectorCraft stores it but does not use scratch disks yet. Det första valet av arbetsdisk: Startup, None eller en mappsökväg; VectorCraft sparar det men använder ännu inte arbetsdiskar.
The second scratch disk choice: Startup, None or a folder path; VectorCraft stores it but does not use scratch disks yet. Det andra valet av arbetsdisk: Startup, None eller en mappsökväg; VectorCraft sparar det men använder ännu inte arbetsdiskar.
How light or dark the interface is. Hur ljust eller mörkt gränssnittet är.
@@ -3303,6 +3314,7 @@ digits Malayalam Malayalam
Animated Zoom works only while this is on; off, Animated Zoom is dimmed and zooming does not animate. Animerad zoom fungerar bara medan detta är på; avstängt är Animerad zoom nedtonad och zoomningen animeras inte.
The wheel's zoom glides in, and the Zoom tool zooms as you drag sideways or hold it down; off, the Zoom tool zooms to the area you drag across. Zoom med hjulet glider in mjukt, och Zoomverktyget zoomar medan du drar åt sidan eller håller det nedtryckt; avstängt zoomar Zoomverktyget till området du drar över.
From the next start, the desktop version draws with this kind of graphics processor; Automatic prefers the one that drives the display. The web version does not use it. Från nästa start ritar skrivbordsversionen med den här typen av grafikprocessor; Automatisk föredrar den som driver skärmen. Webbversionen använder den inte.
From the next start, the window shows frames without waiting for the display to refresh, at most 240 a second; off, the display paces them. A present mode set at launch overrides it. Från nästa start visar fönstret bildrutor utan att vänta på att skärmen uppdateras, högst 240 per sekund; avstängt styr skärmen takten. Ett presentationsläge som anges vid start går före.
The most undo steps each document keeps; lowering it drops the oldest steps when you click OK. Steps can also go sooner when they use too much memory. Det högsta antalet ångra-steg som varje dokument behåller; ett lägre tal tar bort de äldsta stegen när du klickar på OK. Steg kan också försvinna tidigare när de använder för mycket minne.
Shows the artwork changing while you drag; off, outlines follow the drag and the artwork changes when you release. A ruler guide always moves as you drag. Visar hur bilden ändras medan du drar; avstängt följer konturer dragningen och bilden ändras när du släpper. En stödlinje från linjalen flyttas alltid medan du drar.
How many worker threads draw the artwork; -1 uses one fewer than the cores VectorCraft may use, at most 8, and 0 uses none. The web version always uses none. Hur många arbetstrådar som ritar bilden; -1 använder en färre än de kärnor VectorCraft får använda, högst 8, och 0 ingen. Webbversionen använder aldrig någon.
@@ -3329,6 +3341,10 @@ digits Malayalam Malayalam
VectorCraft stores this choice, but Copy and Cut do not use a legacy vector clipboard format yet. VectorCraft sparar det här valet, men Kopiera och Klipp ut använder ännu inget format för äldre vektorurklipp.
Preserve Paths or Preserve Appearance and Overprints for the legacy vector clipboard; VectorCraft stores the choice but does not use it yet. Bevara banor eller Bevara utseende och övertryck för äldre vektorurklipp; VectorCraft sparar valet men använder det inte ännu.
Keep Formatting keeps the styles of text copied from VectorCraft type when it is pasted into type; Keep Plain Text gives it the style where it lands. Behåll formatering behåller formaten för text som kopierats från ett textobjekt i VectorCraft när den klistras in i ett textobjekt; Behåll oformaterad text ger den formatet där den hamnar.
Display All Blacks as Rich Black shows pure CMYK black (black ink alone at 100%) as RGB black on the canvas; Display All Blacks Accurately converts it through the CMYK working space. Visa alla svarta som djupsvart visar ren CMYK-svart (bara svart färg på 100 %) som RGB-svart på arbetsytan; Visa alla svarta korrekt konverterar den genom arbets-CMYK-färgrymden.
Output All Blacks as Rich Black draws pure CMYK black as RGB black in RGB and grayscale raster exports and Print as Bitmap; it does not change vector exports, CMYK JPEG, TIFF and PSD, or other printing. Återge all svart som djupsvart ritar ren CMYK-svart som RGB-svart i RGB- och gråskale-rasterexporter och med Skriv ut som bitmapp; den ändrar inte vektorexporter, CMYK-JPEG, -TIFF och -PSD eller annan utskrift.
On a touch screen, switches to the Touch workspace; turning this off, or losing the touch screen, goes back to the workspace it switched from. På en pekskärm växlar detta till arbetslayouten för pekskärm; när inställningen stängs av eller pekskärmen försvinner återgår den till arbetslayouten från före bytet.
A two-finger tap on the canvas undoes, or switches between selection and drawing tools in the Touch workspace, and a three-finger tap redoes; neither works in Presentation Mode. Ett tryck med två fingrar på arbetsytan ångrar eller växlar i arbetslayouten för pekskärm mellan markerings- och ritverktyg, och ett tryck med tre fingrar gör om; inget av dem fungerar i presentationsläge.
New type takes this language while Document Setup's language is English: USA and [Normal Character Style] sets none; type already in a document keeps its own language. Ny text får det här språket så länge språket i Dokumentinställningar är Engelska: USA och [Normal teckenstil] inte anger något språk; text som redan finns i ett dokument behåller sitt eget språk.
In paragraphs with Hyphenate on, a listed word breaks only at the hyphens typed in it, or nowhere when it has none, whatever its case; Korean words take no hyphen, and Indian-language words do not break inside a character cluster. I stycken med Avstava på avstavas ett listat ord bara vid bindestrecken som skrivits in i det, eller inte alls om det saknar sådana, oavsett skiftläge; koreanska ord får inget avstavningstecken, och ord på indiska språk avstavas inte inuti en teckengrupp.
Reset all preferences to their defaults? Återställa alla inställningar till standard?
@@ -3559,6 +3575,7 @@ digits Malayalam Malayalam
@plural {shown} of {n} result. Keep typing to narrow them.|{shown} of {n} results. Keep typing to narrow them. {shown} av {n} resultat. Fortsätt skriva för att begränsa dem.|{shown} av {n} resultat. Fortsätt skriva för att begränsa dem.
Recent Commands Senaste kommandon
No recent commands Inga senaste kommandon
Type to search commands, tools, panels and effects Skriv för att söka efter kommandon, verktyg, paneler och effekter
Search commands Sök kommandon
Search Commands… Sök kommandon…
Secondary Sekundär
@@ -5287,6 +5304,7 @@ liquify-list-end {0}, {1} {0} och {1}
@msg no native format inget eget format
@msg no pages inga sidor
@msg no pattern `{name}` inget mönster `{name}`
@msg art painted with `{name}` can't be its tile grafik målad med `{name}` kan inte vara dess ruta
@msg no perspective grid preset named `{name}` ingen förinställning för perspektivrutnät med namnet `{name}`
@msg no plug-in {0} is installed inget plugin {0} är installerat
@msg no plug-in {id} is installed inget plugin {id} är installerat
@@ -6400,6 +6418,7 @@ lighting Light Ljus
B5 B5
Bar Lodstreck
Barbed Hullingförsedd
arrowhead Feather Fjäder
Baseline (Standard) Baseline (standard)
Baseline Optimized Baseline optimerad
Basic Grundläggande
@@ -8330,6 +8349,7 @@ breakText Glyphs Glyfer
Remove Strokes Ta bort konturer
Place Brush Art Placera penselgrafik
Replace Brush Art Ersätt penselgrafik
Replace Pattern Art Ersätt mönstergrafik
Strokes use this brush. Apply the new art to those strokes, or leave them as they are and add a copy of the brush with the new art? Konturer använder den här penseln. Använd den nya grafiken på konturerna, eller låt dem vara som de är och lägg till en kopia av penseln med den nya grafiken?
Apply to Strokes Använd på konturer
Leave Strokes Behåll konturer
@@ -10810,6 +10830,11 @@ digits Hindi Hindi
@msg A joint does not close by {gap} pt. En fog sluter inte med {gap} pt.
@msg Two panels pass through each other. Två paneler går igenom varandra.
@msg {w} × {h} pixels is too large for PSD (at most {MAX_SIDE} pixels a side): lower the resolution {w} × {h} pixlar är för stort för PSD (högst {MAX_SIDE} pixlar per sida): sänk upplösningen
Engraving Gravyr
Fine Hatching Fin skraffering
Dense Hatching Tät skraffering
Tapered Hatching Avsmalnande skraffering
Broken Hatching Bruten skraffering
Image Brush Bildpenslar
Soft Bloom Mjuk blomning
Halftone Field Halvtonsfält
Can't render this file because it is too large.
Loaded 100 of 145 files, more files were not shown because too many files have changed in this diff. Show more