FYI: The svg version does not render in Firefox (Mac 19.0.2).
In Safari and Chrome, the appearance is very close, but the svg version has a smoother gradient and the blue shape is missing the black stroke. On Mar 24, 2013, at 11:01 AM, Om wrote: > On Fri, Mar 22, 2013 at 6:48 AM, Alex Harui <aha...@adobe.com> wrote: > >> >> >> >> On 3/22/13 12:36 AM, "Erik de Bruin" <e...@ixsoftware.nl> wrote: >> >>> I think both the FlexJS as well as VanillaSDK frameworks can benefit >>> from this. So it should be available to both. I don't know much about >>> XSLT, but if it 'converts one into another', I think it should >>> ultimately go with that other thing that 'converts one into another', >>> FalconJx. >>> >>> But for now, as it is a work in progress, I think it's best place is >>> in ASJS, in the root, next to my 'publisher'. The publisher was also a >>> proof of concept, that has since been integrated into FalconJx. >>> >>> Clear as mud, right? >>> >> I hope to get a look at FalconJX shortly, but in theory, you haven't >> changed >> the FXG subcompiler and I think that's where this XSLT will eventually go. >> >> > I have checked in the first cut of the "FXG to SVG" XSLTfile here [1] > > Here is a very simple Flex app with three Rectangles, one with a a > SolidColor fill and two with LinearGradient fills: > > Flex version: > http://people.apache.org/~bigosmallm/fxg2svg/transform/SeeFXG.html (right > click for source) > > Using the XSLT file, I transformed it into its equivalent > > SVG version: > http://people.apache.org/~bigosmallm/fxg2svg/transform/SeeFXG.svg.html(right > click for source) > > The SVG version uses <defs> and inline CSS to style the different elements. > > > To my naked eye, they both look pretty much the same. After this > experiment, I am halfway convinced that this is a viable approach to carry > over Flex's Spark based skins into the HTML5/SVG world. > > I have identified a few problems that I will be tackling next: > > 1. States > 2. Tackling the ILayoutElement interface usage (i.e. usage of left, right, > etc. constraints) > 3. Transform Other Shapes, etc. > 4. Get a Spark component's skin to work in HTML5/SVG > > I have a few ideas that I will be trying out. If anyone wants to take a > peek at the XSLT file and modify it or has any ideas they would like to > see me implement, that would be great. > > Thanks, > Om > > > [1] > https://git-wip-us.apache.org/repos/asf?p=flex-asjs.git;a=blob;f=fxg2svg/transform.xslt;h=df474c463f3fcc2701db063e691f3a4f29f217a6;hb=develop