gdl2svg-Converter

Convert GDL Commands into Scalable Vector Icons or PNGs

GDL-Input

GDL Syntax-Referenz

๐Ÿ“ coordinate system

Origin at bottom left. Unit = pixel. Y-axis positive upwards.

๐ŸŽจ colours

Hex-Values: #000066 #ffa726
Standard: Stroke = black, Fill = transparent

โœ๏ธ Forms

LINE2 x1, y1, x2, y2, d, #stroke

Straight line

CIRCLE2 x, y, r, d, #stroke, #fill

Kreis (x,y=centre, r=radius)

RECT2 x1, y1, x2, y2, d, #stroke, #fill

Rectangle (2 corner points)

POLY2 n, x1, y1, ..., xn, yn, d, #stroke, #fill

Polygon with n Points

ELLIPSE2 x, y, rx, ry, rot, d, #stroke, #fill

Ellipse (rot=Rotation in degrees)

ARC2 x, y, r, a1, a2, d, #stroke

Arc lengths (a1/a2=angle in degrees)

ARROW x, y, rot, len, wid, d, #stroke, #fill

arrowhead


STYLE "Font", i

Sets the text style. i=0 normal, 1 bold, 2 italic, 3 bold/italic.

TEXT2 x, y, h, i, "Text", #Color

Text at position (x, y). h=height. i=alignment (1=left, 2=centre, 3=right).

๐Ÿ”„ transformations

ADD2 x, y

Move origin

ROT2 a

Rotate coordinates aยฐ (CCW)

DEL n

Close last n transformations (default 1)

๐Ÿ”ง subroutines

DEFINE name

starts reusable code block

ENDDEFINE

Ends code block

CALL name

Inserts defined code block

๐Ÿ” Loops

FOR i = start TO end STEP value

Loop with counter i

NEXT i

End of loop

๐Ÿงฎ Variables & Expressions

var = expression

Assign numerical value. Supported: + โˆ’ * / ()

Preview & Export

Zoom:1x
<!-- SVG code appears here -->