37 lines
807 B
TypeScript
37 lines
807 B
TypeScript
|
|
module mod_vtm_darstellung_steuerung
|
|
{
|
|
|
|
/**
|
|
* @author kcf <vidofnir@folksprak.org>
|
|
*/
|
|
export function svg_wurzel
|
|
(
|
|
von_x : float,
|
|
von_y : float,
|
|
bis_x : float,
|
|
bis_y : float,
|
|
hoehe : int = 500,
|
|
breite : int = 500,
|
|
kinder : Array<mod_vtm_helfer.schnittstelle_xmlknoten> = []
|
|
) : mod_vtm_helfer.schnittstelle_xmlknoten
|
|
{
|
|
return (
|
|
new mod_vtm_helfer.klasse_xmlknoten_normal
|
|
(
|
|
"svg",
|
|
{
|
|
"xmlns": "http://www.w3.org/2000/svg",
|
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
"width": breite.toFixed(0),
|
|
"height": hoehe.toFixed(0),
|
|
"viewBox": [von_x.toFixed(4), von_y.toFixed(4), (bis_x-von_x).toFixed(4), (bis_y-von_y).toFixed(4)].join(" "),
|
|
},
|
|
kinder,
|
|
)
|
|
);
|
|
}
|
|
|
|
}
|
|
|