Skip to content

Element.Ellipse

Generates an <ellipse> element

DaxLib.SVG.Element.Ellipse( cx, cy, rx, ry, attributes, transforms )
Name Type Required Description
cx STRING The x position of the center
cy STRING The y position of the center
rx STRING The x radius
ry STRING The y radius
attributes STRING Direct SVG attributes to apply, can generate with DaxLib.SVG.Attr.* or manually
transforms STRING Transformation to apply (can be generated with DaxLib.SVG.Transforms)

STRING <ellipse> element

DaxLib.SVG.Element.Ellipse(
    "50", 
    "50", 
    "40", 
    "20", 
    DaxLib.SVG.Attr.Shapes("#0078D4", BLANK(), BLANK(), BLANK(), BLANK(), BLANK(), BLANK()), 
    BLANK()
)
// Returns: <ellipse cx='50' cy='50' rx='40' ry='20' fill='#0078D4' />
function 'DaxLib.SVG.Element.Ellipse' = 
    (
        cx: STRING,
        cy: STRING,
        rx: STRING,
        ry: STRING,
        attributes: STRING,
        transforms: STRING
    ) =>

        "<ellipse" &
        " cx='" & cx & "'" &
        " cy='" & cy & "'" &
        " rx='" & rx & "'" &
        " ry='" & ry & "'" &
        IF( NOT ISBLANK( attributes ), " " & attributes & " " ) &
        IF( NOT ISBLANK( transforms ), " transform='" & transforms & "'" ) & 
        "/>"

Comments