swf: Scale filter distances where appropriate

This commit is contained in:
Nathan Adams 2023-07-09 22:02:34 +02:00
parent 5c13d323b3
commit c3fdfc17dd
8 changed files with 11 additions and 0 deletions

View File

@ -37,6 +37,7 @@ impl BevelFilter {
pub fn scale(&mut self, x: f32, y: f32) { pub fn scale(&mut self, x: f32, y: f32) {
self.blur_x *= Fixed16::from_f32(x); self.blur_x *= Fixed16::from_f32(x);
self.blur_y *= Fixed16::from_f32(y); self.blur_y *= Fixed16::from_f32(y);
self.distance *= Fixed16::from_f32(y);
} }
pub fn inner_blur_filter(&self) -> BlurFilter { pub fn inner_blur_filter(&self) -> BlurFilter {

View File

@ -36,6 +36,7 @@ impl DropShadowFilter {
pub fn scale(&mut self, x: f32, y: f32) { pub fn scale(&mut self, x: f32, y: f32) {
self.blur_x *= Fixed16::from_f32(x); self.blur_x *= Fixed16::from_f32(x);
self.blur_y *= Fixed16::from_f32(y); self.blur_y *= Fixed16::from_f32(y);
self.distance *= Fixed16::from_f32(y);
} }
pub fn inner_blur_filter(&self) -> BlurFilter { pub fn inner_blur_filter(&self) -> BlurFilter {

View File

@ -36,6 +36,7 @@ impl GradientFilter {
pub fn scale(&mut self, x: f32, y: f32) { pub fn scale(&mut self, x: f32, y: f32) {
self.blur_x *= Fixed16::from_f32(x); self.blur_x *= Fixed16::from_f32(x);
self.blur_y *= Fixed16::from_f32(y); self.blur_y *= Fixed16::from_f32(y);
self.distance *= Fixed16::from_f32(y);
} }
pub fn inner_blur_filter(&self) -> BlurFilter { pub fn inner_blur_filter(&self) -> BlurFilter {

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View File

@ -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 }