Skip to content

Commit

Permalink
Adding resize() method to Circle
Browse files Browse the repository at this point in the history
  • Loading branch information
gmadrid committed Jan 5, 2023
1 parent bf40c8b commit efa9840
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/shapes/circle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ pub struct Circle {
}

impl Circle {
// pub fn circle(radius: Unit, x: Unit, y: Unit) -> Circle {
// Circle { radius, x, y }
// }

pub fn at_zero(radius: Unit) -> Circle {
Circle {
radius,
Expand All @@ -32,6 +28,10 @@ impl Circle {
pub fn move_to(&self, x: Unit, y: Unit) -> Circle {
Circle { x, y, ..*self }
}

pub fn resize(&self, radius: Unit) -> Circle {
Circle { radius, ..*self }
}
}

impl ToPdfLine for Circle {
Expand Down

0 comments on commit efa9840

Please sign in to comment.