Exemple #1
0
        public override void Draw(ref Bitmap bmp, PointF start, float factor)
        {
            Gr = Graphics.FromImage(bmp);
            var pn = new Pen(Color.Black, 1 * factor);

            var sizeW = SizeW;
            var sizeH = SizeH;

            Factor.CountFactor(ref start, factor);
            Factor.CountFactor(ref sizeW, factor);
            Factor.CountFactor(ref sizeH, factor);

            Gr.DrawRectangle(pn, start.X, start.Y, sizeW, sizeH);
        }
Exemple #2
0
        public override void Draw(ref Bitmap bmp, PointF start, PointF end, float factor)
        {
            Factor.CountFactor(ref start, factor);
            Factor.CountFactor(ref end, factor);
            if (start.X > end.X)
            {
                var x = start.X;
                start.X = end.X;
                end.X   = x;
            }
            if (start.Y > end.Y)
            {
                var y = start.Y;
                start.Y = end.Y;
                end.Y   = y;
            }
            Gr = Graphics.FromImage(bmp);
            var blackPen = new Pen(Color.Black, 1 * factor);

            Gr.DrawRectangle(blackPen, start.X, start.Y, end.X - start.X, end.Y - start.Y);
            Gr.Dispose();
        }
Exemple #3
0
 public void dibujarPunto(Punto punto)
 {
     Gr.DrawRectangle(Lapiz, (float)punto.X, (float)punto.Y, 1, 1);
 }