Pixie Update — What's New Since the Initial ReleaseA lot has happened since the
initial announcement two weeks ago. Here's a summary of what's been added and improved.
New ComponentsPixie now ships three components instead of one:
- TPixieSvgView — Proportional SVG display with alignment options. Available for Lazarus, Delphi VCL, and Delphi FMX.
- TPixiePaintBox — A drawing surface with TPixieDrawingCanvas, a TCanvas-like stateful API providing Pen, Brush, and Font properties, shape primitives, and text methods. Also available for all three frameworks.
Both components share the same base class hierarchy and rendering backends as TPixieHtmlView.
New Platform Support- Delphi VCL — Full support via Direct2D/DirectWrite backend.
- Delphi FMX — Works on Windows, macOS, iOS, and Android via FMX Canvas with TrueType-based font metrics.
- Qt4/ Qt5 / Qt6 — QPainter backend with native gradient support. A single unit handles Qt4, Qt5 and Qt6.
- GTK3 — The Cairo/Pango backend now supports GTK3 in addition to GTK2.
All drawing uses sub-pixel rendering, alpha blending, and hardware acceleration where available.
PDF ExportExport any HTML content to multi-page PDF with
TPixiePdfExport:
- TrueType font embedding with glyph subsetting — text is searchable and selectable
- Images, borders, backgrounds, linear/radial gradients, opacity
- SVG rendered as vector Form XObjects (not rasterised)
- Font fallback for CJK and emoji
- Configurable page size (A4, Letter, Legal, custom) and margins
- Standalone SVG-to-PDF export (detects SVG input automatically)
SVG RenderingA unified built-in SVG renderer now works identically across all platforms — no external dependencies (no librsvg, no native D2D SVG):
- All basic shapes: rect, circle, ellipse, line, polyline, polygon
- Full path commands: M, L, H, V, C, S, Q, T, A, Z
- linearGradient and radialGradient with stops, units, and transforms
- <use>/<symbol> element reuse and <clipPath> clipping
- viewBox with overflow clipping, opacity, transforms
- Text rendering with text-anchor alignment
New CSS Features- calc() — Arithmetic expressions in property values
- opacity — With platform transparency layers (D2D, Cairo, CoreGraphics, FMX, Qt)
- display: flow-root — Block-level BFC
- overflow-wrap / word-wrap
- Grid minmax() — Content-based min with fr max in track sizing
- background-repeat — Proper tiling with pixel-snapped seams
- background-attachment — scroll vs fixed
- text-decoration — Moved to element-level for continuous inline spanning; style support (solid, dashed, etc.)
- ::before / ::after — Pseudo-element creation with content property
- sub / super — Vertical-align shift
- Self-collapsing margins — Per CSS 2.2 §8.3.1
- -webkit-center / -moz-center — Block-level child centring
Interaction Improvements- Per-character text selection — Click and drag selects individual characters; double-click drag extends by whole words
- Ctrl+A / Cmd+A — Select all text
- Auto-scroll — Drag selection near viewport edges scrolls automatically
- Interactive scrollbar — Thumb drag, track page-up/down, configurable appearance (width, colours), auto-show/hide with fade
- Home / End keys — Scroll to top/bottom
- IME support — Candidate window positioning for CJK input on Windows (IMM32), Linux GTK2/3, and Qt
- Anchor scrolling — #fragment links scroll to target with inertia suppression
- OnScrollChanged event — For external scrollbar synchronisation
- BorderStyle property
- New elements — <details>/<summary> toggle, <input type="button">, OL/UL type attribute
Performance- MeasureText cache — Two-level dictionary at the canvas base class. Halves first-render time on large documents and significantly speeds up PDF export.
- String allocation reductions throughout (StrLComp, SameText, optimised hex/UTF-8 parsing)
- HTML charset detection via spec prescan algorithm with automatic UTF-8 conversion
Bug Fixes- Hover/active pseudo-class repainting on ancestor elements
- Click events firing correctly for ancestor/descendant pairs
- Font alias mappings matching Chromium/Firefox behaviour
- HiDPI: system scale factor applied, media queries use CSS pixels
- Line-height inheritance preserves px units
- Border-collapse pixel snapping, margin collapsing through wrappers
- Flex layout and PDF gradient divide-by-zero guards
- <br> line height and <script> phantom render items
- SVG rendering on comma-decimal locales
- PDF emoji (supplementary-plane) with UTF-16 surrogate pairs
- WIC use-after-free crash in D2D image loading
- Percent-encoded file paths in URLs and CSS imports
The updated demo is available for download from the
home page and here is a screenshot of the new TPixiePaintBox: