fn draw_selection(&self, ctx: &CanvasRenderingContext2d) -> Result<(), JsValue> {
        ctx.begin_path();
        ctx.set_stroke_style(&JsValue::from_str("#00ff00"));
        ctx.ellipse(
            self.rect.center_x(),
            self.rect.center_y(),
            self.rect.w() * 0.8,
            self.rect.h() * 0.8,
            PI * 0.25,
            0.0,
            PI * 2.0,
        )?;
        ctx.stroke();
        ctx.close_path();
        Ok(())
    }
/// Indicates selection of the tower when drawn
Indicates selection of the tower when drawn
Indicates selection of the tower when drawn
fn draw_selection(&self, ctx: &CanvasRenderingContext2d) -> Result<(), JsValue> {
        ctx.begin_path();
        ctx.set_stroke_style(&JsValue::from_str("#00ff00"));
        ctx.ellipse(
            self.rect.center_x(),
            self.rect.center_y(),
            self.rect.w() * 0.8,
            self.rect.h() * 0.8,
            PI * 0.25,
            0.0,
            PI * 2.0,
        )?;
        ctx.stroke();
        ctx.close_path();
        Ok(())
    }
fn draw_selection ( & self , ctx : & CanvasRenderingContext2d ) -> Result < ( ) , JsValue > { ctx . begin_path ( ) ; ctx . set_stroke_style ( & JsValue :: from_str ( " " ) ) ; ctx . ellipse ( self . rect . center_x ( ) , self . rect . center_y ( ) , self . rect . w ( ) * 0.8 , self . rect . h ( ) * 0.8 , PI * 0.25 , 0.0 , PI * 2.0 , ) ? ; ctx . stroke ( ) ; ctx . close_path ( ) ; Ok ( ( ) ) }
Indicates selection of the tower when drawn
Indicates selection of the tower when drawn
&self
ctx
&CanvasRenderingContext2d
&self
ctx
&CanvasRenderingContext2d