ASV6 : Using RCC to create arc and pie elements

Code used  for this elements in svg 

<extensionDefs namespace="http://www.example.com/subelements">
    <elementDef name="arc">
        <prototype>
            <path id="drawing_arc"/>
        </prototype>
        <script ev:event="SVGBindEnd" type="text/ecmascript" xlink:href="arc.es"/>
    </elementDef>
    <elementDef name="pie">
        <prototype>
            <path id="drawing_pie"/>
        </prototype>
        <script ev:event="SVGBindEnd" type="text/ecmascript" xlink:href="pie.es"/>
    </elementDef>
</extensionDefs>

Syntax for arc and pie elements

<pi:arc or <pi:pie
    cx : coordinate ( 0 by default )
    cy : coordinate ( 0 by default )     center's coordinates
    r : length  ( 0 by default )   radius for circle
    start : angle ( in degrees and 0 by default )  angle to begin arc or pie
    sweep : angle ( in degrees and 0 by default )  angle for arc or pie
    orientation : default | maths    with maths angles are oriented as in maths, with default clowise
    units : degrees | radian    by default angles for start and sweep are in degrees

   other attributes supported by "path":
    style, stroke, stroke-width, stroke-dasharray, stroke-dashoffset, fill, fill-opacity
    cursor property ( run directly from instance also )

    transform attribute ( some strange result )

   events as onclick="..."
    >

   <..   animate, set, ... elements as childs />   this animated elements don't run in this first approach ....

</pi:arc> or </pi:pie>

See example    Load pie.es    Load arc.es

Thanks to Kevin for example



chapters: intro toc intro sample svg elements toc svg elements sample


To see SVG examples in HTML you need the SVG plugin:
Adobe SVG Viewer or Corel Viewer
You can also use Batik viewer to open SVG files.




SVG Tutorials
SVG Books
SVG Graphics
MapPoint
SVG Links


Calling To Singapore

XML Elves
XML and SVG Discussion
- Warning: x = x + 1 May Be Hazardous to Your Brain
- Open Comparability: against anti-benchmarking EULAs

| Rainbow Seeker | SVG PHP


Map Visitors Learn SVG: Contact Learn SVG
©2002-2008 Learn SVG. All Rights Reserved.
Questions and comments to: learnsvg@gmail.com