Skip to main content

burn_vision/
base.rs

1use derive_new::new;
2
3/// 2D size used for vision ops.
4#[derive(new, Clone, Copy, Debug, PartialEq, Eq, Hash)]
5pub struct Size {
6    /// Width of the element
7    pub width: usize,
8    /// Height of the element
9    pub height: usize,
10}
11
12/// 2D Point used for vision ops. Coordinates start at the top left.
13#[derive(new, Clone, Copy, Debug, PartialEq, Eq, Hash)]
14pub struct Point {
15    /// X (horizontal) coordinate
16    pub x: usize,
17    /// Y (vertical) coordinate
18    pub y: usize,
19}