Trait pizarra::shape::ShapeStored [−][src]
pub trait ShapeStored: Debug {
fn draw_commands(&self) -> DrawCommand;
fn bbox(&self) -> [Vec2DWorld; 2];
fn shape_type(&self) -> ShapeType;
fn intersects_circle(&self, center: Vec2DWorld, radius: f64) -> bool;
fn color(&self) -> Color;
}
Required methods
fn draw_commands(&self) -> DrawCommand
fn draw_commands(&self) -> DrawCommand
return the commands needed to draw this shape
fn bbox(&self) -> [Vec2DWorld; 2]
fn bbox(&self) -> [Vec2DWorld; 2]
Must know its bbox
fn shape_type(&self) -> ShapeType
fn shape_type(&self) -> ShapeType
Returns the current shape type
fn intersects_circle(&self, center: Vec2DWorld, radius: f64) -> bool
fn intersects_circle(&self, center: Vec2DWorld, radius: f64) -> bool
does this circle intersect this shape? Used by the eraser