This site requires JavaScript, please enable it in your browser!
Greenfoot back
GreenGoo
GreenGoo wrote ...

2014/8/23

Graphics

GreenGoo GreenGoo

2014/8/23

#
Why does this not make a blue circle?!
public void drawSelf() 
    {
        GreenfootImage circle = new GreenfootImage(radius, radius);
        circle.setColor(Color.BLUE);
        circle.drawOval(getX(), getY(), radius, radius);
        circle.fill();
        this.setImage(circle);
    }
Zamoht Zamoht

2014/8/23

#
GreenfootImage circle = new GreenfootImage(radius, radius); circle.setColor(Color.BLUE); circle.fillOval(0, 0, radius, radius); this.setImage(circle); This should work.
GreenGoo GreenGoo

2014/8/23

#
Oh! I misunderstood the method! Okay thanks
You need to login to post a reply.