Return-Path: X-Original-To: apmail-flex-dev-archive@www.apache.org Delivered-To: apmail-flex-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B8B461032C for ; Thu, 27 Feb 2014 00:04:48 +0000 (UTC) Received: (qmail 95859 invoked by uid 500); 27 Feb 2014 00:04:47 -0000 Delivered-To: apmail-flex-dev-archive@flex.apache.org Received: (qmail 95825 invoked by uid 500); 27 Feb 2014 00:04:47 -0000 Mailing-List: contact dev-help@flex.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flex.apache.org Delivered-To: mailing list dev@flex.apache.org Received: (qmail 95817 invoked by uid 99); 27 Feb 2014 00:04:47 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Feb 2014 00:04:47 +0000 X-ASF-Spam-Status: No, hits=1.7 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of omuppi1@gmail.com designates 209.85.128.180 as permitted sender) Received: from [209.85.128.180] (HELO mail-ve0-f180.google.com) (209.85.128.180) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Feb 2014 00:04:40 +0000 Received: by mail-ve0-f180.google.com with SMTP id jz11so2970611veb.39 for ; Wed, 26 Feb 2014 16:04:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=WCiGvE00OCh+OIey3F2OQR+kwn/IZYPlK3zby6d9GmA=; b=sSORlBQvF+wx4R5+nE4ndTJimL9NZRIj3c45SscdT4XKRqPh/1yHJXIvYChe9AY3vQ RajyyWJHQo+toq047MxddWoUA79uHV8hmdGMeozyPli3CWdag4sT0EV/O63Yb9cU9uGv zorwNvPb5s2QE6nvwasijCmTKVSXIFDI6ZdfOTPg6BydSqr0sMyvzpgnV8SxZrWthREe 4JPK359LvA4gtgEarPhgVEUWKX7uVUtxF9P3thM9/56FiPBQt11mdPkgNH7hYet1VjNB 1cVkeiyOFdUaYl7pVCSjCwBr1WDkiuPb7GSGrU9wjyc2yPAe7DCCOfk+TPB+47nSNnX2 mbAw== X-Received: by 10.52.61.133 with SMTP id p5mr6757529vdr.4.1393459459994; Wed, 26 Feb 2014 16:04:19 -0800 (PST) MIME-Version: 1.0 Sender: omuppi1@gmail.com Received: by 10.58.209.71 with HTTP; Wed, 26 Feb 2014 16:03:49 -0800 (PST) In-Reply-To: References: From: OmPrakash Muppirala Date: Wed, 26 Feb 2014 16:03:49 -0800 X-Google-Sender-Auth: HsweqJKXEHlfiab1X4QFPi66_Ak Message-ID: Subject: Re: [FlexJS] SVG based TextButton and example checked in To: "dev@flex.apache.org" Content-Type: multipart/alternative; boundary=001a1136b38e1f3cfa04f3581094 X-Virus-Checked: Checked by ClamAV on apache.org --001a1136b38e1f3cfa04f3581094 Content-Type: text/plain; charset=ISO-8859-1 On Wed, Feb 26, 2014 at 9:57 AM, Alex Harui wrote: > Sorry, wasn't clear. > > Thanks for reminding me that FXG is a class linked into the SWF and > referenced as a class by the AS code. On the JS side, do we want that FXG > class to be a "class" (its own JS file that loads or has SVG data in it)? > Or is more "conversion" needed. > > I have been thinking of a spark skin (ex. spark button skin) having an equivalent SVG document on the JS side. The button class itself will have an equivalent in js. Example: TextButton.as + TextButtonSkin.mxml === TextButton.js + TextButtonSkin.svg The TextButtonSkin.mxml links all the required FXGs to make up the various button states' visuals. It also has the code required to switch the states, etc. The same thing happens in TextButtonSkin.svg - it contains all the SVG elements and the JS code (or SMIL) I suppose this is quite similar to the spark architecture. > On the JS side, is there is a way to embed SVG data in an HTML page? > There are multiple ways to this - * inline svg code in HTML, * use element (what I have used in this case) * use element * use element seems to be safe to use across most modern browsers, whereas has browser support issues + security restrictions. element is useless to us because it causes the SVG to lose its interactivity. I suppose we can also directly emebed SVG in HTML, it seems safe to use these days [1] [1] http://caniuse.com/#feat=svg-html5 > > -Alex > > On 2/26/14 12:59 AM, "OmPrakash Muppirala" wrote: > > >On Wed, Feb 26, 2014 at 12:48 AM, Alex Harui wrote: > > > >> > >> > >> On 2/26/14 12:42 AM, "OmPrakash Muppirala" > wrote: > >> > >> >>3. Falcon should be able to compile FXG now, but I think it will use > >> >>Spark > >> >> components like Group. The compiler either needs to output different > >> >> primitives or we need to fake up lighter weight Spark components. > >>I'd > >> >> strongly prefer the first option. > >> >> > >> > > >> >I think I understand. Can we break this up into a very simple use case > >> >and > >> >see which direction we want to go? I may need a bit of hand holding on > >> >this one. > >> > >> Was FXG always embedded? > >> > >> > >You can also instantiate it just like a component in MXML. If you embed > >it, the compiler seems to rasterize it and you will lose the scaling, etc. > >properties that makes vectors so attractive. > > > > > >> Is there a way to "embed" SVG? > >> > > > >Yes, just like an image: > > > >[Embed(source="logo.svg")] > >[Bindable] > >public var imgCls:Class; > > > >Adobe had deprecated it. But, at Apache Flex, we un-deprecated it a while > >ago. > > > >Thanks, > >Om > > > > > >> > >> Anyway, yes a simple test case would help us find the desired workflow > >>and > >> fix what is needed. > >> > >> -Alex > >> > >> > > --001a1136b38e1f3cfa04f3581094--