-
-
Notifications
You must be signed in to change notification settings - Fork 828
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Reformat filter files with spaces instead of tabs
- Loading branch information
Lord-McSweeney
authored and
Lord-McSweeney
committed
Dec 13, 2024
1 parent
77e5ab3
commit a6f789a
Showing
10 changed files
with
417 additions
and
416 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,86 +1,86 @@ | ||
package flash.filters { | ||
public final class BevelFilter extends BitmapFilter { | ||
// FIXME these should all be getters/setters to match Flash | ||
public final class BevelFilter extends BitmapFilter { | ||
// FIXME these should all be getters/setters to match Flash | ||
|
||
[Ruffle(InternalSlot)] | ||
public var angle : Number; | ||
[Ruffle(InternalSlot)] | ||
public var angle : Number; | ||
|
||
[Ruffle(InternalSlot)] | ||
public var blurX : Number; | ||
[Ruffle(InternalSlot)] | ||
public var blurX : Number; | ||
|
||
[Ruffle(InternalSlot)] | ||
public var blurY : Number; | ||
[Ruffle(InternalSlot)] | ||
public var blurY : Number; | ||
|
||
[Ruffle(InternalSlot)] | ||
public var distance : Number; | ||
[Ruffle(InternalSlot)] | ||
public var distance : Number; | ||
|
||
[Ruffle(InternalSlot)] | ||
public var highlightAlpha : Number; | ||
[Ruffle(InternalSlot)] | ||
public var highlightAlpha : Number; | ||
|
||
[Ruffle(InternalSlot)] | ||
public var highlightColor : uint; | ||
[Ruffle(InternalSlot)] | ||
public var highlightColor : uint; | ||
|
||
[Ruffle(InternalSlot)] | ||
public var knockout : Boolean; | ||
[Ruffle(InternalSlot)] | ||
public var knockout : Boolean; | ||
|
||
[Ruffle(InternalSlot)] | ||
public var quality : int; | ||
[Ruffle(InternalSlot)] | ||
public var quality : int; | ||
|
||
[Ruffle(InternalSlot)] | ||
public var shadowAlpha : Number; | ||
[Ruffle(InternalSlot)] | ||
public var shadowAlpha : Number; | ||
|
||
[Ruffle(InternalSlot)] | ||
public var shadowColor : uint; | ||
[Ruffle(InternalSlot)] | ||
public var shadowColor : uint; | ||
|
||
[Ruffle(InternalSlot)] | ||
public var strength : Number; | ||
[Ruffle(InternalSlot)] | ||
public var strength : Number; | ||
|
||
[Ruffle(InternalSlot)] | ||
public var type : String; | ||
[Ruffle(InternalSlot)] | ||
public var type : String; | ||
|
||
public function BevelFilter( | ||
distance:Number = 4.0, | ||
angle:Number = 45, | ||
highlightColor:uint = 0xFFFFFF, | ||
highlightAlpha:Number = 1.0, | ||
shadowColor:uint = 0x000000, | ||
shadowAlpha:Number = 1.0, | ||
blurX:Number = 4.0, | ||
blurY:Number = 4.0, | ||
strength:Number = 1, | ||
quality:int = 1, | ||
type:String = "inner", | ||
knockout:Boolean = false | ||
) { | ||
this.angle = angle; | ||
this.blurX = blurX; | ||
this.blurY = blurY; | ||
this.distance = distance; | ||
this.highlightAlpha = highlightAlpha; | ||
this.highlightColor = highlightColor; | ||
this.knockout = knockout; | ||
this.quality = quality; | ||
this.shadowAlpha = shadowAlpha; | ||
this.shadowColor = shadowColor; | ||
this.strength = strength; | ||
this.type = type; | ||
} | ||
public function BevelFilter( | ||
distance:Number = 4.0, | ||
angle:Number = 45, | ||
highlightColor:uint = 0xFFFFFF, | ||
highlightAlpha:Number = 1.0, | ||
shadowColor:uint = 0x000000, | ||
shadowAlpha:Number = 1.0, | ||
blurX:Number = 4.0, | ||
blurY:Number = 4.0, | ||
strength:Number = 1, | ||
quality:int = 1, | ||
type:String = "inner", | ||
knockout:Boolean = false | ||
) { | ||
this.angle = angle; | ||
this.blurX = blurX; | ||
this.blurY = blurY; | ||
this.distance = distance; | ||
this.highlightAlpha = highlightAlpha; | ||
this.highlightColor = highlightColor; | ||
this.knockout = knockout; | ||
this.quality = quality; | ||
this.shadowAlpha = shadowAlpha; | ||
this.shadowColor = shadowColor; | ||
this.strength = strength; | ||
this.type = type; | ||
} | ||
|
||
override public function clone(): BitmapFilter { | ||
return new BevelFilter( | ||
this.distance, | ||
this.angle, | ||
this.highlightColor, | ||
this.highlightAlpha, | ||
this.shadowColor, | ||
this.shadowAlpha, | ||
this.blurX, | ||
this.blurY, | ||
this.strength, | ||
this.quality, | ||
this.type, | ||
this.knockout | ||
); | ||
} | ||
} | ||
override public function clone(): BitmapFilter { | ||
return new BevelFilter( | ||
this.distance, | ||
this.angle, | ||
this.highlightColor, | ||
this.highlightAlpha, | ||
this.shadowColor, | ||
this.shadowAlpha, | ||
this.blurX, | ||
this.blurY, | ||
this.strength, | ||
this.quality, | ||
this.type, | ||
this.knockout | ||
); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
package flash.filters { | ||
public class BitmapFilter { | ||
public function clone(): BitmapFilter { | ||
return null; | ||
} | ||
} | ||
public class BitmapFilter { | ||
public function clone(): BitmapFilter { | ||
return null; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
package flash.filters { | ||
public final class BlurFilter extends BitmapFilter { | ||
[Ruffle(InternalSlot)] | ||
public var blurX: Number; | ||
public final class BlurFilter extends BitmapFilter { | ||
[Ruffle(InternalSlot)] | ||
public var blurX: Number; | ||
|
||
[Ruffle(InternalSlot)] | ||
public var blurY: Number; | ||
[Ruffle(InternalSlot)] | ||
public var blurY: Number; | ||
|
||
[Ruffle(InternalSlot)] | ||
public var quality: int; | ||
[Ruffle(InternalSlot)] | ||
public var quality: int; | ||
|
||
public function BlurFilter(blurX: Number = 4.0, blurY: Number = 4.0, quality: int = 1) { | ||
this.blurX = blurX; | ||
this.blurY = blurY; | ||
this.quality = quality; | ||
} | ||
public function BlurFilter(blurX: Number = 4.0, blurY: Number = 4.0, quality: int = 1) { | ||
this.blurX = blurX; | ||
this.blurY = blurY; | ||
this.quality = quality; | ||
} | ||
|
||
override public function clone(): BitmapFilter { | ||
return new BlurFilter(this.blurX, this.blurY, this.quality); | ||
} | ||
} | ||
override public function clone(): BitmapFilter { | ||
return new BlurFilter(this.blurX, this.blurY, this.quality); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,36 @@ | ||
package flash.filters { | ||
public final class ColorMatrixFilter extends BitmapFilter { | ||
[Ruffle(InternalSlot)] | ||
private var _matrix: Array; | ||
public final class ColorMatrixFilter extends BitmapFilter { | ||
[Ruffle(InternalSlot)] | ||
private var _matrix: Array; | ||
|
||
public function ColorMatrixFilter(matrix: Array = null) { | ||
if (matrix == null) { | ||
matrix = [ | ||
1, 0, 0, 0, 0, | ||
0, 1, 0, 0, 0, | ||
0, 0, 1, 0, 0, | ||
0, 0, 0, 1, 0 | ||
]; | ||
} | ||
this.matrix = matrix; | ||
} | ||
public function ColorMatrixFilter(matrix: Array = null) { | ||
if (matrix == null) { | ||
matrix = [ | ||
1, 0, 0, 0, 0, | ||
0, 1, 0, 0, 0, | ||
0, 0, 1, 0, 0, | ||
0, 0, 0, 1, 0 | ||
]; | ||
} | ||
this.matrix = matrix; | ||
} | ||
|
||
// From the Flash docs, we need to make a copy of the `Array`, | ||
// as modifying the `filter.matrix` directly should have no effect. | ||
// We call the method in the AS3 namespace, as some SWFS define a | ||
// extend `Array` and declare a *public* 'concat' method with a | ||
// different signature. | ||
// From the Flash docs, we need to make a copy of the `Array`, | ||
// as modifying the `filter.matrix` directly should have no effect. | ||
// We call the method in the AS3 namespace, as some SWFS define a | ||
// extend `Array` and declare a *public* 'concat' method with a | ||
// different signature. | ||
|
||
public function get matrix(): Array { | ||
return this._matrix.AS3::concat(); | ||
} | ||
public function get matrix(): Array { | ||
return this._matrix.AS3::concat(); | ||
} | ||
|
||
public function set matrix(matrix:Array):void { | ||
this._matrix = matrix.AS3::concat(); | ||
} | ||
public function set matrix(matrix:Array):void { | ||
this._matrix = matrix.AS3::concat(); | ||
} | ||
|
||
override public function clone(): BitmapFilter { | ||
return new ColorMatrixFilter(this.matrix.AS3::concat()); | ||
} | ||
} | ||
override public function clone(): BitmapFilter { | ||
return new ColorMatrixFilter(this.matrix.AS3::concat()); | ||
} | ||
} | ||
} |
108 changes: 54 additions & 54 deletions
108
core/src/avm2/globals/flash/filters/ConvolutionFilter.as
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,56 @@ | ||
package flash.filters { | ||
public final class ConvolutionFilter extends BitmapFilter { | ||
[Ruffle(InternalSlot)] | ||
public var alpha : Number; | ||
|
||
[Ruffle(InternalSlot)] | ||
public var bias : Number; | ||
|
||
[Ruffle(InternalSlot)] | ||
public var clamp : Boolean; | ||
|
||
[Ruffle(InternalSlot)] | ||
public var color : uint; | ||
|
||
[Ruffle(InternalSlot)] | ||
public var divisor : Number; | ||
|
||
[Ruffle(InternalSlot)] | ||
public var matrix : Array; | ||
|
||
[Ruffle(InternalSlot)] | ||
public var matrixX : Number; | ||
|
||
[Ruffle(InternalSlot)] | ||
public var matrixY : Number; | ||
|
||
[Ruffle(InternalSlot)] | ||
public var preserveAlpha : Boolean; | ||
|
||
public function ConvolutionFilter( | ||
matrixX:Number = 0, | ||
matrixY:Number = 0, | ||
matrix:Array = null, | ||
divisor:Number = 1.0, | ||
bias:Number = 0.0, | ||
preserveAlpha:Boolean = true, | ||
clamp:Boolean = true, | ||
color:uint = 0, | ||
alpha:Number = 0.0 | ||
) { | ||
this.alpha = alpha; | ||
this.bias = bias; | ||
this.clamp = clamp; | ||
this.color = color; | ||
this.divisor = divisor; | ||
this.matrix = matrix; | ||
this.matrixX = matrixX; | ||
this.matrixY = matrixY; | ||
this.preserveAlpha = preserveAlpha; | ||
} | ||
|
||
override public function clone(): BitmapFilter { | ||
return new ConvolutionFilter(this.matrixX, this.matrixY, this.matrixull, this.divisor, this.bias, this.preserveAlpharue, this.clamprue, this.color, this.alpha); | ||
} | ||
} | ||
public final class ConvolutionFilter extends BitmapFilter { | ||
[Ruffle(InternalSlot)] | ||
public var alpha : Number; | ||
|
||
[Ruffle(InternalSlot)] | ||
public var bias : Number; | ||
|
||
[Ruffle(InternalSlot)] | ||
public var clamp : Boolean; | ||
|
||
[Ruffle(InternalSlot)] | ||
public var color : uint; | ||
|
||
[Ruffle(InternalSlot)] | ||
public var divisor : Number; | ||
|
||
[Ruffle(InternalSlot)] | ||
public var matrix : Array; | ||
|
||
[Ruffle(InternalSlot)] | ||
public var matrixX : Number; | ||
|
||
[Ruffle(InternalSlot)] | ||
public var matrixY : Number; | ||
|
||
[Ruffle(InternalSlot)] | ||
public var preserveAlpha : Boolean; | ||
|
||
public function ConvolutionFilter( | ||
matrixX:Number = 0, | ||
matrixY:Number = 0, | ||
matrix:Array = null, | ||
divisor:Number = 1.0, | ||
bias:Number = 0.0, | ||
preserveAlpha:Boolean = true, | ||
clamp:Boolean = true, | ||
color:uint = 0, | ||
alpha:Number = 0.0 | ||
) { | ||
this.alpha = alpha; | ||
this.bias = bias; | ||
this.clamp = clamp; | ||
this.color = color; | ||
this.divisor = divisor; | ||
this.matrix = matrix; | ||
this.matrixX = matrixX; | ||
this.matrixY = matrixY; | ||
this.preserveAlpha = preserveAlpha; | ||
} | ||
|
||
override public function clone(): BitmapFilter { | ||
return new ConvolutionFilter(this.matrixX, this.matrixY, this.matrixull, this.divisor, this.bias, this.preserveAlpharue, this.clamprue, this.color, this.alpha); | ||
} | ||
} | ||
} |
Oops, something went wrong.