Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Drawing shapes

 
Akil Kumar
Ranch Hand
Posts: 83
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I want to draw three circles with scale on the rim. These three circles will start from the same coordinate but with different radius.
When I run this code the second circle is colliding or overlapping the first one. Can anyone give some idea how to draw these three circles without overlapping each other?



Thanks
 
Nidhi Sar
Ranch Hand
Posts: 252
Android Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Akil Kumar wrote:When I run this code the second circle is colliding or overlapping the first one. Can anyone give some idea how to draw these three circles without overlapping each other?


Hi Akil,

Not sure what you mean by colliding or overlapping. Both the circles have the same centre, so of course one is being drawn over the other. If you try this code (same code as yours, Line A just removes the filling from the circle) you can see where they are being drawn:


If you don't want the circles to overlap, you will have to give them different centres.
 
Akil Kumar
Ranch Hand
Posts: 83
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Nidhi,

Thanks it helped. I have attached an image. I am intending to bring some scale along the rim of the circle like how a speedometer will look like.
I have to give the minimum scale limit and the maximum scale limit. I have to specify how many segments or sector it can have between each scale.
Can you please provide some idea for this?

Thanks,
ICE-35.jpg
[Thumbnail for ICE-35.jpg]
 
Nidhi Sar
Ranch Hand
Posts: 252
Android Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Akil Kumar wrote:Hi Nidhi,

Thanks it helped. I have attached an image. I am intending to bring some scale along the rim of the circle like how a speedometer will look like.
I have to give the minimum scale limit and the maximum scale limit. I have to specify how many segments or sector it can have between each scale.
Can you please provide some idea for this?

Thanks,


Could you please post what you have tried till now... it would be easier to provide ideas based on that....
 
Akil Kumar
Ranch Hand
Posts: 83
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


I am trying use those scale parameters and draw a scale on the circle. This should like a watch dial with a scale on it.

Thanks,
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic