Struct street_index::gridconfig::Grid[][src]

pub struct Grid {
    pub bbox: Bbox,
    pub config: GridConfig,
    // some fields omitted
}

The Grid is your street-name grid. Right now there is no support for curved / rotated / translated grids.

Usually you'll want to initialize this from the page boundaries of your final map, i.e. if you have a map that is (on paper) 290 x 210 mm wide.

The config is for future use to be extended - right now it only stores how big the cells should be. In normal cartography, grids are usually 5 x 5 centimeters (i.e. 50 x 50 mm).

Fields

Methods

impl Grid
[src]

Initializes an empty grid from a bounding box + configuration

Inserts a street and assigns a GridPosition (such as "A2" or "B4") to the road. Note that a StreetNameRect may span more than one rectangle, in which case the road name will be duplicated

Returns all the fonts in the grid that were added previously

Trait Implementations

impl Debug for Grid
[src]

Formats the value using the given formatter. Read more

impl Clone for Grid
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl Send for Grid

impl Sync for Grid