pub enum Template {
Image(ImageTemplate),
Map(MapTemplate),
Track(TrackTemplate),
Gdal(GdalTemplate),
Ogr(OgrTemplate),
}Expand description
A template attached to the map. Each variant carries type-specific data.
Variants§
Image(ImageTemplate)
A raster image template.
Map(MapTemplate)
A map file template.
Track(TrackTemplate)
A GPS track template.
Gdal(GdalTemplate)
A geospatial raster data template via GDAL.
Ogr(OgrTemplate)
A geospatial vector data template via OGR.
Implementations§
Source§impl Template
impl Template
Sourcepub fn get_common(&self) -> &TemplateCommon
pub fn get_common(&self) -> &TemplateCommon
Get the common properties shared by all template types.
Sourcepub fn get_common_mut(&mut self) -> &mut TemplateCommon
pub fn get_common_mut(&mut self) -> &mut TemplateCommon
Get the mutable common properties shared by all template types.
Sourcepub fn apply_affine(&mut self, transform: &AffineMapTransform)
pub fn apply_affine(&mut self, transform: &AffineMapTransform)
Apply an affine map-coordinate transform to a non-georeferenced template.
Georeferenced templates are left unchanged because their placement is derived from CRS metadata. For non-georeferenced templates, map-space transform parameters and passpoint map coordinates are transformed, and the adjustment state is marked dirty.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Template
impl RefUnwindSafe for Template
impl Send for Template
impl Sync for Template
impl Unpin for Template
impl UnsafeUnpin for Template
impl UnwindSafe for Template
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more