// Generated by Haxe 4.3.3
package schema;

import haxe.root.*;

@SuppressWarnings(value={"rawtypes", "unchecked"})
public class Svg extends haxe.lang.HxObject
{
	static
	{
		//line 13 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
		schema.Svg.coordRE = new haxe.root.EReg(haxe.lang.Runtime.toString("^translate\\(([0-9]+,[0-9]+)\\)$"), haxe.lang.Runtime.toString(""));
		//line 15 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
		schema.Svg.PADDING = 3;
		//line 16 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
		schema.Svg.MARGIN = 60;
		//line 17 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
		schema.Svg.RXY = 20;
		//line 19 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
		schema.Svg.LETTER_HEIGHT = 16;
		//line 21 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
		schema.Svg.TEXT_STYLE = "font-family:\'Dejavu Sans Mono\', monospace;font-size:16px";
		//line 22 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
		schema.Svg.LETTER_WIDTH = 10.0;
		//line 28 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
		schema.Svg.UNDERLINE_STYLE = "text-decoration:underline";
		//line 29 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
		schema.Svg.RECT_STYLE = "stroke:black";
		//line 30 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
		schema.Svg.LINE_STYLE = "fill:none;stroke:black";
		//line 31 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
		schema.Svg.WHITE_STYLE = "fill:white;stroke:black";
		//line 32 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
		schema.Svg.DOTTED_STYLE = "2,2";
		//line 33 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
		schema.Svg.MARKERS = new haxe.root.Array<java.lang.Object>(new java.lang.Object[]{new haxe.lang.DynamicObject(new java.lang.String[]{"id", "path", "style"}, new java.lang.Object[]{"arrowMarker", ( ( ( ( ( ( "M 0 0 L " + 3 ) + " " ) + 3 ) + " L 0 " ) + 6 ) + " Z" ), "fill:black;stroke:black"}, new java.lang.String[]{"height", "width"}, new double[]{((double) (((double) (6) )) ), ((double) (((double) (3) )) )}), new haxe.lang.DynamicObject(new java.lang.String[]{"id", "path", "style"}, new java.lang.Object[]{"inheritMarker", ( ( ( ( ( ( "M 0 0 L " + 9 ) + " " ) + haxe.lang.Runtime.toString(4.5) ) + " L 0 " ) + 9 ) + " Z" ), "fill:white;stroke:black"}, new java.lang.String[]{"height", "width"}, new double[]{((double) (((double) (9) )) ), ((double) (((double) (9) )) )}), new haxe.lang.DynamicObject(new java.lang.String[]{"id", "path", "style"}, new java.lang.Object[]{"aggregationMarker", ( ( ( ( ( ( ( ( ( ( ( ( "M 0 " + haxe.lang.Runtime.toString(4.5) ) + " L " ) + 6 ) + " 0 L " ) + 12 ) + " " ) + haxe.lang.Runtime.toString(4.5) ) + " L " ) + 6 ) + " " ) + 9 ) + " Z" ), "fill:white;stroke:black"}, new java.lang.String[]{"height", "width"}, new double[]{((double) (((double) (9) )) ), ((double) (((double) (12) )) )}), new haxe.lang.DynamicObject(new java.lang.String[]{"id", "path", "style"}, new java.lang.Object[]{"compositionMarker", ( ( ( ( ( ( ( ( ( ( ( ( "M 0 " + haxe.lang.Runtime.toString(4.5) ) + " L " ) + 6 ) + " 0 L " ) + 12 ) + " " ) + haxe.lang.Runtime.toString(4.5) ) + " L " ) + 6 ) + " " ) + 9 ) + " Z" ), "fill:black;stroke:black"}, new java.lang.String[]{"height", "width"}, new double[]{((double) (((double) (9) )) ), ((double) (((double) (12) )) )})});
		//line 47 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
		schema.Svg.FILL_WHITE_STYLE = "fill:white";
	}
	
	public Svg(haxe.lang.EmptyObject empty)
	{
	}
	
	
	public Svg()
	{
		//line 12 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
		schema.Svg.__hx_ctor_schema_Svg(this);
	}
	
	
	protected static void __hx_ctor_schema_Svg(schema.Svg __hx_this)
	{
	}
	
	
	public static haxe.root.EReg coordRE;
	
	public static int PADDING;
	
	public static int MARGIN;
	
	public static int RXY;
	
	public static int LETTER_HEIGHT;
	
	public static java.lang.String TEXT_STYLE;
	
	public static double LETTER_WIDTH;
	
	public static java.lang.String UNDERLINE_STYLE;
	
	public static java.lang.String RECT_STYLE;
	
	public static java.lang.String LINE_STYLE;
	
	public static java.lang.String WHITE_STYLE;
	
	public static java.lang.String DOTTED_STYLE;
	
	public static haxe.root.Array<java.lang.Object> MARKERS;
	
	public static java.lang.String FILL_WHITE_STYLE;
	
	public static haxe.root.Xml initSvg(haxe.root.Xml doc)
	{
		//line 51 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
		haxe.root.Xml svg = haxe.root.Xml.createElement("svg");
		//line 52 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
		doc.addChild(svg);
		//line 53 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
		svg.set("xmlns", "http://www.w3.org/2000/svg");
		//line 54 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
		haxe.root.Xml defs = haxe.root.Xml.createElement("defs");
		//line 55 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
		svg.addChild(defs);
		//line 61 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
		haxe.root.Xml css = haxe.root.Xml.createElement("style");
		//line 62 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
		defs.addChild(css);
		//line 63 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
		css.addChild(haxe.root.Xml.createPCData(( ( ( ( ( ( "text,text>tspan{" + "font-family:\'Dejavu Sans Mono\', monospace;font-size:16px" ) + "} rect{" ) + "stroke:black" ) + "} line,path{" ) + "fill:none;stroke:black" ) + "}" )));
		//line 65 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
		{
			//line 65 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
			int _g = 0;
			//line 65 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
			haxe.root.Array<java.lang.Object> _g1 = schema.Svg.MARKERS;
			//line 65 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
			while (( _g < _g1.length ))
			{
				//line 65 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
				java.lang.Object desc = _g1.__get(_g);
				//line 65 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
				 ++ _g;
				//line 66 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
				haxe.root.Xml marker = haxe.root.Xml.createElement("marker");
				//line 67 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
				marker.set("id", haxe.lang.Runtime.toString(haxe.lang.Runtime.getField(desc, "id", true)));
				//line 68 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
				marker.set("orient", "auto");
				//line 69 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
				marker.set("refX", ( "" + (( ((int) (haxe.lang.Runtime.getField_f(desc, "width", true)) ) + 1 )) ));
				//line 70 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
				marker.set("refY", ( "" + haxe.lang.Runtime.toString(( ((double) (((int) (haxe.lang.Runtime.getField_f(desc, "height", true)) )) ) / ((double) (2) ) )) ));
				//line 71 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
				marker.set("markerHeight", ( "" + ((int) (haxe.lang.Runtime.getField_f(desc, "height", true)) ) ));
				//line 72 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
				marker.set("markerWidth", ( "" + ((int) (haxe.lang.Runtime.getField_f(desc, "width", true)) ) ));
				//line 73 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
				haxe.root.Xml path = haxe.root.Xml.createElement("path");
				//line 74 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
				path.set("style", haxe.lang.Runtime.toString(haxe.lang.Runtime.getField(desc, "style", true)));
				//line 75 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
				path.set("d", haxe.lang.Runtime.toString(haxe.lang.Runtime.getField(desc, "path", true)));
				//line 76 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
				marker.addChild(path);
				//line 77 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
				defs.addChild(marker);
			}
			
		}
		
		//line 79 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
		return svg;
	}
	
	
	public static void placeObjects(java.lang.Object objects, haxe.root.Xml svg, int height, int width)
	{
		//line 84 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
		haxe.root.Array<java.lang.Object> _g = new haxe.root.Array<java.lang.Object>(new java.lang.Object[]{});
		//line 84 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
		{
			//line 84 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
			int _g1 = 0;
			//line 84 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
			int _g2 = height;
			//line 84 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
			while (( _g1 < _g2 ))
			{
				//line 84 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
				int i = _g1++;
				//line 84 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
				_g.push(0);
			}
			
		}
		
		//line 84 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
		haxe.root.Array<java.lang.Object> heights = _g;
		//line 85 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
		haxe.root.Array<java.lang.Object> _g3 = new haxe.root.Array<java.lang.Object>(new java.lang.Object[]{});
		//line 85 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
		{
			//line 85 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
			int _g4 = 0;
			//line 85 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
			int _g5 = width;
			//line 85 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
			while (( _g4 < _g5 ))
			{
				//line 85 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
				int i1 = _g4++;
				//line 85 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
				_g3.push(0);
			}
			
		}
		
		//line 85 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
		haxe.root.Array<java.lang.Object> widths = _g3;
		//line 86 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
		{
			//line 86 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
			java.lang.Object o = ((java.lang.Object) (haxe.lang.Runtime.callField(objects, "iterator", null)) );
			//line 86 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
			while (haxe.lang.Runtime.toBool(((java.lang.Boolean) (haxe.lang.Runtime.callField(o, "hasNext", null)) )))
			{
				//line 86 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
				model.Obj o1 = ((model.Obj) (haxe.lang.Runtime.callField(o, "next", null)) );
				//line 87 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
				if (( o1.svg != null )) 
				{
					//line 88 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
					haxe.root.Xml _this = o1.svg;
					//line 88 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
					if (( ( _this.nodeType != haxe.root.Xml.Document ) && ( _this.nodeType != haxe.root.Xml.Element ) )) 
					{
						//line 88 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
						throw ((java.lang.RuntimeException) (haxe.Exception.thrown(( "Bad node type, expected Element or Document but found " + _Xml.XmlType_Impl_.toString(_this.nodeType) ))) );
					}
					
					//line 88 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
					int w = ((int) (haxe.lang.Runtime.toInt(haxe.root.Std.parseInt(_this.children.__get(0).get("width")))) );
					//line 89 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
					haxe.root.Xml _this1 = o1.svg;
					//line 89 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
					if (( ( _this1.nodeType != haxe.root.Xml.Document ) && ( _this1.nodeType != haxe.root.Xml.Element ) )) 
					{
						//line 89 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
						throw ((java.lang.RuntimeException) (haxe.Exception.thrown(( "Bad node type, expected Element or Document but found " + _Xml.XmlType_Impl_.toString(_this1.nodeType) ))) );
					}
					
					//line 89 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
					int h = ((int) (haxe.lang.Runtime.toInt(haxe.root.Std.parseInt(_this1.children.__get(0).get("height")))) );
					//line 90 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
					if (( w > ((int) (haxe.lang.Runtime.toInt(widths.__get(o1.col))) ) )) 
					{
						//line 90 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
						int __temp_expr1 = ((int) (haxe.lang.Runtime.toInt(widths.__set(o1.col, w))) );
					}
					
					//line 91 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
					if (( h > ((int) (haxe.lang.Runtime.toInt(heights.__get(o1.row))) ) )) 
					{
						//line 91 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
						int __temp_expr2 = ((int) (haxe.lang.Runtime.toInt(heights.__set(o1.row, h))) );
					}
					
				}
				
			}
			
		}
		
		//line 95 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
		int th = 3;
		//line 96 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
		haxe.root.Array<java.lang.Object> lineOffsets = new haxe.root.Array<java.lang.Object>();
		//line 97 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
		{
			//line 97 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
			int _g6 = 0;
			//line 97 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
			int _g7 = height;
			//line 97 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
			while (( _g6 < _g7 ))
			{
				//line 97 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
				int i2 = _g6++;
				//line 98 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
				int __temp_expr3 = ((int) (haxe.lang.Runtime.toInt(lineOffsets.__set(i2, th))) );
				//line 99 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
				th = ( ( th + ((int) (haxe.lang.Runtime.toInt(heights.__get(i2))) ) ) + (( (( ((int) (haxe.lang.Runtime.toInt(heights.__get(i2))) ) != 0 )) ? (60) : (0) )) );
			}
			
		}
		
		//line 101 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
		int tw = 3;
		//line 102 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
		haxe.root.Array<java.lang.Object> columnOffsets = new haxe.root.Array<java.lang.Object>();
		//line 103 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
		{
			//line 103 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
			int _g8 = 0;
			//line 103 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
			int _g9 = width;
			//line 103 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
			while (( _g8 < _g9 ))
			{
				//line 103 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
				int i3 = _g8++;
				//line 104 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
				int __temp_expr4 = ((int) (haxe.lang.Runtime.toInt(columnOffsets.__set(i3, tw))) );
				//line 105 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
				tw = ( ( tw + ((int) (haxe.lang.Runtime.toInt(widths.__get(i3))) ) ) + (( (( ((int) (haxe.lang.Runtime.toInt(widths.__get(i3))) ) != 0 )) ? (60) : (0) )) );
			}
			
		}
		
		//line 109 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
		{
			//line 109 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
			java.lang.Object o2 = ((java.lang.Object) (haxe.lang.Runtime.callField(objects, "iterator", null)) );
			//line 109 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
			while (haxe.lang.Runtime.toBool(((java.lang.Boolean) (haxe.lang.Runtime.callField(o2, "hasNext", null)) )))
			{
				//line 109 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
				model.Obj o3 = ((model.Obj) (haxe.lang.Runtime.callField(o2, "next", null)) );
				//line 110 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
				if (( o3.svg != null )) 
				{
					//line 111 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
					int columnOffsets1 = ((int) (haxe.lang.Runtime.toInt(columnOffsets.__get(o3.col))) );
					//line 111 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
					int widths1 = ((int) (haxe.lang.Runtime.toInt(widths.__get(o3.col))) );
					//line 111 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
					haxe.root.Xml _this2 = o3.svg;
					//line 111 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
					if (( ( _this2.nodeType != haxe.root.Xml.Document ) && ( _this2.nodeType != haxe.root.Xml.Element ) )) 
					{
						//line 111 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
						throw ((java.lang.RuntimeException) (haxe.Exception.thrown(( "Bad node type, expected Element or Document but found " + _Xml.XmlType_Impl_.toString(_this2.nodeType) ))) );
					}
					
					//line 111 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
					int w1 = ((int) (( columnOffsets1 + ( ((double) ((( ((int) (widths1) ) - ((int) (haxe.lang.Runtime.toInt(haxe.root.Std.parseInt(_this2.children.__get(0).get("width")))) ) ))) ) / 2 ) )) );
					//line 112 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
					int lineOffsets1 = ((int) (haxe.lang.Runtime.toInt(lineOffsets.__get(o3.row))) );
					//line 112 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
					int heights1 = ((int) (haxe.lang.Runtime.toInt(heights.__get(o3.row))) );
					//line 112 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
					haxe.root.Xml _this3 = o3.svg;
					//line 112 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
					if (( ( _this3.nodeType != haxe.root.Xml.Document ) && ( _this3.nodeType != haxe.root.Xml.Element ) )) 
					{
						//line 112 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
						throw ((java.lang.RuntimeException) (haxe.Exception.thrown(( "Bad node type, expected Element or Document but found " + _Xml.XmlType_Impl_.toString(_this3.nodeType) ))) );
					}
					
					//line 112 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
					int h1 = ((int) (( lineOffsets1 + ( ((double) ((( ((int) (heights1) ) - ((int) (haxe.lang.Runtime.toInt(haxe.root.Std.parseInt(_this3.children.__get(0).get("height")))) ) ))) ) / 2 ) )) );
					//line 113 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
					o3.svg.set("transform", ( ( ( ( "translate(" + w1 ) + "," ) + h1 ) + ")" ));
				}
				
			}
			
		}
		
		//line 119 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
		svg.set("width", haxe.root.Std.string(tw));
		//line 120 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
		svg.set("height", haxe.root.Std.string(th));
	}
	
	
	public static java.lang.Object getTransform(haxe.root.Xml svg)
	{
		//line 124 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
		java.lang.String transform1 = svg.get("transform");
		//line 125 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
		java.lang.Object p = new haxe.lang.DynamicObject(new java.lang.String[]{}, new java.lang.Object[]{}, new java.lang.String[]{"x", "y"}, new double[]{((double) (((double) (0) )) ), ((double) (((double) (0) )) )});
		//line 126 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
		if (( transform1 != null )) 
		{
			//line 127 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
			haxe.root.Array<java.lang.String> xy = haxe.lang.StringExt.split(schema.Svg.coordRE.replace(svg.get("transform"), "$1"), ",");
			//line 128 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
			int __temp_expr1 = ((int) (haxe.lang.Runtime.toInt(haxe.lang.Runtime.setField(p, "x", haxe.root.Std.parseInt(xy.__get(0))))) );
			//line 129 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
			int __temp_expr2 = ((int) (haxe.lang.Runtime.toInt(haxe.lang.Runtime.setField(p, "y", haxe.root.Std.parseInt(xy.__get(1))))) );
		}
		
		//line 131 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
		return p;
	}
	
	
	public static schema.Box getBox(haxe.root.Xml svg)
	{
		//line 135 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
		if (( ( svg.nodeType != haxe.root.Xml.Document ) && ( svg.nodeType != haxe.root.Xml.Element ) )) 
		{
			//line 135 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
			throw ((java.lang.RuntimeException) (haxe.Exception.thrown(( "Bad node type, expected Element or Document but found " + _Xml.XmlType_Impl_.toString(svg.nodeType) ))) );
		}
		
		//line 135 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
		haxe.root.Xml root = svg.children.__get(0);
		//line 136 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
		return new schema.Box(((java.lang.Object) (schema.Svg.getTransform(svg)) ), ((int) (haxe.lang.Runtime.toInt(haxe.root.Std.parseInt(root.get("width")))) ), ((int) (haxe.lang.Runtime.toInt(haxe.root.Std.parseInt(root.get("height")))) ));
	}
	
	
	public static haxe.root.Xml getSvgLine(schema.Line line, java.lang.String startLabel, java.lang.String endLabel, java.lang.String endMarkerId)
	{
		//line 140 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
		haxe.root.Xml g = haxe.root.Xml.createElement("g");
		//line 141 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
		haxe.root.Xml l = haxe.root.Xml.createElement("line");
		//line 142 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
		g.addChild(l);
		//line 143 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
		l.set("x1", haxe.root.Std.string(((int) (haxe.lang.Runtime.getField_f(line.start, "x", true)) )));
		//line 144 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
		l.set("x2", haxe.root.Std.string(((int) (haxe.lang.Runtime.getField_f(line.end, "x", true)) )));
		//line 145 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
		l.set("y1", haxe.root.Std.string(((int) (haxe.lang.Runtime.getField_f(line.start, "y", true)) )));
		//line 146 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
		l.set("y2", haxe.root.Std.string(((int) (haxe.lang.Runtime.getField_f(line.end, "y", true)) )));
		//line 147 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
		schema.Svg.addLineLabels(line, startLabel, endLabel, g, null);
		//line 148 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
		if (( endMarkerId != null )) 
		{
			//line 149 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
			l.set("marker-end", ( ( "url(#" + endMarkerId ) + ")" ));
		}
		
		//line 151 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
		return g;
	}
	
	
	public static haxe.root.Xml getSvgCurve(schema.Curve curve, java.lang.String startLabel, java.lang.String endLabel, java.lang.String endMarkerId)
	{
		//line 155 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
		haxe.root.Xml g = haxe.root.Xml.createElement("g");
		//line 156 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
		haxe.root.Xml p = haxe.root.Xml.createElement("path");
		//line 157 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
		g.addChild(p);
		//line 158 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
		p.set("d", ( ( ( ( ( ( ( ( ( ( ( "M " + ((int) (haxe.lang.Runtime.getField_f(curve.start, "x", true)) ) ) + " " ) + ((int) (haxe.lang.Runtime.getField_f(curve.start, "y", true)) ) ) + " Q " ) + ((int) (haxe.lang.Runtime.getField_f(curve.middle, "x", true)) ) ) + " " ) + ((int) (haxe.lang.Runtime.getField_f(curve.middle, "y", true)) ) ) + " " ) + ((int) (haxe.lang.Runtime.getField_f(curve.end, "x", true)) ) ) + " " ) + ((int) (haxe.lang.Runtime.getField_f(curve.end, "y", true)) ) ));
		//line 159 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
		schema.Svg.addLineLabels(curve, startLabel, endLabel, g, null);
		//line 160 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
		if (( endMarkerId != null )) 
		{
			//line 161 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
			p.set("marker-end", ( ( "url(#" + endMarkerId ) + ")" ));
		}
		
		//line 163 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
		return g;
	}
	
	
	public static haxe.root.Xml getQuadCurve(schema.QuadCurve qc, java.lang.String startLabel, java.lang.String endLabel, java.lang.String endMarkerId)
	{
		//line 167 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
		haxe.root.Xml g = haxe.root.Xml.createElement("g");
		//line 168 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
		haxe.root.Xml p = haxe.root.Xml.createElement("path");
		//line 169 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
		g.addChild(p);
		//line 170 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
		p.set("d", ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "M " + ((int) (haxe.lang.Runtime.getField_f(qc.start, "x", true)) ) ) + " " ) + ((int) (haxe.lang.Runtime.getField_f(qc.start, "y", true)) ) ) + " L " ) + ((int) (haxe.lang.Runtime.getField_f(qc.point1, "x", true)) ) ) + " " ) + ((int) (haxe.lang.Runtime.getField_f(qc.point1, "y", true)) ) ) + " L " ) + ((int) (haxe.lang.Runtime.getField_f(qc.point2, "x", true)) ) ) + " " ) + ((int) (haxe.lang.Runtime.getField_f(qc.point2, "y", true)) ) ) + " L " ) + ((int) (haxe.lang.Runtime.getField_f(qc.end, "x", true)) ) ) + " " ) + ((int) (haxe.lang.Runtime.getField_f(qc.end, "y", true)) ) ));
		//line 171 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
		schema.Svg.addLineLabels(qc, startLabel, endLabel, g, null);
		//line 172 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
		if (( endMarkerId != null )) 
		{
			//line 173 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
			p.set("marker-end", ( ( "url(#" + endMarkerId ) + ")" ));
		}
		
		//line 175 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
		return g;
	}
	
	
	public static void addLineLabels(schema.Line line, java.lang.String startLabel, java.lang.String endLabel, haxe.root.Xml g, java.lang.Object pos)
	{
		//line 178 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
		int pos1 = ( (haxe.lang.Runtime.eq(pos, null)) ? (1) : (((int) (haxe.lang.Runtime.toInt(pos)) )) );
		//line 179 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
		if (( startLabel != null )) 
		{
			//line 180 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
			haxe.root.Xml sLabel = haxe.root.Xml.createElement("text");
			//line 181 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
			g.addChild(sLabel);
			//line 182 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
			sLabel.addChild(haxe.root.Xml.createPCData(startLabel));
			//line 183 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
			java.lang.Object sLabelPos = line.getLabelPos(startLabel, false, pos1);
			//line 184 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
			sLabel.set("x", haxe.root.Std.string(((int) (haxe.lang.Runtime.getField_f(sLabelPos, "x", true)) )));
			//line 185 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
			sLabel.set("y", haxe.root.Std.string(((int) (haxe.lang.Runtime.getField_f(sLabelPos, "y", true)) )));
		}
		
		//line 187 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
		if (( endLabel != null )) 
		{
			//line 188 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
			haxe.root.Xml eLabel = haxe.root.Xml.createElement("text");
			//line 189 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
			g.addChild(eLabel);
			//line 190 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
			eLabel.addChild(haxe.root.Xml.createPCData(endLabel));
			//line 191 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
			java.lang.Object eLabelPos = line.getLabelPos(endLabel, true, pos1);
			//line 192 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
			eLabel.set("x", haxe.root.Std.string(((int) (haxe.lang.Runtime.getField_f(eLabelPos, "x", true)) )));
			//line 193 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/schema/Svg.hx"
			eLabel.set("y", haxe.root.Std.string(((int) (haxe.lang.Runtime.getField_f(eLabelPos, "y", true)) )));
		}
		
	}
	
	
}


