dice will use this to decide their own outline.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
fn outline_path(&self, scale: f64) -> Result<Html, IE>;
fn thresh_dragraise(&self) -> Result<Option<Coord>, IE>;
fn bbox_approx(&self) -> Result<Rect, IE>;
+ fn shape(&self) -> Option<Shape>;
}
}
}
fn outline_path(&self, scale: f64) -> Result<Html, IE>;
fn thresh_dragraise(&self) -> Result<Option<Coord>, IE>;
fn bbox_approx(&self) -> Result<Rect, IE>;
+ fn shape(&self) -> Option<Shape>;
}
}
}
}
fn thresh_dragraise(&self) -> Result<Option<Coord>, IE>;
fn bbox_approx(&self) -> Result<Rect, IE>;
+ fn shape(&self) -> Option<Shape>; // None means not a sane shape
}
#[derive(Debug,Copy,Clone,Serialize,Deserialize)]
let d = (self.diam * 0.5).round() as Coord;
Rect{ corners: [PosC::new(-d,-d), PosC::new(d, d)]}
}
+ fn shape(&self) -> Option<Shape> { Some(Shape::Circle) }
}
//---------- RectOutline ----------
let neg = (-pos)?;
Rect{ corners: [ neg, pos ] }
}
+ fn shape(&self) -> Option<Shape> { Some(Shape::Rect) }
}