Module pictures
Expand description
The pictures a window’s components show: each [Picture] as the toolkit’s decoded image.
A picture is an address ([Picture::src]): a content address (tilo-blob://<hash>) whose
bytes are read from the window’s content store, or any other address an image store fetches.
Pictures::window is the window’s own, which every component showing a picture reads:
the process’s content store answers a content address, and a host that serves the window’s
image stores (crate::ImageStore::serve_window) answers for it instead, as it does for
every picture in a web page.
A picture whose bytes are not here yet keeps its place: the component paints its placeholder
until Pictures::get answers, and an address that cannot be read fails visibly, as any
other image does.
Structs§
- Pictures
- What a component showing a picture reads: the store its bytes load through (which caches a decoded picture by its address), and what a window’s pictures are.
- Shown
- One picture a widget shows, by its address: loaded through the window’s pictures the first
frame it is here, and kept while the address stays. A widget holds one and reads it from
syncanddraw.
Constants§
- BLOB_
SCHEME - How an app names a picture by its content address.
Functions§
- data_
bytes - The bytes a
data:address carries (data:image/png;base64,<data>), when it is one: a picture that travels in its own address, which a document or a demo can hold.