@@ -105,53 +105,22 @@ public void Draw()
105105 GL . DrawElements ( PrimitiveType . LineStrip , _indexCount , DrawElementsType . UnsignedInt , 0 ) ;
106106
107107 // Can't do a switch because a switch need a const and a type is not
108- //if (GetType() == typeof(SVGLine))
109- //{
110- // GL.Enable(EnableCap.LineSmooth);
111- // GL.LineWidth(1.0f); // TODO: Lines are not really great (needed anti aliasing)
112- // GL.DrawElements(PrimitiveType.Lines, _indexCount, DrawElementsType.UnsignedInt, 0);
113- // GL.Disable(EnableCap.LineSmooth);
114- //}
115- //else if (GetType() == typeof(SVGPath))
116- //{
117- // //Console.WriteLine("Draw pathttttttttttttttttt");
118- // /*
119- // foreach (DrawAttribute attr in ((SVGPath)this).DrawAttributes)
120- // {
121- // // Can't do a switch because a switch need a const and a type is not
122- // if (attr.GetType() == typeof(MoveTo))
123- // continue;
124- // else if (attr.GetType() == typeof(LineTo))
125- // {
126- // //((LineTo)attr).
127- // continue;
128-
129- // }
130- // else if (attr.GetType() == typeof(HorizontalLineTo))
131- // continue;
132- // else if (attr.GetType() == typeof(VerticalLineTo))
133- // continue;
134- // else if (attr.GetType() == typeof(CurveTo))
135- // continue;
136- // else if (attr.GetType() == typeof(SmoothCurveTo))
137- // continue;
138- // else if (attr.GetType() == typeof(QuadraticBezierCurveTo))
139- // continue;
140- // else if (attr.GetType() == typeof(SmoothQuadraticBezierCurveTo))
141- // continue;
142- // else if (attr.GetType() == typeof(EllipticalArc))
143- // continue;
144- // else if (attr.GetType() == typeof(ClosePath))
145- // continue;
146- // }
147- // */
148- // //GL.Enable(EnableCap.LineSmooth);
149- // //GL.LineWidth(1.0f); // TODO: Lines are not really great (needed anti aliasing)
150- // GL.DrawElements(PrimitiveType.LineStrip, _indexCount, DrawElementsType.UnsignedInt, 0);
151- // //GL.Disable(EnableCap.LineSmooth);
152- //}
153- //else
154- // GL.DrawElements(PrimitiveType.Triangles, _indexCount, DrawElementsType.UnsignedInt, 0);
108+ if ( GetType ( ) == typeof ( SVGLine ) )
109+ {
110+ GL . Enable ( EnableCap . LineSmooth ) ;
111+ GL . LineWidth ( 1.0f ) ; // TODO: Lines are not really great (needed anti aliasing)
112+ GL . DrawElements ( PrimitiveType . Lines , _indexCount , DrawElementsType . UnsignedInt , 0 ) ;
113+ GL . Disable ( EnableCap . LineSmooth ) ;
114+ }
115+ else if ( GetType ( ) == typeof ( SVGPath ) )
116+ {
117+ GL . Enable ( EnableCap . LineSmooth ) ;
118+ GL . LineWidth ( 1.0f ) ; // TODO: Lines are not really great (needed anti aliasing)
119+ GL . DrawElements ( PrimitiveType . LineStrip , _indexCount , DrawElementsType . UnsignedInt , 0 ) ;
120+ GL . Disable ( EnableCap . LineSmooth ) ;
121+ }
122+ else
123+ GL . DrawElements ( PrimitiveType . Triangles , _indexCount , DrawElementsType . UnsignedInt , 0 ) ;
155124 }
156125 public void DeleteObjects ( )
157126 {
0 commit comments