This release adds 3 notable features for engineering teams evaluating rollout.
✓ No known CVEs patched in this version
Topics
+12 more
Summary
AI summaryUpdates Performance, Testing infrastructure, and Architecture across a mixed release.
Full changelog
Headline — "cinematic document engine"
v1.4 closes the visual-design gap that the previous releases left open. Tables can now span columns, layers can stack on top of each other, sections and pages carry semantic backgrounds, paragraphs accept fluent rich text, and the whole look-and-feel can be parametrised through a single BusinessTheme. The release also lands the visual-regression scaffolding required to keep README screenshots stable across refactors.
Public API — semantic primitives
DocumentTableCellis now a 3-field record (lines,style,colSpan). The newcolSpan(int)factory pluswithColSpan(...)onTableCellContentlet one cell occupy several columns; sum-of-spans-per-row is validated byTableLayoutSupport. Border ownership and natural-width distribution understand spans (extra width is shared acrossautocolumns inside the span; an all-fixed span throws when it cannot fit). Renderer code is unchanged — spanned cells emit a singleTableResolvedCellwith the merged width.- new
LayerStackNode+LayerAlignprimitive composes children inside the same bounding box, in source order (first behind, last in front). Each layer carries one of nine alignments (TOP_LEFT … BOTTOM_RIGHT). Pagination is atomic. Backed by a newAxis.STACKinCompositeLayoutSpecand acompileStackedLayerbranch inLayoutCompiler. DSL surface:LayerStackBuilderwithback(...),center(...),layer(node, align). DocumentSession.pageBackground(DocumentColor | Color)(and the matchingGraphCompose.DocumentBuildersetter) injects a full-canvasShapeFragmentPayloadat the start of every page. Combine withLayerStackNodefor cinematic hero pages without any backend changes.AbstractFlowBuildergains semantic shortcuts on every flow / section / module:band(color),softPanel(color)/softPanel(color, radius, padding), andaccentLeft / accentRight / accentTop / accentBottom(color, width). They reuse the existingfillColor,cornerRadius,padding, andDocumentBordersplumbing — the new methods are sugar for designer-style flows.RichTextfluent builder (document.dsl.RichText) plusParagraphBuilder.rich(...)/AbstractFlowBuilder.addRich(...)cover theStatus: Pendinglabel/value pattern in one expression:RichText.text("Status: ").bold("Pending").color("…", red).accent("…", brand). Includesplain / bold / italic / boldItalic / underline / strikethrough / color / accent / size / style / link / append.
Public API — design tokens
- new
com.demcha.compose.document.themepackage — entirely on top of public document-level types, no engine leaks.DocumentPalette— primary / accent / surface / surfaceMuted / textPrimary / textMuted / ruleSpacingScale— five-stepxs / sm / md / lg / xlwith monotonicity validation andinsetsXs() … insetsXl()helpersTextScale—h1 / h2 / h3 / body / caption / label / accentresolved stylesTablePreset—defaultCellStyle / headerStyle / totalRowStyle / zebraStyleBusinessTheme— composes the four scales plus an optional page background, with three built-in presets (classic(),modern()cream paper + teal,executive()slate panels with Times-Roman headings) and immutablewithName / withPageBackgroundforks
Testing infrastructure
com.demcha.testing.visual.ImageDiff— pixel-by-pixel comparison with per-channel tolerance and a red/grey diff image.com.demcha.testing.visual.PdfVisualRegression— renders PDF bytes to one PNG per page viaPdfRenderBridgeand compares against baselines undersrc/test/resources/visual-baselines. Approve mode (-Dgraphcompose.visual.approve=trueorGRAPHCOMPOSE_VISUAL_APPROVE=true) writes new baselines; comparison failures dropactual.pnganddiff.pngnext to the baseline for inspection.- 41 new tests across the cinematic surfaces (
TableColSpanIntegrationTest,TableBuilderColSpanTest,LayerStackBuilderTest,PageBackgroundTest,SectionPresetTest,RichTextTest,BusinessThemeTest,PdfVisualRegressionTest). Total green count: 525.
Architecture
CompositeLayoutSpec.Axis.STACKjoinsVERTICALandHORIZONTAL. The compiler dispatchesSTACKtocompileStackedLayer, which positions each child inside the stack box via per-layer alignment offsets and shares the samecompileNodeInFixedSlotplumbing rows already use.- table layout (
TableLayoutSupport, test-sideTableBuilder) was rewritten around a "logical cell" model: each authored cell is oneLogicalCell(startColumn, colSpan, content)resolved against astylesGrid[row][col]— the grid keeps existing border-ownership logic intact while letting render code keep emitting oneTableResolvedCellper logical cell. DocumentSession.layoutGraph()now wrapscompiler.compile(...)withwithPageBackgrounds(...)so backends never need to know about the page-background option — they just iterate fragments as usual.
Performance
- Cinematic features have negligible overhead: page-background injection is a single fragment per page; column spans, layer stacks, and themes do not change the number of emitted fragments. End-to-end template latency stays in the same envelope as v1.3 once JIT is warm.
- Full benchmark surface is now published in the README:
current-speed(full profile) latency + per-stage breakdown, parallel throughput on the invoice template (1→8 threads),scalabilitysuite (1→16 threads, 13.8× speedup at 16), 50-threadstresstest (5,000 docs, 0 errors), and thecomparativetable against iText 5 and JasperReports.
Documentation
- README rewritten around the cinematic v1.4 narrative: new sections for column spans, layer stacks, page background + section presets, rich text DSL, business themes, the visual-regression workflow, "Extending GraphCompose" guidance, and a refreshed Performance section sourced from
scripts/run-benchmarks.ps1.
Weekly OSS security release digest.
The CVE patches and breaking changes that affected production tools this week. One email, every Sunday.
No spam, unsubscribe anytime.
Share this release
About GraphCompose 2.0
All releases →Related context
Related tools
Earlier breaking changes
- v2.0.0 Package rename: layered template packages dropped `.v2` suffix; update imports.
- v2.0.0 Removed dormant ECS engine internals (EntityManager, SystemECS, Entity components, render pipeline).
- v2.0.0 Removed linkOptions() accessor; use linkTarget() and ExternalLinkTarget.options().
- v2.0.0 Removed PDF‑typed document‑chrome overloads on DocumentSession; use backend‑neutral metadata/watermark/protect/header/footer.
- v2.0.0 Removed DSL name-aliases DocumentSession.builder() and DocumentDsl.text(); use builder() and paragraph().
Beta — feedback welcome: [email protected]