Struct SymbolLayout

Source
pub struct SymbolLayout {
Show 25 fields pub layer_paint_properties: BTreeMap<String, LayerProperties>, pub bucket_leader_id: String, pub symbol_instances: Vec<SymbolInstance>, pub sort_key_ranges: Vec<SortKeyRange>, source_layer: Box<SymbolGeometryTileLayer>, overscaling: f64, zoom: f64, canonical_id: CanonicalTileID, mode: MapMode, pixel_ratio: f64, tile_size: u32, tile_pixel_ratio: f64, icons_need_linear: bool, sort_features_by_y: bool, sort_features_by_key: bool, allow_vertical_placement: bool, icons_in_text: bool, placement_modes: Vec<TextWritingModeType>, text_size: <TextSize as DataDrivenLayoutProperty>::UnevaluatedType, icon_size: <IconSize as DataDrivenLayoutProperty>::UnevaluatedType, text_radial_offset: <TextRadialOffset as DataDrivenLayoutProperty>::UnevaluatedType, layout: SymbolLayoutProperties_PossiblyEvaluated, features: Vec<SymbolGeometryTileFeature>, bidi: BiDi, compare_text: BTreeMap<U16String, Vec<Anchor>>,
}
Expand description

maplibre/maplibre-native#4add9ea original name: SymbolLayout

Fields§

§layer_paint_properties: BTreeMap<String, LayerProperties>§bucket_leader_id: String§symbol_instances: Vec<SymbolInstance>§sort_key_ranges: Vec<SortKeyRange>§source_layer: Box<SymbolGeometryTileLayer>§overscaling: f64§zoom: f64§canonical_id: CanonicalTileID§mode: MapMode§pixel_ratio: f64§tile_size: u32§tile_pixel_ratio: f64§icons_need_linear: bool§sort_features_by_y: bool§sort_features_by_key: bool§allow_vertical_placement: bool§icons_in_text: bool§placement_modes: Vec<TextWritingModeType>§text_size: <TextSize as DataDrivenLayoutProperty>::UnevaluatedType§icon_size: <IconSize as DataDrivenLayoutProperty>::UnevaluatedType§text_radial_offset: <TextRadialOffset as DataDrivenLayoutProperty>::UnevaluatedType§layout: SymbolLayoutProperties_PossiblyEvaluated§features: Vec<SymbolGeometryTileFeature>§bidi: BiDi§compare_text: BTreeMap<U16String, Vec<Anchor>>

Implementations§

Source§

impl SymbolLayout

Source

pub const INVALID_OFFSET_VALUE: f64 = 1.7976931348623157E+308f64

Source

pub fn new( parameters: &BucketParameters, layers: &Vec<LayerProperties>, source_layer: Box<SymbolGeometryTileLayer>, layout_parameters: &mut LayoutParameters<'_>, ) -> Option<Self>

maplibre/maplibre-native#4add9ea original name: new

Source

pub fn prepare_symbols( &mut self, glyph_map: &BTreeMap<u64, BTreeMap<u16, Option<Glyph>>>, glyph_positions: &BTreeMap<u64, BTreeMap<u16, GlyphPosition>>, image_map: &HashMap<String, Image>, image_positions: &HashMap<String, ImagePosition>, )

maplibre/maplibre-native#4add9ea original name: prepareSymbols

Source

pub fn create_bucket( &self, _image_positions: HashMap<String, ImagePosition>, _feature_index: Box<FeatureIndex>, render_data: &mut HashMap<String, LayerRenderData>, first_load: bool, show_collision_boxes: bool, canonical: &CanonicalTileID, )

maplibre/maplibre-native#4add9ea original name: createBucket

Source

fn has_symbol_instances(&self) -> bool

maplibre/maplibre-native#4add9ea original name: hasSymbolInstances

Source

fn has_dependencies(&self) -> bool

maplibre/maplibre-native#4add9ea original name: hasDependencies

Source

pub fn evaluate_variable_offset( anchor: SymbolAnchorType, offset: [f64; 2], ) -> [f64; 2]

@brief Calculates variable text offset.

@param anchor text anchor @param textOffset Either text-offset or [ text-radial-offset, INVALID_OFFSET_VALUE ] @return std::array<f64, 2> offset along x- and y- axis correspondingly. maplibre/maplibre-native#4add9ea original name: evaluateVariableOffset

Source

pub fn calculate_tile_distances( line: &GeometryCoordinates, anchor: &Anchor, ) -> Vec<f64>

maplibre/maplibre-native#4add9ea original name: calculateTileDistances

Source§

impl SymbolLayout

Source

fn add_feature( &mut self, layout_feature_index: usize, feature: &SymbolGeometryTileFeature, shaped_text_orientations: &ShapedTextOrientations, shaped_icon: Option<PositionedIcon>, image_map: &HashMap<String, Image>, text_offset: [f64; 2], layout_text_size: f64, layout_icon_size: f64, icon_type: SymbolContent, )

maplibre/maplibre-native#4add9ea original name: addFeature

Source

fn anchor_is_too_close( &mut self, text: &U16String, repeat_distance: f64, anchor: &Anchor, ) -> bool

maplibre/maplibre-native#4add9ea original name: anchorIsTooClose

Source

fn add_to_debug_buffers(&self, bucket: &mut SymbolBucket)

maplibre/maplibre-native#4add9ea original name: addToDebugBuffers

Source

fn add_symbol( &self, buffer: &mut SymbolBucketBuffer, size_data: Range<f64>, symbol: &SymbolQuad, label_anchor: &Anchor, sort_key: f64, ) -> usize

maplibre/maplibre-native#4add9ea original name: addSymbol

Source

fn add_symbols( &self, buffer: &mut SymbolBucketBuffer, size_data: Range<f64>, symbols: &Vec<SymbolQuad>, label_anchor: &Anchor, placed_symbol: &mut PlacedSymbol, sort_key: f64, ) -> usize

maplibre/maplibre-native#4add9ea original name: addSymbols

Source

fn add_symbol_glyph_quads( &self, bucket: &mut SymbolBucket, symbol_instance: &SymbolInstance, feature: &SymbolGeometryTileFeature, writing_mode: WritingModeType, placed_index: Option<usize>, glyph_quads: &Vec<SymbolQuad>, canonical: &CanonicalTileID, last_added_section: Option<usize>, ) -> (usize, Option<usize>)

maplibre/maplibre-native#4add9ea original name: addSymbolGlyphQuads

Source

fn update_paint_properties_for_section( &self, bucket: &SymbolBucket, feature: &SymbolGeometryTileFeature, section_index: usize, canonical: &CanonicalTileID, ) -> usize

maplibre/maplibre-native#4add9ea original name: updatePaintPropertiesForSection

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Downcast<T> for T

§

fn downcast(&self) -> &T

§

impl<T> Downcast for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> Upcast<T> for T

§

fn upcast(&self) -> Option<&T>

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<G1, G2> Within<G2> for G1
where G2: Contains<G1>,

§

fn is_within(&self, b: &G2) -> bool

Source§

impl<T> Resource for T
where T: 'static,