Shapes.draw C# (CSharp) Method

draw() protected method

protected draw ( ) : void
return void
    protected override void draw()
    {
        background(255);

        layout2D();
        fill(color(0, 0, 255));
        shape(square, 25, 25);

        shape(circle, mouseX, mouseY);

        fill(color(255, 0, 0));
        shape(square, 25 + width/2, 25);

        for(int i=0; i<4; i++) {
            star.fill(color(255, 255, 255 - i * 60));
            shape(star, 100 + width / 5 * i, 100 + 100 * i);
        }
    }

Usage Example

Ejemplo 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);
        }
All Usage Examples Of Shapes::draw