void Triangle(Tesselate_Tests.Vertex Vertex1, Tesselate_Tests.Vertex Vertex2, Tesselate_Tests.Vertex Vertex3, RendererBase renderer) { PathStorage triangle = new PathStorage(); triangle.move_to(Vertex1.m_X * m_Scale + m_XOffset, Vertex1.m_Y * m_Scale + m_YOffset); triangle.line_to(Vertex2.m_X * m_Scale + m_XOffset, Vertex2.m_Y * m_Scale + m_YOffset); triangle.line_to(Vertex3.m_X * m_Scale + m_XOffset, Vertex3.m_Y * m_Scale + m_YOffset); renderer.Render(triangle, m_TriangleColor.GetAsRGBA_Bytes()); }
void Line(Tesselate_Tests.Vertex Vertex1, Tesselate_Tests.Vertex Vertex2, double lineWidth, RendererBase renderer, bool ArrowTip) { PathStorage line = new PathStorage(); line.move_to(Vertex1.m_X * m_Scale + m_XOffset, Vertex1.m_Y * m_Scale + m_YOffset); line.line_to(Vertex2.m_X * m_Scale + m_XOffset, Vertex2.m_Y * m_Scale + m_YOffset); // Drawing as an outline conv_stroke wideLine = new conv_stroke(line); wideLine.width(lineWidth); renderer.Render(wideLine, m_LineColor.GetAsRGBA_Bytes()); if (ArrowTip) { Ellipse Dot = new Ellipse( (Vertex2.m_X * m_Scale * 9 + Vertex1.m_X * m_Scale) / 10 + m_XOffset, (Vertex2.m_Y * m_Scale * 9 + Vertex1.m_Y * m_Scale) / 10 + m_YOffset, 3, 3); GetRenderer().Render(Dot, m_LineColor.GetAsRGBA_Bytes()); } }