pub struct StyleRenderer;Expand description
Evaluates paint properties and filters at runtime.
Implementations§
Source§impl StyleRenderer
impl StyleRenderer
Sourcepub fn eval_zoom_color(value: &PropertyValue<Color>, zoom: f64) -> Color
pub fn eval_zoom_color(value: &PropertyValue<Color>, zoom: f64) -> Color
Evaluate a PropertyValue<Color> at a given zoom level.
Returns the literal color or the result of evaluating an interpolation expression; falls back to opaque black for complex expressions not yet handled by this evaluator.
Sourcepub fn eval_zoom_f64(value: &PropertyValue<f64>, zoom: f64) -> f64
pub fn eval_zoom_f64(value: &PropertyValue<f64>, zoom: f64) -> f64
Evaluate a PropertyValue<f64> at a given zoom level.
Supports Literal, Expression::Zoom, and Expression::Interpolate
with Linear and Exponential interpolation. Returns 0.0 for
unrecognised expressions.
Auto Trait Implementations§
impl Freeze for StyleRenderer
impl RefUnwindSafe for StyleRenderer
impl Send for StyleRenderer
impl Sync for StyleRenderer
impl Unpin for StyleRenderer
impl UnsafeUnpin for StyleRenderer
impl UnwindSafe for StyleRenderer
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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