Crate rect_iter[−][src]
This crate provides simple Iterator for enumerating rectangle.
Example
extern crate rect_iter; extern crate euclid; use euclid::TypedVector2D; use rect_iter::{RectRange, FromTuple2, GetMut2D}; type MyVec = TypedVector2D<u64, ()>; fn main() { let range = RectRange::from_ranges(4..9, 5..10).unwrap(); let mut buffer = vec![vec![0.0; 100]; 100]; range.iter().for_each(|t| { let len = MyVec::from_tuple2(t).to_f64().length(); *buffer.get_mut_p(t) = len; }); }
Structs
| RectIter |
An Iterator type enumerating rectangle area. |
| RectRange |
RectRange is rectangle representation using |
Enums
| IndexError |
Error type for invalid access to 2D array. |
Traits
| FromTuple2 |
To manipulate many Point libraries in the same way, we use tuple as entry points of API. |
| Get2D |
A trait which provides common access interfaces to 2D Array type. |
| GetMut2D | |
| IntoTuple2 |
To manipulate many Point libraries in the same way, we use tuple as a entry point of API. If you implement IntoTuple2 to your point type, you can use it as Point in this library. |
Functions
| copy_rect | |
| copy_rect_conv | |
| gen_rect | |
| gen_rect_conv |