Exemplo n.º 1
0
 public static void DrawRectangle(Vector2 p0, Vector2 p1, Vector2 p2, Vector2 p3, Color color, float lineWidth)
 {
     GuiDrawing.DrawLine(p0, p1, color, lineWidth, false);
     GuiDrawing.DrawLine(p1, p2, color, lineWidth, false);
     GuiDrawing.DrawLine(p2, p3, color, lineWidth, false);
     GuiDrawing.DrawLine(p3, p0, color, lineWidth, false);
 }
Exemplo n.º 2
0
        // Other than method name, DrawBezierLine is unchanged from Linusmartensson's original implementation.
        public static void DrawBezierLine(Vector2 start, Vector2 startTangent, Vector2 end, Vector2 endTangent, Color color, float width, bool antiAlias, int segments)
        {
            Vector2 lastV = CubeBezier(start, startTangent, end, endTangent, 0);

            for (int i = 1; i < segments + 1; ++i)
            {
                Vector2 v = CubeBezier(start, startTangent, end, endTangent, i / (float)segments);
                GuiDrawing.DrawLine(lastV, v, color, width, antiAlias);
                lastV = v;
            }
        }