• Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

We're also offering banner ads on our site from just \$5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.

# encircle any point on the screen

Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

### #1saman_artorious  Members   -  Reputation: 145

Like
0Likes
Like

Posted 25 August 2013 - 04:07 AM

How can I draw a circle surround any given point on the screen? Normally, OpenGL draws the circle centered at (0,0). My position indicator consists of pixels rendered as rectangles. The number of pixels is a multiplication of angle and range given to me. For example, if ppi shall be drawn for 360 degree and range 1000, then I draw 360 * 1000 pixels on the screen. Accordingly, any point is detected with its relevant angle and range. Let's say a point exists at 50 degree and range 500. How can I encircle that point now?

### #2saman_artorious  Members   -  Reputation: 145

Like
1Likes
Like

Posted 25 August 2013 - 06:34 AM

I solved the problem. I calculated the central coordinate of the target circle and added it to the original drawing which is rendered at (0,0).

Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

PARTNERS