On Thu, Feb 27, 2014 at 9:16 AM, Alex Harui <aha...@adobe.com> wrote:

> This is just my opinion, but I would not count on FXG being a feature of
> Adobe Creative Cloud forever.


Agreed.  I share the same concern.  And I dont think they will ever lose
the option of exporting to SVG.


> I anticipate that the AS side of FlexJS
> will have to do SVG->Sprite conversion someday.
>

I have been looking at some AS3 libraries that do this today [1]  But if
you think doing this in the compiler makes more sense, I am all for it.


>
> I'm wondering if you are using XSLT for a reason other than not having the
> time to learn the FalconJX code base.


Yes, that is definitely a reason.  I started out with the XSLT approach as
a POC to prove that it is possible have rendering fidelity match between
Flash and HTML5.  Learning the ins and outs of FalconJX was not feasible in
the time I had at that time.


> The compiler already has a parse
> tree for FXG and a Spark Skin, so we could generate output from that tree
> in the same manner we output the ABC or JS code today.  And then at least
> I'd have a better chance of understanding it.


Lets do it!  Where do we start?  I want to start building some JS side SVG
drawing APIs that I want to use with our Charts.  The BarChart on the JS
side uses CSS to draw, which will become limited very soon.  Having a
robust JS based SVG drawing API will definitely help us in the long run.
Do you mind starting with an SVG parser in Falcon?  We could just do with
the primitives for now:  BitmapImage, Ellipse, Line, Path and Rect.  Then
we can do the fills, strokes, gradients, etc.  No need to deal with the
whole SVG spec.


> And I'm wondering if the
> XSLT will become unwieldy as you try to deal with more complex skins.
>

The XSLT is already unweildly.  Moreover, it is a pain to write and test.


>
> -Alex
>
>
[1] https://github.com/LucasLorentz/AS3SVGRenderer



>  On 2/27/14 1:24 AM, "Carlos Rovira" <carlos.rov...@codeoscopic.com>
> wrote:
>
> > Very cool Om! I'll take a look and will try to make my hands dirty with
> >this stuff :)
> >
> >After read your email I think that maybe only getting a SVG version of
> >spark components skin could be sufficient to create a good looking set of
> >FlexJS components, so in the end we really doesn't need FXG. I like FXG,
> >but having SVG, do you think w will need jt anymore in the future?. I'm
> >assuming that we could use SVG skins for SWF version too, so this will
> >unify look and feel between JS and SWF.
> >
> >So, If this is true, we could not need to integrate the conversion tool in
> >the FlexJS compilation process, making it more light.
> >
> >Let me know If I'm on the way or maybe I'm missing something.
> >
> >Thanks
> >
> >Carlos
> >
> >
> >
> >
> >
> >
> >2014-02-27 9:50 GMT+01:00 OmPrakash Muppirala <bigosma...@gmail.com>:
> >
> >> Thanks Carlos!  I created the SVG skins from the current spark component
> >> skins through a combination of automation and manual coding.  One of the
> >> tools I use is the FXG -> SVG XSLT translator available here [1]
> >>
> >> Notice that there are three xslt files, transform.xslt,
> >>transform-over.xslt
> >> and transform-down.xslt.  These correspond to the various states in the
> >> spark.skins.spark.ButtonSkin.mxml.  So, for each state in the skin, you
> >> will need to slightly tweak the xslt and re-run it.  I am hoping to
> >>modify
> >> my xslt to do this automatically.  Or perhaps we can write an ant script
> >> that does this for us.
> >>
> >> To run the XSLT, I just use an online XSLT editor like this [2]  As I
> >>said,
> >> very unsophisticated ;-)
> >>
> >> There are some conditions that I dont take care of yet (as noted in the
> >> TODO list here [3]  This requires a change to the XSLT document.  If you
> >> are up to it, please take a shot at fixing/adding stuff.
> >>
> >> Also, I am converting only these elements from FXG to SVG now:
> >>
> >> Rect (attributes: left, right, top, bottom, defs, id, x, y, width,
> >>height,
> >> radiusX, radiusY, fill)
> >> Fill
> >> Stroke
> >> SolidColor
> >> LinearGradient
> >> LinearGradientStroke
> >> GradientEntry
> >> Label
> >>
> >> For spark.skins.spark.ButtonSkin, these elements suffice.  But for
> >> spark.skins.spark.CheckBoxSkin, we will need the translation for the
> >>Path
> >> element as well.  For spark.skins.spark.RadioButtonSkin, we need the
> >> translation for the Ellipse element
> >>
> >> As I said, the conversion mechanism is very primitive right now.  If you
> >> are able to make progress with other components' skins, that would be a
> >> huge deal.
> >>
> >> Please let me know how I can help.  My goal is to make this a pluggable
> >> tool into the FlexJS compilation step.  Still a long way to get there, I
> >> guess.
> >>
> >> Thanks,
> >> Om
> >>
> >> [1]
> >>
> >>
> >>
> https://fisheye6.atlassian.com/browse/~br=develop/flex-asjs/fxg2svg/trans
> >>form
> >> [2] http://xslt.online-toolz.com/tools/xslt-transformation.php
> >> [3]
> >>
> >>
> >>https://fisheye6.atlassian.com/browse/~br=develop/flex-asjs/fxg2svg/TODO
> .
> >>txt
> >>
> >>
> >> On Wed, Feb 26, 2014 at 4:16 AM, Carlos Rovira <
> >> carlos.rov...@codeoscopic.com> wrote:
> >>
> >> > Hi Om,
> >> >
> >> > very cool! I build the example and button looks pretty now! :)
> >> >
> >> > As you, Alex and Erik are looking for some internals, could I help
> >>making
> >> > other SVG for other component in the meanwhile? (i.e: CheckBox,
> >> > RadioButton,...)
> >> >
> >> > Could you share more info about the methodology behind the SVG
> >>internals
> >> in
> >> > order to build one from scratch?
> >> >
> >> > Amazing stuff!
> >> >
> >> > :)
> >> >
> >> > Carlos
> >> >
> >>
> >
> >
> >
> >--
> >Carlos Rovira
> >Director de TecnologĂ­a
> >M: +34 607 22 60 05
> >F:  +34 912 94 80 80
> >http://www.codeoscopic.com
> >http://www.directwriter.es
> >http://www.avant2.es
>
>

Reply via email to