Struct street_index::gridconfig::StreetNameRect [−][src]
pub struct StreetNameRect { pub street_name: String, pub x_from_left: Millimeter, pub y_from_top: Millimeter, pub width: Millimeter, pub height: Millimeter, }
Represents one street name, layouted on the map. The StreetNameRect
should be the extent of the font, not of the road itself, because
if someone is searching for a road on a map, he will usually scan for the
name of the road, not the line of the road. So inserting the extents
of the actual road line could lead to problems.
Calculating these extents should be done via RustType / FreeType or similar, depending on what font you choose. The bounding box should be the minimumn bounding rectangle of the characters that make up the street name.
For cartographic projections, you have to project the
fonts into this coordinate space before adding them, obviously.
street_index
does not take care of any geographic reprojections.
Fields
street_name: String
x_from_left: Millimeter
y_from_top: Millimeter
width: Millimeter
height: Millimeter
Trait Implementations
impl Debug for StreetNameRect
[src]
impl Debug for StreetNameRect
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for StreetNameRect
[src]
impl Clone for StreetNameRect
fn clone(&self) -> StreetNameRect
[src]
fn clone(&self) -> StreetNameRect
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl Send for StreetNameRect
impl Send for StreetNameRect
impl Sync for StreetNameRect
impl Sync for StreetNameRect