Macro pix_engine::ellipse

source ·
macro_rules! ellipse {
    ($p:expr, $r:expr$(,)?) => { ... };
    ($p:expr, $width:expr, $height:expr$(,)?) => { ... };
    ($x:expr, $y:expr, $width:expr, $height:expr$(,)?) => { ... };
}
Expand description

Constructs an Ellipse at position (x, y) with width and height.

let p = point!(10, 20);
let e = ellipse!(p, 100, 200);
assert_eq!(e.x(), 10);
assert_eq!(e.y(), 20);
assert_eq!(e.width(), 100);
assert_eq!(e.height(), 200);

let e = ellipse!(10, 20, 100, 200);
assert_eq!(e.x(), 10);
assert_eq!(e.y(), 20);
assert_eq!(e.width(), 100);
assert_eq!(e.height(), 200);