Ejemplo n.º 1
0
        /// <summary>
        /// Draws the outline of a shape. Drawing filled shapes is (currently?) only possible for AABB's. See DrawFilledRect.
        /// </summary>
        public static void DrawShapeOutline(Shape shape, Color color, int depth = 0)
        {
            //add the start point at the end of the array so it will draw the last line
            Point[] shapePoints = shape.GetPoints();
            Point[] points = new Point[shapePoints.Length + 1];
            shapePoints.CopyTo(points, 0);
            points[points.Length - 1] = points[0];

            DrawJobs.Add(new LineDrawJob(depth, shape.GetEnclosingRectangle(), points, color));
        }
Ejemplo n.º 2
0
 public static void DrawFilledRect(Rectangle rect, Color color, int depth = 0)
 {
     DrawJobs.Add(new FilledRectDrawJob(depth, rect, color));
 }
Ejemplo n.º 3
0
 public static void Draw(Line line, Color color, int depth = 0)
 {
     DrawJobs.Add(new LineDrawJob(depth, line.GetEnclosingRectangle(), line.GetPoints(), color));
 }
Ejemplo n.º 4
0
 public static void Draw(string str, Font font, Point pos, Color color, CombinedAlignment alignment = CombinedAlignment.TopLeft, int depth = 0)
 {
     font.Draw(str, pos, color, alignment, depth);
 }
Ejemplo n.º 5
0
 public static void Draw(Point point, Color color, int depth = 0)
 {
     DrawJobs.Add(new LineDrawJob(depth, new Rectangle(point, Point.Zero), new Point[] { point, point }, color));
 }