colours : ColourMap,
}
-const SELECT_SCALE : f64 = 1.1;
+pub const SELECT_SCALE : f64 = 1.1;
#[derive(Copy,Clone,Debug,Error,Serialize,Deserialize)]
pub enum SVGProcessingError {
#[typetag::serde(name="Circle")]
impl Outline for Circle {
+ #[throws(IE)]
+ fn surround_path(&self, _pri : &PieceRenderInstructions) -> Html {
+ svg_circle_path(self.diam * SELECT_SCALE)?
+ }
+ #[throws(IE)]
+ fn thresh_dragraise(&self, _pri : &PieceRenderInstructions)
+ -> Option<Coord> {
+ Some(self.diam / 2)
+ }
}
#[derive(Deserialize,Debug)]
impl OutlineDefn for CircleDefn {
#[throws(LibraryLoadError)]
fn check(&self, lgd: &GroupData) { Self::get_size(lgd)?; }
+ #[throws(InternalError)]
fn load(&self, lgd: &GroupData) -> Box<dyn Outline> {
Box::new(Circle {
diam: Self::get_size(lgd).unrap()