Пример #1
0
        public void DrawRectangle(Rectangle rect, SolidColor color, float width, LineStyles lineStyle)
        {
            using (var p = new Paint())
            {
                p.Color       = color;
                p.StrokeWidth = width;

                this.DrawRectangle(p, rect);
            }
        }
Пример #2
0
        public void DrawAndFillRectangle(SolidColor lineColor, IColor fillColor, Rectangle rect, float weight, LineStyles lineStyle)
        {
            if (fillColor is SolidColor)
            {
                this.FillRectangle(rect, (SolidColor)fillColor);
            }

            this.DrawRectangle(rect, lineColor, weight, lineStyle);
        }
Пример #3
0
        public void DrawLine(float x1, float y1, float x2, float y2, SolidColor color, float width, LineStyles style)
        {
            using (var p = new Paint())
            {
                p.Color       = color;
                p.StrokeWidth = width;

                switch (style)
                {
                case LineStyles.Dot:
                    p.SetPathEffect(new DashPathEffect(new float[] { 1, 1 }, 1));
                    break;
                }

                this.canvas.DrawLine(x1, y1, x2, y2, p);
            }
        }
Пример #4
0
 public void DrawLines(Point[] points, int start, int length, SolidColor color, float width, LineStyles style)
 {
     // TODO
 }
Пример #5
0
 public void DrawLine(Point startPoint, Point endPoint, SolidColor color, float width, LineStyles style)
 {
     this.DrawLine(startPoint.X, startPoint.Y, endPoint.X, endPoint.Y, color, width, style);
 }