Render Intelligent-only components; fonts follow the display direction
- SLText, TextSelect, DataRecord, FileBrowser pixel-exact against the Intelligent simulator; ComboBox and Switch with approximate anti-aliased edges; media/file components draw nothing - fonts: header byte 3 = 0x0A + direction, glyphs in the direction's pixel order, Intelligent glyph data 4-byte aligned -- reproduces the Editor's own font conversion byte for byte - Intelligent 3D frames: left edge drawn over the bottom edge Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
56062e1a3e
commit
49fee337d7
10 files changed
+334
-32
No files matched your search
@@ -36,11 +36,40 @@ Per component (dedicated test pages):
|
||||
| QR code (byte/alphanumeric/numeric text, versions 1-8, margins, colours, logo, Latin-1) | 100 % | own encoder (`nxhmi.qr`), see below |
|
||||
| hotspot, touch cap, timer, variable | nothing drawn (same as the Editor) | |
|
||||
|
||||
Intelligent-only components, checked against the **Intelligent simulator** (5 test pages, 23
|
||||
TextSelects, several of each other type):
|
||||
|
||||
| Component | Match | Notes |
|
||||
|---|---|---|
|
||||
| SLText | 100 % | text from the top-left inside the frame |
|
||||
| TextSelect (hig, val, borders, fonts, cut cells) | 100 % | see rules below |
|
||||
| DataRecord (header, 1-5 columns, styles) | 100 % | records only exist at run time |
|
||||
| FileBrowser | 100 % | frame and fill; the file list only exists at run time |
|
||||
| ExPicture, video, audio, Gmov, FileStream | nothing drawn (same as the simulator) | they show content only once a file is loaded |
|
||||
| ComboBox | ~99 % | structure exact; anti-aliased corners and arrow approximate |
|
||||
| Switch | ~88-97 % | structure exact; anti-aliased knob and track edges approximate |
|
||||
|
||||
## Rules learned from the Editor
|
||||
|
||||
- Colours: RGB565 is expanded differently per series. Basic replicates the top bits
|
||||
(`r<<3 | r>>2`); Intelligent scales (`r*255//31`, `g*255//63`), so `0xC618` shows as
|
||||
(198,195,198) on Basic and (197,194,197) on Intelligent.
|
||||
- Intelligent 3D frames draw the left edge after the bottom one (dark bottom-left corner on
|
||||
3D down); Basic draws it the other way round.
|
||||
- TextSelect: items (`path`, CR LF separated) in cells of `hig` rows inside the frame; the
|
||||
selected cell starts at `iy + (ih - hig) // 2` and its two `pco1` lines are mirrored
|
||||
(`top` and `iy + ih - 1 - (ih - hig) // 2`); selected text `pco2`, others `pco`; `val` out
|
||||
of range selects item 0; the list wraps around. Text is centred in its full cell and clipped
|
||||
to the frame; a cell cut by the *screen* bottom centres in the part on screen. Rows within
|
||||
`hig` of the top/bottom edge fade into `bco`: 7-bit alpha `(127 // hig) * d`, blended
|
||||
`(fg*a + bg*(127-a)) // 127`.
|
||||
- DataRecord: `dez` columns named by `dir` (`^`-separated); column lines in `gdc` every
|
||||
`(iw - 1) // dez` px, the last `(iw - 1) % dez` columns one px wider; header `hig` rows in
|
||||
`bco1`, names in `pco1` placed by `xcen`, vertically centred.
|
||||
- Switch: track `bco`/`bco2` (on), knob `pco`/`pco2`, text `txt` = "off/on" in `pco1` centred in
|
||||
`[h, w)` (off) or `[0, w-h)` (on). ComboBox: text placed by `xcen`/`ycen` over the whole box,
|
||||
`pco3` arrow `wid` px wide 4.5 px from the right edge. Corner radius for both: `dis * h // 200`,
|
||||
square below 3 px; rounded shapes are inset half a pixel (outer ring 50 %, blended linearly).
|
||||
- Intelligent pictures with alpha (format 4, 7-bit alpha `a`): 8-bit alpha is `2*a` (127 = 255),
|
||||
blended as `bg + round((src - bg) * alpha / 255)` per channel. Exact against the Intelligent
|
||||
simulator (342 samples). The Editor *canvas* blends slightly differently (up to 3 levels off at
|
||||
|
||||
Reference in new issue
Block a user