···6969 * `fill: self.fill` svg:create() parameter ("transparent" by default)
7070 - tranform: string => transformation options (eg: rotation)
71717272-**svg:Rect(x, y, width, height, stroke, strokeWidth, fill, rx, ry)** *add a rectangle*
7272+**svg:Rect(x, y, width, height, stroke, strokeWidth, fill, rx, ry, transform)** *add a rectangle*
73737474 - x: number => Horizontal position from top left corner, default to 10
7575 - y: number => Vertical position from top left corner, default to 10
···8080 - fill: string => fill color, default to svg:create() parameter ("transparent" by default)
8181 - rx: number => Horizontal raduis of the corners, default to 0
8282 - ry: number => Vertical radius of the corners, default to 0
8383+ - tranform: string => transformation options (eg: rotation)
83848484-**svg:Circle(r, cx, cy, stroke, strokeWidth, fill)** *add a circle*
8585+**svg:Circle(r, cx, cy, stroke, strokeWidth, fill, transform)** *add a circle*
85868687 - r: number => circle radius, default to 25
8788 - cx: number => Horizontal position of the center, default to 30
···8990 - stroke: string => lines color, default to svg:create() parameter ("#000000" by default)
9091 - strokeWidth: string => lines width, default to 1
9192 - fill: string => fill color, default to svg:create() parameter ("transparent" by default)
9393+ - tranform: string => transformation options (eg: rotation)
92949393-**svg:Ellipse(cx, cy, rx, ry, stroke, strokeWidth, fill)** *add an ellipse*
9595+**svg:Ellipse(cx, cy, rx, ry, stroke, strokeWidth, fill, transform)** *add an ellipse*
94969597 - cx: number => Horizontal position of the center, default to 30
9698 - cy: number => Vertical position of the center, default to 30
···98100 - ry: number => Vertical radius of the ellipse, default to 15
99101 - stroke: string => lines color, default to svg:create() parameter ("#000000" by default)
100102 - strokeWidth: string => lines width, default to 1
101101- - fill: string => fill color, default to svg:create() parameter ("transparent" by default)103103+ - fill: string => fill color, default to svg:create() parameter ("transparent" by default)
104104+ - tranform: string => transformation options (eg: rotation)
+12-6
svg.lua
···8585-- fill: string => fill color
8686-- rx: number => Rayon x des coins du rectangle
8787-- ry: number => Rayon y des coins du rectangle
8888-function svg:Rect(x, y, width, height, stroke, strokeWidth, fill, rx, ry)
8888+-- tranform: string => transformation options (eg: rotation)
8989+function svg:Rect(x, y, width, height, stroke, strokeWidth, fill, rx, ry, transform)
8990 return self.Element:create("rect", {
9091 x = x or 10,
9192 y = y or 10,
···9596 fill = fill or self.fill,
9697 ["stroke-width"] = strokeWidth or 1,
9798 rx = rx or 0,
9898- ry = ry or 0
9999+ ry = ry or 0,
100100+ transform = transform or ""
99101 })
100102end
101103···106108-- stroke: string => lines color
107109-- strokeWidth: string => lines width
108110-- fill: string => fill color
109109-function svg:Circle(r, cx, cy, stroke, strokeWidth, fill)
111111+-- tranform: string => transformation options (eg: rotation)
112112+function svg:Circle(r, cx, cy, stroke, strokeWidth, fill, transform)
110113 return self.Element:create("circle", {
111114 r = r or 25,
112115 cx = cx or 30,
113116 cy = cy or 30,
114117 stroke = stroke or self.stroke,
115118 ["stroke-width"] = strokeWidth or 1,
116116- fill = fill or self.fill
119119+ fill = fill or self.fill,
120120+ transform = transform or ""
117121 })
118122end
119123···125129-- stroke: string => lines color
126130-- strokeWidth: string => lines width
127131-- fill: string => fill color
128128-function svg:Ellipse(cx, cy, rx, ry, stroke, strokeWidth, fill)
132132+-- tranform: string => transformation options (eg: rotation)
133133+function svg:Ellipse(cx, cy, rx, ry, stroke, strokeWidth, fill, transform)
129134 return self.Element:create("ellipse", {
130135 rx = r or 25,
131136 ry = r or 15,
···133138 cy = cy or 30,
134139 stroke = stroke or self.stroke,
135140 ["stroke-width"] = strokeWidth or 1,
136136- fill = fill or self.fill
141141+ fill = fill or self.fill,
142142+ transform = transform or ""
137143 })
138144end