Skip to content

Graphics and barcodes export half-dot ^FO/^FT origins #667

Backlog

Description

@styl5030

Follow-up to #660. As you suggested, the change is attached as a patch (applies with git am on top of 5485f91a).

Problem
Smart snap can leave an object on a half dot. On main, a box at x = 100.5 exports ^FO100.5, while a text field at the same x exports ^FO101, so the two can print one dot apart. Ellipses, lines, images and barcodes do the same.

Proposed change

  • One helper, wholeDot, rounds every ^FO/^FT origin the way text already does.
  • Axis-aligned lines go through graphicAnchor, like diagonal ones.
  • emittedAnchorDots, and the check that drops a field pushed below 0 by ^LH/^LT, use the rounded origin, so preflight and that check agree with what is emitted.

Tests
17 new cases in zplGenerator.test.ts and emittedAnchor.test.ts. They fail on main and pass with the patch. pnpm lint, tsc -b and pnpm test pass.

zplab-whole-dot-origins.patch

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions