diff --git a/swf/src/types/bevel_filter.rs b/swf/src/types/bevel_filter.rs index 0d736b59b..7f00d3113 100644 --- a/swf/src/types/bevel_filter.rs +++ b/swf/src/types/bevel_filter.rs @@ -37,6 +37,7 @@ impl BevelFilter { pub fn scale(&mut self, x: f32, y: f32) { self.blur_x *= Fixed16::from_f32(x); self.blur_y *= Fixed16::from_f32(y); + self.distance *= Fixed16::from_f32(y); } pub fn inner_blur_filter(&self) -> BlurFilter { diff --git a/swf/src/types/drop_shadow_filter.rs b/swf/src/types/drop_shadow_filter.rs index 4a4cf1180..28a7a7fbd 100644 --- a/swf/src/types/drop_shadow_filter.rs +++ b/swf/src/types/drop_shadow_filter.rs @@ -36,6 +36,7 @@ impl DropShadowFilter { pub fn scale(&mut self, x: f32, y: f32) { self.blur_x *= Fixed16::from_f32(x); self.blur_y *= Fixed16::from_f32(y); + self.distance *= Fixed16::from_f32(y); } pub fn inner_blur_filter(&self) -> BlurFilter { diff --git a/swf/src/types/gradient_filter.rs b/swf/src/types/gradient_filter.rs index bf207337a..cc3119efa 100644 --- a/swf/src/types/gradient_filter.rs +++ b/swf/src/types/gradient_filter.rs @@ -36,6 +36,7 @@ impl GradientFilter { pub fn scale(&mut self, x: f32, y: f32) { self.blur_x *= Fixed16::from_f32(x); self.blur_y *= Fixed16::from_f32(y); + self.distance *= Fixed16::from_f32(y); } pub fn inner_blur_filter(&self) -> BlurFilter { diff --git a/tests/tests/swfs/visual/filters/drop_shadow_scales_with_screen/expected.png b/tests/tests/swfs/visual/filters/drop_shadow_scales_with_screen/expected.png new file mode 100644 index 000000000..775ea3c0e Binary files /dev/null and b/tests/tests/swfs/visual/filters/drop_shadow_scales_with_screen/expected.png differ diff --git a/tests/tests/swfs/visual/filters/drop_shadow_scales_with_screen/output.txt b/tests/tests/swfs/visual/filters/drop_shadow_scales_with_screen/output.txt new file mode 100644 index 000000000..e69de29bb diff --git a/tests/tests/swfs/visual/filters/drop_shadow_scales_with_screen/test.fla b/tests/tests/swfs/visual/filters/drop_shadow_scales_with_screen/test.fla new file mode 100644 index 000000000..9c01ca58f Binary files /dev/null and b/tests/tests/swfs/visual/filters/drop_shadow_scales_with_screen/test.fla differ diff --git a/tests/tests/swfs/visual/filters/drop_shadow_scales_with_screen/test.swf b/tests/tests/swfs/visual/filters/drop_shadow_scales_with_screen/test.swf new file mode 100644 index 000000000..91d289797 Binary files /dev/null and b/tests/tests/swfs/visual/filters/drop_shadow_scales_with_screen/test.swf differ diff --git a/tests/tests/swfs/visual/filters/drop_shadow_scales_with_screen/test.toml b/tests/tests/swfs/visual/filters/drop_shadow_scales_with_screen/test.toml new file mode 100644 index 000000000..f18fdf769 --- /dev/null +++ b/tests/tests/swfs/visual/filters/drop_shadow_scales_with_screen/test.toml @@ -0,0 +1,8 @@ +num_frames = 1 + +[image_comparison] +tolerance = 2 + +[player_options] +with_renderer = { optional = false, sample_count = 1 } +viewport_dimensions = { width = 800, height = 400, scale_factor = 1.0 }