flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Ent <p...@adobe.com>
Subject Re: Changed svg namespace
Date Tue, 26 Jul 2016 14:28:30 GMT
Hi,

For my own education, I just wanted to get some clarification. With
regards to SVG, when you use it, it looks something like this in the HTML
file:
<svg style="Š">
	<rect style="Š" />
	<rect style="Š" />
</svg>

With Canvas, there aren't any graphic elements, you just have <canvas />
and then JS code to draw the rects (or whatever).

Were you thinking we would be able to substitute Canvas for SVG? In other
words, in the Charts, I used SVG in the JS version of the BoxItemRenderer.
Is it your intent that you could write a BoxItemRenderer that used Canvas
instead, for each renderer? The JS would be something like a
<div><canvas/></div> (the SVG version is <div><svg><rect
/></svg></div> so
the mouse tracking would be on the outer <div>.

Or were you thinking that if you wanted to use Canvas for the Charts,
you'd work at a higher level and have a <canvas> per chart and inside of
that the renderers would simply use Canvas drawing to make the bars,
columns, axes, etc.?

I just wanted to see where you were envisioning this going. I think both
approaches would work.

‹peter

On 7/25/16, 5:13 PM, "Harbs" <harbs.lists@gmail.com> wrote:

>FYI:
>
>I just added a bunch of drawing APIs for SVG which should work for canvas
>as well when we have it.
>
>It should be possible to efficiently construct paths with can be used for
>all outputs. I still need to do some testing and add simple rounded rects
>and I need to add string decomposition for canvas, but it¹s pretty
>complete. (Although the AS Docs could use some work.)
>
>The paths can be built implicitly using complex rounded rects or built
>using the new PathBuilder class which wraps a suite of drawing commands
>and spits them out as path strings. (Of course you can construct the
>strings manually if you like, but that seems very error prone to me.)
>Converting existing Flash drawing should be very straight-forward and it
>maps naturally to HTML.
>
>That¹s it for todayŠ
>
>On Jul 25, 2016, at 1:54 PM, Harbs <harbs.lists@gmail.com> wrote:
>
>> I think I missed the correct config file the first time around, and I
>>fixed this.
>> 
>> The change is that SVG components such as Rect, Circle, etc, should now
>>need the library://ns.apache.org/flexjs/svg namespace in MXML instead of
>>library://ns.apache.org/flexjs/basic.
>> 
>> So to use vsg compenents, you¹d need to do this:
>> xmlns:svg="library://ns.apache.org/flexjs/svg²
>> 
>> and <svg:Circle/>
>> 
>> (eventually, I expect we¹ll have <canvas:Circle/> as well)
>> 
>> On Jul 25, 2016, at 1:36 PM, Christofer Dutz
>><christofer.dutz@c-ware.de> wrote:
>> 
>>> Hi Harbs,
>>> 
>>> 
>>> it would have been easier to check, if all Is ok, if you had described
>>>what you changed. From a review of the commit it seems you moved some
>>>parts to dedicated svg packages, created a new namespace file to
>>>reference the svg elements and removed the old ones from the original
>>>ones. Am I correct?
>>> 
>>> 
>>> I just did a quick check ... I was still able to build everything
>>>(including examples) with Maven, so in general it should be ok ... but
>>>I did notice, that you only updated the manifest info in the
>>>flex-config.xml template in the maven distribution module, but not to
>>>any of the configs in the normal framework directory or any of the
>>>other templates in the distribution directory. I Fixed this for the
>>>maven distribution and will commit that as soon as I have finished my
>>>current work on bundling AIR in the directory distribution, but you'll
>>>have to finish that in the framework directory the Ant build uses.
>>> 
>>> 
>>> Chris
>>> 
>>> ________________________________
>>> Von: Harbs <harbs.lists@gmail.com>
>>> Gesendet: Montag, 25. Juli 2016 12:12:15
>>> An: dev
>>> Betreff: Changed svg namespace
>>> 
>>> I just changed the svg namespace in the Graphics package. I¹m not 100%
>>>sure I did it right ‹ especially with the maven build.
>>> 
>>> I hope I did not mess up the next build, but we¹ll find out soon. ;-)
>>> 
>>> If someone could double-check what I did (both on the ant side and the
>>>maven side), that might catch my errors soonerŠ
>>> 
>>> Thanks,
>>> Harbs
>> 
>


Mime
View raw message