pub struct CanvasSource {
pub coordinates: [GeoCoord; 4],
pub factory: FrameProviderFactory,
pub animate: bool,
}Expand description
Canvas source — georeferenced dynamic overlay driven by a
FrameProvider.
This is the Rustial equivalent of MapLibre / Mapbox canvas source.
In the browser, a <canvas> element supplies frames; in Rustial the
user supplies a FrameProviderFactory that creates a
FrameProvider for each style
application.
The animate flag controls whether the source re-reads its provider
each frame. Set it to false for static canvas content to avoid
unnecessary GPU re-uploads.
Fields§
§coordinates: [GeoCoord; 4]Geographic corner coordinates (TL, TR, BR, BL).
factory: FrameProviderFactoryFactory used to build a fresh frame provider when the style is applied.
animate: boolWhether this canvas source animates (polls each frame).
Defaults to true.
Implementations§
Source§impl CanvasSource
impl CanvasSource
Trait Implementations§
Source§impl Clone for CanvasSource
impl Clone for CanvasSource
Source§fn clone(&self) -> CanvasSource
fn clone(&self) -> CanvasSource
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CanvasSource
impl !RefUnwindSafe for CanvasSource
impl Send for CanvasSource
impl Sync for CanvasSource
impl Unpin for CanvasSource
impl UnsafeUnpin for CanvasSource
impl !UnwindSafe for CanvasSource
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more