Skip to content

Commit

Permalink
tests: Add a visual test for blur filter quality
Browse files Browse the repository at this point in the history
  • Loading branch information
torokati44 authored and Dinnerbone committed Jul 26, 2023
1 parent 41377c5 commit 5f840bf
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 0 deletions.
29 changes: 29 additions & 0 deletions tests/tests/swfs/visual/filters/blur_quality/Test.as
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package {

import flash.display.Bitmap;
import flash.geom.Point;
import flash.display.BitmapData;
import flash.geom.Rectangle;
import flash.display.MovieClip;
import flash.filters.BlurFilter;

public class Test extends MovieClip {
public function Test() {
for (var col = 0; col < 10; col += 1) {
for (var row = 0; row < 10; row += 1) {
var image : BitmapData = new Image();

var filter = new BlurFilter(row, 1, col);
image.applyFilter(image, new Rectangle(0, 0, 80, 80), new Point(0, 0), filter);

var bm = new Bitmap(image);
bm.smoothing = false;
bm.y = row * 80;
bm.x = col * 80;
addChild(bm);
}
}
}
}

}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
Binary file not shown.
Binary file not shown.
7 changes: 7 additions & 0 deletions tests/tests/swfs/visual/filters/blur_quality/test.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
num_frames = 1

[image_comparison]
tolerance = 0

[player_options]
with_renderer = { optional = false, sample_count = 1 }

0 comments on commit 5f840bf

Please sign in to comment.