Struct graphics::grid::Grid [−][src]
Represents a flat grid with square cells.
Fields
cols: u32
Number of columns.
rows: u32
Number of rows.
units: Scalar
The width and height of each grid cell.
Methods
impl Grid[src]
impl Gridpub fn draw<G>(
&self,
line: &Line,
draw_state: &DrawState,
transform: Matrix2d,
g: &mut G
) where
G: Graphics, [src]
pub fn draw<G>(
&self,
line: &Line,
draw_state: &DrawState,
transform: Matrix2d,
g: &mut G
) where
G: Graphics, Draws the grid.
ⓘImportant traits for GridCellspub fn cells(&self) -> GridCells[src]
ⓘImportant traits for GridCells
pub fn cells(&self) -> GridCellsGet a GridIterator for the grid
pub fn cell_position(&self, cell: (u32, u32)) -> Vec2d[src]
pub fn cell_position(&self, cell: (u32, u32)) -> Vec2dGet on-screen position of a grid cell
pub fn x_pos(&self, cell: (u32, u32)) -> Scalar[src]
pub fn x_pos(&self, cell: (u32, u32)) -> ScalarGet on-screen x position of a grid cell
pub fn y_pos(&self, cell: (u32, u32)) -> Scalar[src]
pub fn y_pos(&self, cell: (u32, u32)) -> ScalarGet on-screen y position of a grid cell
Trait Implementations
impl Debug for Grid[src]
impl Debug for Gridfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Copy for Grid[src]
impl Copy for Gridimpl Clone for Grid[src]
impl Clone for Grid