Skip to content

Region modifiers repeat/transform/jitter/round/x-y range are parsed but ignored #15

Open

Description

@scbrown
{ type: "palette", name: "p", colors: { _: "transparent", body: "#e6dccd", outline: "#000000" } }
{ type: "sprite", name: "blob", size: [8, 8], palette: "p", regions: {
    body: { rect: [2, 2, 4, 4], z: 0 },
    outline: { "auto-outline": "body", thickness: 1, z: 1 },
} }

pxl mask --count reports 16 body pixels and 0 outline pixels.
RegionDef parses auto-outline, repeat/spacing/offset-alternate,
transform, jitter, round and the x/y range limits, but
structured.rs::rasterize_region never reads any of them, so they are dropped
without a warning. Workaround: the outline is drawn explicitly as a closed
polyline. The teeth are listed one by one instead of using repeat.

Note: auto-outline itself is implemented by the fork integration in #11; the other modifiers remain no-ops.

Found while drawing examples/skull (#13). The repro is checked against main.

🤖 Generated with Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions