Skip to content
Browse files

added support for RadialGradient

  • Loading branch information...
1 parent 463be71 commit 68f3348adb01303fe66c67d5804017ca355a176a @eladelrom eladelrom committed Apr 19, 2010
View
1 EladLibFlex/.actionScriptProperties
@@ -14,3 +14,4 @@
<modules/>
<buildCSSFiles/>
</actionScriptProperties>
+
View
1 EladLibFlex/.flexProperties
@@ -1,2 +1,3 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<flexProperties enableServiceManager="false" flexServerFeatures="0" flexServerType="0" toolCompile="true" useServerFlexSDK="false" version="2"/>
+
View
BIN EladLibFlex/bin-debug/FXGConverter.swf
Binary file not shown.
View
8 EladLibFlex/src/com/elad/framework/utils/fxgconverter/FXGStringConverter.as
@@ -4,6 +4,7 @@ package com.elad.framework.utils.fxgconverter
import mx.graphics.GradientEntry;
import mx.graphics.LinearGradient;
+ import mx.graphics.RadialGradient;
import mx.graphics.SolidColor;
import mx.graphics.SolidColorStroke;
import mx.utils.StringUtil;
@@ -83,8 +84,8 @@ package com.elad.framework.utils.fxgconverter
component = retrieveComponentFromXML( subSubComList[ii], debug );
// Use case for gradients
- if ( component is LinearGradient )
- (component as LinearGradient).entries = getGradients( subComList[i].children().children().children(), debug );;
+ if ( component is LinearGradient || component is RadialGradient )
+ component.entries = getGradients( subComList[i].children().children().children(), debug );;
addChildToComponent( component, previousComponent, debug );
}
@@ -171,7 +172,8 @@ package com.elad.framework.utils.fxgconverter
return false;
}
- if ( child is SolidColor || ( child is LinearGradient && previousComponent is Path ) )
+ if ( child is SolidColor ||
+ ( (child is LinearGradient || child is RadialGradient) && previousComponent is Path ) )
{
previousComponent.fill = child;
isUIComponent = false;
View
6 EladLibFlex/src/com/elad/framework/utils/fxgconverter/SupportedClassesAndProperties.as
@@ -3,6 +3,7 @@ package com.elad.framework.utils.fxgconverter
import mx.controls.Label;
import mx.graphics.GradientEntry;
import mx.graphics.LinearGradient;
+ import mx.graphics.RadialGradient;
import mx.graphics.SolidColor;
import mx.graphics.SolidColorStroke;
@@ -45,7 +46,7 @@ package com.elad.framework.utils.fxgconverter
{
case "GradientEntry":
retComponent = new GradientEntry();
- break;
+ break;
case "Group":
retComponent = new Group();
break;
@@ -91,6 +92,9 @@ package com.elad.framework.utils.fxgconverter
case "LinearGradient":
retComponent = new LinearGradient();
break;
+ case "RadialGradient":
+ retComponent = new RadialGradient();
+ break;
default:
if ( debug )
trace( "FAIL: missing component, couldn't parse component: " + componentType );

0 comments on commit 68f3348

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