Skip to content
Browse files

Fix for #14. Filters take angle in degrees, but in SWF they're radians.

  • Loading branch information...
1 parent 90b2a83 commit f6d3d502c4746b04ffabc835662564c62b5f2ec3 @claus committed Jul 11, 2012
View
BIN bin/as3swf.swc
Binary file not shown.
View
3 src/com/codeazur/as3swf/SWF.as
@@ -123,8 +123,7 @@
var firstHeaderByte:uint = 0x46;
if (compression == COMPRESSION_ZLIB) {
firstHeaderByte = 0x43;
- }
- else if (compression == COMPRESSION_LZMA) {
+ } else if (compression == COMPRESSION_LZMA) {
firstHeaderByte = 0x5A;
}
data.writeUI8(firstHeaderByte);
View
2 src/com/codeazur/as3swf/data/filters/FilterBevel.as
@@ -35,7 +35,7 @@
}
return new BevelFilter(
distance,
- angle,
+ angle * 180 / Math.PI,
ColorUtils.rgb(highlightColor),
ColorUtils.alpha(highlightColor),
ColorUtils.rgb(shadowColor),
View
2 src/com/codeazur/as3swf/data/filters/FilterDropShadow.as
@@ -26,7 +26,7 @@
override public function get filter():BitmapFilter {
return new DropShadowFilter(
distance,
- angle,
+ angle * 180 / Math.PI,
ColorUtils.rgb(dropShadowColor),
ColorUtils.alpha(dropShadowColor),
blurX,
View
2 src/com/codeazur/as3swf/data/filters/FilterGradientGlow.as
@@ -51,7 +51,7 @@
}
return new GradientGlowFilter(
distance,
- angle,
+ angle * 180 / Math.PI,
gradientGlowColors,
gradientGlowAlphas,
gradientGlowRatios,

0 comments on commit f6d3d50

Please sign in to comment.
Something went wrong with that request. Please try again.