Skip to content

Commit

Permalink
tests: Add test for AVM1 ConvolutionFilter initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
britt-j authored and Dinnerbone committed Oct 21, 2024
1 parent d76bbf0 commit a30475e
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
1
0
true
128
9
1,1,1,1,1,1,1,1,1
3
3
true
0
0
true
0
9
1,1,1,1,1,1,1,1,1
3
3
true
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// Compile with: mtasc -main -version 8 -header 200:150:30 -swf test.swf test.as

// TODO: Incorporate this into a more comprehensive test of ConvolutionFilter

import flash.filters.ConvolutionFilter;
class Test {
static function main() {
// Initializing a ConvolutionFilter and specifying a color
var convoTest = new ConvolutionFilter(3,3,[1,1,1,1,1,1,1,1,1],9,0,true,true,128);
trace(convoTest.alpha);
trace(convoTest.bias);
trace(convoTest.clamp);
trace(convoTest.color);
trace(convoTest.divisor);
trace(convoTest.matrix);
trace(convoTest.matrixX);
trace(convoTest.matrixY);
trace(convoTest.preserveAlpha);
// Initializing a ConvolutionFilter without specifying a color
var convoTest2 = new ConvolutionFilter(3,3,[1,1,1,1,1,1,1,1,1],9,0,true,true);
trace(convoTest2.alpha);
trace(convoTest2.bias);
trace(convoTest2.clamp);
trace(convoTest2.color);
trace(convoTest2.divisor);
trace(convoTest2.matrix);
trace(convoTest2.matrixX);
trace(convoTest2.matrixY);
trace(convoTest2.preserveAlpha);
}
}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
num_frames = 1

0 comments on commit a30475e

Please sign in to comment.