Skip to content

Assemblash 1.8.0

Choose a tag to compare

@VidGuiCode VidGuiCode released this 12 Sep 15:45
· 4 commits to main since this release

Assemblash 1.8.0

Clipping and cropping. A layer can mask itself to a rectangle or an ellipse, an
image layer can show one rectangle of its source, and any layer can mirror
horizontally or vertically. This is how a circle avatar or a rounded screenshot
is made, and how a crop becomes a rectangle rather than a fit mode.

schemaVersion stays 1. The Operation union does not grow: all four values
are ordinary UpdateLayer fields.

Added

  • clip. A layer masks itself to its own box: {"shape":"rect", "cornerRadius":12} or {"shape":"ellipse"}. A radius larger than the box
    makes a stadium, the same way a shape rectangle's radius does.
  • crop. An image layer shows one rectangle of its source, in source
    pixels: {"x":0,"y":0,"width":400,"height":400}. It composes with fit.
    Values outside the source clamp to it, and a rectangle that misses the source
    is refused.
  • flipHorizontal and flipVertical. A mirror about the centre of the
    box, composed with the rotation. Mirroring text mirrors its glyphs.
  • Every surface carries them. The CLI takes set --clip-rect,
    --clip-radius, --clip-ellipse, --no-clip, --crop X,Y,W,H, --no-crop,
    --flip-h and --flip-v. MCP update_layer takes clip, clearClip,
    crop, clearCrop, flipHorizontal and flipVertical. The interface has
    one inspector row per feature. HTTP needs nothing: POST /operations
    deserialises the union.
  • An imported image records its pixel size. A crop is a rectangle in the
    source's own pixels, so the header of a PNG, JPEG, GIF or WebP is read at
    import. A format this build cannot measure is imported with an unknown size,
    and a crop of it is refused by name rather than guessed at.

Fixed

  • A clip and a shadow on one layer now keep the shadow. The mask is applied
    inside the effect stack, because SVG applies a clip-path after a filter
    and would cut the shadow off at the boundary.
  • A rotated clipped layer is cut to the box its own coordinates name. The mask
    carries the inverse of the layer's rotation, so it does not turn with the
    content.

Older builds

Builds 1.0 through 1.7 open a 1.8.0 document, keep clip, crop,
flipHorizontal and flipVertical exactly as written, and render the layer
unclipped, uncropped and unflipped. That is a silent degrade, named here rather
than discovered later.

A layer with no clip, no crop and no flip renders exactly as it did in 1.7.1.
Every determinism golden from 1.7.0 is byte-identical.