Files
effectcraft/crates
SusieeTheFemboyandGLM-5.3-Flash a3a72d48aa Transform: Fit to Comp sizes shape and text layers by their painted bounds (#2198)
layer.transform's fit / fitWidth / fitHeight ops took the layer's size
from render::source_size, which returns (0, 0) for layers without a
source item — shapes and text — so the ops matched nothing and silently
did nothing, for the shortcut, the menu item and the command alike.

When the source size is empty and a fit op runs, the size falls back to
the layer's painted content bounds at the current time, and the anchor
goes to the bounds' centre: content bounds live in layer space, where a
shape is centred on the origin and text sits above its baseline, so
(w/2, h/2) would fill the frame but land off-centre. Reset and the
other ops keep the source size, so their defaults are unchanged.

The regression test asserts what the viewer shows — the painted bounds
mapped to comp space span [0, 0, 640, 360] after fit, and fitWidth
spans the width centred vertically — for a rect shape and a text layer.

Co-Authored-By: GLM-5.3-Flash <noreply@z.ai>
2026-10-29 05:22:57 +01:00
..
2026-10-26 21:54:30 +00:00
2026-10-28 06:09:21 +00:00
2026-10-28 06:09:21 +00:00