draw() protected method

protected draw ( ) : void
return void
Esempio n. 1
0
        private void drawRectangle(int length, int breadth)
        {
            string shape     = "rectangle";
            int    x         = this.paintPanel.Width / 7;
            int    y         = this.paintPanel.Height / 7;
            Shapes rectangle = factory.getShape(shape);

            rectangle.set(brushColor, moveX ?? x, moveY ?? y, length, breadth);
            rectangle.draw(graphics);
        }
Esempio n. 2
0
        private void drawCircle(int radius)
        {
            string shape = "circle";
            int    x     = this.paintPanel.Width / 4;
            int    y     = this.paintPanel.Height / 4;

            Shapes circle = factory.getShape(shape);

            circle.set(brushColor, moveX ?? x, moveY ?? y, radius);
            circle.draw(graphics);
        }
Esempio n. 3
0
        private void circlButton_Click(object sender, EventArgs e)/// to draw circle
        {
            string shape = "circle";
            int    x     = this.paintPanel.Width / 4;
            int    y     = this.paintPanel.Height / 4;

            Shapes circle = factory.getShape(shape);

            circle.set(brushColor, x, y, x / 2);
            circle.draw(graphics);
        }
Esempio n. 4
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="side1">width of triangle </param>
        /// <param name="side2">height of triangle</param>
        private void drawTriangle(int side1, int side2)
        {
            string shape = "triangle";

            int x = this.paintPanel.Width / 4;
            int y = this.paintPanel.Height / 4;

            Shapes Triangle = factory.getShape(shape);

            Triangle.set(brushColor, moveX ?? x, moveY ?? y, side1, side2);
            Triangle.draw(graphics);
        }