944,204 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Marked Solved
  • Views: 486
  • Java RSS
Nov 5th, 2009
0

Drwaing Circles?

Expand Post »
hi, i want to be able to draw two eyes with are exactly the same in radius and colour etc next to eachother. So when i open the window the pair of eyes are there in the centre. I have managed to get one eye but i dnt have a clue to how to get one beside it, i am not sure hw to.. here is my code for the first eye and function should be calling the drawCircle six times.
please help
Java Syntax (Toggle Plain Text)
  1. from graphics import *
  2. import math
  3. def drawCircle(win, centre, radius, colour):
  4. circle = Circle(centre, radius)
  5. circle.setFill(colour)
  6. circle.setWidth(2)
  7. circle.draw(win)
  8.  
  9. def drawTarget():
  10. win = GraphWin()
  11. centre = Point(100,100)
  12. drawCircle(win, centre, 40, "white")
  13. drawCircle(win, centre, 20, "blue")
  14. drawCircle(win, centre, 10, "black")
Similar Threads
Reputation Points: 10
Solved Threads: 2
Light Poster
jaison2 is offline Offline
33 posts
since Nov 2009
Nov 5th, 2009
0
Re: Drwaing Circles?
That isn't Java code. Perhaps you meant to post this in another forum?
Moderator
Featured Poster
Reputation Points: 3239
Solved Threads: 839
Posting Genius
Ezzaral is offline Offline
6,761 posts
since May 2007
Nov 5th, 2009
0
Re: Drwaing Circles?
yep.. sorry guys.. this is python.. sorry for wasting ur time...
Reputation Points: 10
Solved Threads: 2
Light Poster
jaison2 is offline Offline
33 posts
since Nov 2009

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: Java word guessing game - problem
Next Thread in Java Forum Timeline: simple question about my code





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC