M1: refuse negative vector sizes

A negative width or height was clamped to zero by the scale helper, producing a layer smaller than asked for; vector.create now says so. Regression test covers width -10 with height 8.
This commit is contained in:
phonedu
2026-10-18 19:00:25 +08:00
parent aff3c4f18b
commit fec902b7d5
3 changed files with 11 additions and 4 deletions
+2 -2
View File
@@ -429,8 +429,8 @@ on; `key` resolves keys the way the canvas does. Commands behind keys:
`vector.create {path | points}` makes the layer's box from the geometry; `width`/`height` scale
the geometry to the size asked for (with both, each side independently; with one, the other keeps
its proportion). A path or point set that draws nothing is refused instead of making an invisible
0×0 layer, as is a size on an axis the geometry has none of and a size that would collapse both
axes.
0×0 layer, as is a size on an axis the geometry has none of, a negative size, and a size that
would collapse both axes.
Vector edit mode is driven with `run_command` (or `pointer`/`key` for gestures):
`vector.edit.begin {id? | ids?}` (default the selection; converts shapes to vectors; several layers