Skip to content

feat(api): inline checkboxes + swappable checkmark/arrow designs (@since 1.7.0)#131

Merged
DemchaAV merged 2 commits into
developfrom
feat/richtext-inline-shapes
Jun 4, 2026
Merged

feat(api): inline checkboxes + swappable checkmark/arrow designs (@since 1.7.0)#131
DemchaAV merged 2 commits into
developfrom
feat/richtext-inline-shapes

Conversation

@DemchaAV
Copy link
Copy Markdown
Owner

@DemchaAV DemchaAV commented Jun 4, 2026

Summary

Finalizes the interrupted inline-checkbox work and adds an additive, @since 1.7.0 shape-design seam. No breaking changes (japicmp clean); default look byte-for-byte unchanged.

  • Checkbox (checked / unchecked)InlineShapeRun is now a ShapeLayer stack; checkbox(size, checked, …) draws a rounded frame plus, when checked, a centred tick — todo / checklist markers ("some done, some not").
  • Swappable designsShapeOutline.CheckmarkStyle {CLASSIC, HEAVY} + ArrowStyle {BLOCK, TRIANGLE} with checkmark(w,h,style) / arrow(w,h,dir,style) overloads; no-style factories delegate to the defaults. checkbox also accepts a raw ShapeOutline mark. Foundation for a future "pick your tick/arrow" UI.
  • DSL parity — matching overloads on RichText / ParagraphBuilder; dense band geometry isolated in package-private ShapeRings.

Render

InlineShapesExample gains a checklist (checked + unchecked) and a variants row; committed preview assets/readme/examples/inline-shapes.pdf + example README refreshed.

Tests / gate

./mvnw verify -pl . green — 1111 tests, japicmp + javadoc clean. Added ShapeRingsTest plus checkbox/variant cases across ShapeOutlineTest / InlineShapeRunTest / RichTextTest / InlineShapeRenderTest.

DemchaAV added 2 commits June 4, 2026 12:15
Add InlineShapeRun for inline geometric figures (dots, arrows, chevrons, diamonds, triangles, stars, checkmarks, plus, regular polygons) drawn on the text baseline from geometry, not font glyphs. Introduce ShapeOutline.Polygon + ShapePoint with a family of factories usable both block-level (ShapeContainer) and inline; DSL shortcuts on ParagraphBuilder/RichText/ShapeContainerBuilder. Additive only, zero breaking changes.
 1.7.0)

- InlineShapeRun is now a ShapeLayer stack; checkbox(size, checked, ...) draws a
  rounded frame plus, when checked, a centred tick — checked/unchecked todo markers.
- ShapeOutline adds CheckmarkStyle {CLASSIC, HEAVY} and ArrowStyle {BLOCK, TRIANGLE}
  with checkmark(w,h,style) / arrow(w,h,dir,style) overloads; no-style factories
  delegate to the defaults, so the look is unchanged. checkbox also takes a raw mark.
- RichText / ParagraphBuilder gain matching overloads; dense band geometry lives in
  package-private ShapeRings.
- Example checklist + variants; README, committed preview and CHANGELOG updated.
@DemchaAV DemchaAV merged commit c99d0de into develop Jun 4, 2026
11 checks passed
@DemchaAV DemchaAV deleted the feat/richtext-inline-shapes branch June 4, 2026 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant