Skip to content

Element.Ellipse

Generates an ellipse SVG element

DaxLib.SVG.Element.Ellipse( cx, cy, rx, ry, attributes, transforms )
Parameter 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 Optional: Direct SVG attributes to apply (e.g., "fill='none' stroke='blue'"), can generate with DaxLib.SVG.Attr.* or manually
transforms STRING Optional: Transformation to apply (can be generated with DaxLib.SVG.Transforms)

STRING 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 & "'" ) & 
            "/>"