Skip to main content

TileSource

Trait TileSource 

Source
pub trait TileSource {
    // Required methods
    fn size(&self) -> Option<[u32; 2]>;
    fn request(&self, requests: Vec<TileRequest>);

    // Provided method
    fn readout(&self, pixel: [i64; 2]) { ... }
}
Expand description

The application’s pixels. Every method returns at once; work happens elsewhere and comes back through the TileSink.

Required Methods§

Source

fn size(&self) -> Option<[u32; 2]>

The image’s size in pixels, None while unknown. Cheap: read on every frame.

Source

fn request(&self, requests: Vec<TileRequest>)

New tiles wanted, most useful first. Requests the viewport stops wanting get their CancelToken set.

Provided Methods§

Source

fn readout(&self, pixel: [i64; 2])

The pointer is over pixel: answer with TileSink::readout when the values are known (default: no readout).

Implementors§