Art
The derived square, the same on every device for one name, and the real picture over it once it arrives.
Desktop
arkui::art · arkui::images


hash("Harbour") | 0x18c796a8 |
hash("Orchard") | 0x453dd45c |
hash("Meadow") | 0x3414a0a0 |
hash("Summit") | 0x30ebf7a2 |
hash("Delta") | 0x3cfbfec1 |
hash("Lagoon") | 0x7a931765 |
arkui::images is how every picture an app shows arrives; until it has, the derived square is what a picture shows.
arkui::art
The derived square: a gradient picked from a name, the same on every device, and the real picture over it once it arrives.
hash(s) (FNV-1a over UTF-16)pair(seed)square(seed, size, corner)picture(seed, handle, side, corner)
Rules
- The hash is the phones' too, so a name has one square everywhere.
arkui::images
A picture cache: fetched off the render thread, decoded and bounded, kept on disk natively and in the Cache API in a browser. A failure is remembered.
Images::new(name)want(url) -> Option<Task<Loaded>>loaded(l), handle(url), bounded(url)Loaded, RgbaBOUND (384), WIDE (2400)
Rules
- The renderer is handed pixels at the size they are drawn, not a megapixel JPEG to decode inside a frame.
Mobile
Asking for the latest capture…
Where
ui/Art.kt: Art, Square, Cover
How
- Square(seed, modifier)
- Cover(seed, art, side, modifier, round = false, corner = Space.corner): the square until the picture loads.
- Art.hash is FNV-1a over UTF-16, the desktop's.
Asking for the latest capture…
Where
swift/ArkUI: Square, Art (ArkUICore)
How
- Square(seed:): the same square for the same name as Android's and the desktop's.
- Art.hash and Art.pick are in ArkUICore, which needs only Foundation.
Asking for the latest capture…
Asking for the latest capture…