pub struct StyleImageOptions {
pub stretch_x: Option<Vec<ImageStretch>>,
pub stretch_y: Option<Vec<ImageStretch>>,
pub content: Option<ImageContent>,
pub text_fit_width: Option<StyleImageTextFit>,
pub text_fit_height: Option<StyleImageTextFit>,
pub pixel_ratio: Option<f32>,
pub sdf: Option<bool>,
pub keep_unused: Option<bool>,
}Expand description
Options for a style image, as the [sprite](https://maplibre.org/maplibre-style-spec/sprite/) spec describes them.
See mln_style_image_options in the
C API reference.
Fields§
§stretch_x: Option<Vec<ImageStretch>>The ranges of columns that stretch, in increasing order without overlap.
stretch_y: Option<Vec<ImageStretch>>The ranges of rows that stretch, in increasing order without overlap.
content: Option<ImageContent>§text_fit_width: Option<StyleImageTextFit>§text_fit_height: Option<StyleImageTextFit>§pixel_ratio: Option<f32>§sdf: Option<bool>§keep_unused: Option<bool>Keeps the image after no layer uses it. Without this, the map can remove
an image that it asked for through
RuntimeEventType::MapStyleImageMissing.
Trait Implementations§
Source§impl Clone for StyleImageOptions
impl Clone for StyleImageOptions
Source§fn clone(&self) -> StyleImageOptions
fn clone(&self) -> StyleImageOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StyleImageOptions
impl Debug for StyleImageOptions
Source§impl Default for StyleImageOptions
impl Default for StyleImageOptions
Source§fn default() -> StyleImageOptions
fn default() -> StyleImageOptions
Returns the “default value” for a type. Read more
Source§impl PartialEq for StyleImageOptions
impl PartialEq for StyleImageOptions
impl StructuralPartialEq for StyleImageOptions
Auto Trait Implementations§
impl Freeze for StyleImageOptions
impl RefUnwindSafe for StyleImageOptions
impl Send for StyleImageOptions
impl Sync for StyleImageOptions
impl Unpin for StyleImageOptions
impl UnsafeUnpin for StyleImageOptions
impl UnwindSafe for StyleImageOptions
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,
impl<T> ErasedDestructor for Twhere
T: 'static,
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