Skip to content

Commit

Permalink
Merge pull request #137 from schaumtier/main
Browse files Browse the repository at this point in the history
fixed source code format
  • Loading branch information
gabm authored Dec 19, 2024
2 parents cb3dd60 + 488b915 commit a6e195b
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 4 deletions.
16 changes: 14 additions & 2 deletions src/tools/blur.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,13 @@ impl Drawable for Blur {

// make rect
let mut path = Path::new();
path.rounded_rect(self.top_left.x, self.top_left.y, size.x, size.y, Size::Medium.to_corner_radius());
path.rounded_rect(
self.top_left.x,
self.top_left.y,
size.x,
size.y,
Size::Medium.to_corner_radius(),
);

// draw
canvas.stroke_path(&path, &paint);
Expand All @@ -97,7 +103,13 @@ impl Drawable for Blur {
}

let mut path = Path::new();
path.rounded_rect(pos.x, pos.y, size.x, size.y, Size::Medium.to_corner_radius());
path.rounded_rect(
pos.x,
pos.y,
size.x,
size.y,
Size::Medium.to_corner_radius(),
);

canvas.fill_path(
&path,
Expand Down
8 changes: 7 additions & 1 deletion src/tools/highlight.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,13 @@ impl Highlight for Highlighter<BlockHighlight> {
let (pos, size) = math::rect_ensure_positive_size(self.data.top_left, size);

let mut shadow_path = Path::new();
shadow_path.rounded_rect(pos.x, pos.y, size.x, size.y, Size::Medium.to_corner_radius());
shadow_path.rounded_rect(
pos.x,
pos.y,
size.x,
size.y,
Size::Medium.to_corner_radius(),
);

let shadow_paint = Paint::color(femtovg::Color::rgba(
self.style.color.r,
Expand Down
8 changes: 7 additions & 1 deletion src/tools/rectangle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,13 @@ impl Drawable for Rectangle {

canvas.save();
let mut path = Path::new();
path.rounded_rect(self.top_left.x, self.top_left.y, size.x, size.y, Size::Medium.to_corner_radius());
path.rounded_rect(
self.top_left.x,
self.top_left.y,
size.x,
size.y,
Size::Medium.to_corner_radius(),
);

if self.style.fill {
canvas.fill_path(&path, &self.style.into());
Expand Down

0 comments on commit a6e195b

Please sign in to comment.