Skip to content

Commit

Permalink
core: Readd max(0) to blur size
Browse files Browse the repository at this point in the history
  • Loading branch information
Dinnerbone committed Aug 12, 2023
1 parent adda667 commit f2ca88b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions swf/src/types/blur_filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ impl BlurFilter {

pub fn calculate_dest_rect(&self, source_rect: Rectangle<Twips>) -> Rectangle<Twips> {
let scale = PASS_SCALES[self.num_passes().clamp(1, 15) as usize - 1];
let x = Twips::from_pixels(scale * self.blur_x.to_f64());
let y = Twips::from_pixels(scale * self.blur_y.to_f64());
let x = Twips::from_pixels((scale * self.blur_x.to_f64()).max(0.0));
let y = Twips::from_pixels((scale * self.blur_y.to_f64()).max(0.0));
Rectangle {
x_min: source_rect.x_min - x,
x_max: source_rect.x_max + x,
Expand Down

0 comments on commit f2ca88b

Please sign in to comment.