pub struct LineStyleLayer {
pub meta: StyleLayerMeta,
pub source: StyleSourceId,
pub source_layer: Option<String>,
pub color: StyleValue<[f32; 4]>,
pub width: StyleValue<f32>,
pub line_cap: LineCap,
pub line_join: LineJoin,
pub miter_limit: f32,
pub dash_array: Option<Vec<f32>>,
pub line_gradient: Option<ColorRamp>,
pub line_pattern: Option<Arc<PatternImage>>,
}Expand description
Line layer style spec.
Fields§
§meta: StyleLayerMeta§source: StyleSourceId§source_layer: Option<String>Optional source-layer name for vector-tile-like sources.
color: StyleValue<[f32; 4]>§width: StyleValue<f32>§line_cap: LineCapLine cap style (default: butt).
line_join: LineJoinLine join style (default: miter).
miter_limit: f32Miter limit ratio (default: 2.0).
dash_array: Option<Vec<f32>>Optional dash pattern [dash, gap, …] in pixels.
line_gradient: Option<ColorRamp>Optional colour ramp evaluated along the line’s length.
When set, per-vertex colours are overridden by the gradient
evaluated at each vertex’s normalized distance [0, 1] along the
polyline. Replaces line-color (matching MapLibre / Mapbox
line-gradient semantics).
line_pattern: Option<Arc<PatternImage>>Optional repeating pattern image for textured line rendering.
When set, the line is rendered with a repeating pattern texture
instead of a solid colour, matching MapLibre / Mapbox
line-pattern semantics.
Implementations§
Trait Implementations§
Source§impl Clone for LineStyleLayer
impl Clone for LineStyleLayer
Source§fn clone(&self) -> LineStyleLayer
fn clone(&self) -> LineStyleLayer
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 LineStyleLayer
impl RefUnwindSafe for LineStyleLayer
impl Send for LineStyleLayer
impl Sync for LineStyleLayer
impl Unpin for LineStyleLayer
impl UnsafeUnpin for LineStyleLayer
impl UnwindSafe for LineStyleLayer
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