![]() |
|
#1
|
|||
|
|||
drawing circlesIn my program I'm taking the centre co-ordinates and the radius from the user ..now how can I use this information to draw a circle. The ellipse function takes four co-ordinates ..how do I use the ellipse to draw the circle and also how can I determine if the given co-ordinates lie inside the cirlce.
|
|
#2
|
|||
|
|||
Re: drawing circlesQuote:
So, for example, with the Windows GDI Ellipse() function, if the center coordinates are (cx, cy) and the handle is hDC, then draw a circle with a given radius with: CPP / C++ / C Code:
Quote:
Given a circle with center at coordinates (cx,cy), and given a point with coordinates (x,y): If the distance from (x,y) to (cx,cy) is less than the radius, the point is inside the circle. Regards, Dave |
Recent GIDBlog
Developing GUIs with wxPython (Part 2) by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| MFC - drawing overlapping circles | komalwaseem | MS Visual C++ / MFC Forum | 1 | 24-Apr-2008 05:29 |
| Drawing order | Z_guy | FLTK Forum | 6 | 09-Sep-2007 12:57 |
| Free Hand Drawing in FLTK | nimeesh | FLTK Forum | 2 | 31-Aug-2007 02:58 |
| Undo Drawing | Nelly | MS Visual C++ / MFC Forum | 3 | 10-May-2004 21:14 |
| Back to the drawing board... | spudtheimpaler | C Programming Language | 9 | 15-Mar-2004 10:12 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The