Beispiel #1
0
        public void DrawRectangle(Brush brush, Pen pen, int x, int y, int width, int height)
        {
            VerifyAccess();

            // Fill
            //
            if (brush != null)
            {
                brush.RenderRectangle(_bitmap, pen, _x + x, _y + y, width, height);
            }

            // Pen
            else if (pen != null && pen.Thickness > 0)
            {
                _bitmap.DrawRectangle(pen.Color, pen.Thickness, _x + x, _y + y, width, height, 0, 0,
                                      (Color)0, 0, 0, (Color)0, 0, 0, 0);
            }
        }
        public void DrawRectangle(Brush brush, Pen pen, int x, int y, int width, int height)
        {
            VerifyAccess();

            // Fill
            //
            if (brush != null)
            {
                brush.RenderRectangle(_bitmap, pen, _x + x, _y + y, width, height);
            }

            // Pen
            else if (pen != null && pen.Thickness > 0)
            {
                _bitmap.DrawRectangle(pen.Color, pen.Thickness, _x + x, _y + y, width, height, 0, 0,
                                      (Color)0, 0, 0, (Color)0, 0, 0, 0);
            }
        }