pub struct PlacedSymbol {Show 31 fields
pub id: String,
pub layer_id: Option<String>,
pub source_id: Option<String>,
pub source_layer: Option<String>,
pub source_tile: Option<TileId>,
pub feature_id: String,
pub feature_index: usize,
pub placement: SymbolPlacement,
pub anchor: GeoCoord,
pub world_anchor: [f64; 3],
pub text: Option<String>,
pub icon_image: Option<String>,
pub font_stack: String,
pub cross_tile_id: String,
pub rotation_rad: f32,
pub collision_box: SymbolCollisionBox,
pub anchor_mode: SymbolAnchor,
pub writing_mode: SymbolWritingMode,
pub offset_px: [f32; 2],
pub radial_offset: Option<f32>,
pub text_max_width: Option<f32>,
pub text_line_height: Option<f32>,
pub text_letter_spacing: Option<f32>,
pub icon_text_fit: SymbolIconTextFit,
pub icon_text_fit_padding: [f32; 4],
pub size_px: f32,
pub fill_color: [f32; 4],
pub halo_color: [f32; 4],
pub opacity: f32,
pub visible: bool,
pub glyph_quads: Vec<GlyphQuad>,
}Expand description
A placed symbol after collision resolution.
Fields§
§id: StringStable symbol id.
layer_id: Option<String>Originating style/runtime layer id, when known.
source_id: Option<String>Originating style source id, when known.
source_layer: Option<String>Originating style source-layer id, when known.
source_tile: Option<TileId>Tile that supplied the symbol feature, when known.
feature_id: StringStable feature id for feature-state and queries.
feature_index: usizeSource-local feature index.
placement: SymbolPlacementWhether this symbol is point-placed or line-placed.
anchor: GeoCoordGeographic anchor point.
world_anchor: [f64; 3]World-space anchor point.
text: Option<String>Optional text content.
icon_image: Option<String>Optional icon image id.
font_stack: StringFont stack for text rendering.
cross_tile_id: StringStable cross-tile identity.
rotation_rad: f32Clockwise screen-space rotation in radians for rendering.
collision_box: SymbolCollisionBoxCollision box used during placement.
anchor_mode: SymbolAnchorSelected anchor used for this placement.
writing_mode: SymbolWritingModeWriting mode used for this placement.
offset_px: [f32; 2]Pixel-space offset applied during placement.
radial_offset: Option<f32>Optional radial offset measured in symbol-size units.
text_max_width: Option<f32>Maximum point-label width before wrapping.
text_line_height: Option<f32>Preferred wrapped text line height.
text_letter_spacing: Option<f32>Extra spacing between adjacent glyphs.
icon_text_fit: SymbolIconTextFitIcon sizing mode relative to the text box.
icon_text_fit_padding: [f32; 4]Padding applied when fitting the icon around text.
size_px: f32Nominal symbol size in pixels.
fill_color: [f32; 4]Placeholder fill colour used by current renderers.
halo_color: [f32; 4]Placeholder halo colour used by current renderers.
opacity: f32Fade opacity in [0, 1].
visible: boolWhether the symbol survived collision placement this frame.
glyph_quads: Vec<GlyphQuad>Pre-computed glyph positions relative to the symbol anchor (pixels).
Populated by layout_symbol_glyphs. When non-empty the renderer
uses these quads directly; when empty it falls back to naive
character-by-character layout.
Implementations§
Source§impl PlacedSymbol
impl PlacedSymbol
Sourcepub fn dependencies(&self) -> SymbolAssetDependencies
pub fn dependencies(&self) -> SymbolAssetDependencies
Asset dependencies required by this placed symbol.
Trait Implementations§
Source§impl Clone for PlacedSymbol
impl Clone for PlacedSymbol
Source§fn clone(&self) -> PlacedSymbol
fn clone(&self) -> PlacedSymbol
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more