Switch knob: scanline model from 42 measured sizes
Integer radius (h-1)//2 with fixed sub-pixel offsets, 4 sub-rows x 1/8 px spans, 1/32 coverage in linear light; closer to the simulator than the previous distance model on the knob test page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
0138a0ba56
commit
922ca21f0f
3 files changed
+35
-4
No files matched your search
+1
-1
@@ -94,7 +94,7 @@ byte for byte, or a file written by nxhmi was opened in the Editor and showed th
|
||||
| Item | Notes |
|
||||
|---|---|
|
||||
| Other display series | Discovery / Enhanced / Edge not sampled; only Basic + Intelligent templates |
|
||||
| Display direction | byte 12 decoded and written (`new_project(portrait=...)`); picture order verified for all four (format 4); font glyph order for 90° only |
|
||||
| Display direction | byte 12 decoded and written (`new_project(portrait=...)`); picture order verified for all four (format 4); font glyph order verified for 0° and 90° |
|
||||
| Some header fields | main.HMI bytes 8, 13, 36, 0x41; page header 21/23; entry bytes 25-27 |
|
||||
| Font name shown in the Editor's Fonts panel | cosmetic, generated fonts show an odd label |
|
||||
| Media resources | video / audio / Gmov files themselves (not just the components) |
|
||||
|
||||
+6
-1
@@ -47,7 +47,7 @@ TextSelects, several of each other type):
|
||||
| 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 |
|
||||
| Switch | ~88-97 % | structure exact; anti-aliased knob and track edges approximate (see below) |
|
||||
|
||||
## Rules learned from the Editor
|
||||
|
||||
@@ -70,6 +70,11 @@ TextSelects, several of each other type):
|
||||
`[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).
|
||||
- Switch knob (measured on 42 sizes): radius `r = (h-1)//2` with fixed sub-pixel offsets, edge
|
||||
coverage in steps of exactly 1/32 blended in linear light; the top row always holds a single
|
||||
1/4-row span, so it is a scanline rasteriser (4 sub-rows x 1/8 px). The best model found
|
||||
(centre `r + 0.625, r + 0.25`, radius `r - 0.25`, span ends rounded to 1/8) gets most edge pixels
|
||||
exact but the span widths curve more sharply than a circle, so the real routine is still open.
|
||||
- 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