Hi,
How do I draw a filled circle? I think I have to use AreaEllipse() and AreaInit() and AreaEnd().
I have read the documentation on these routines but I can't find an example anywhere.
A code example would probably help to explain what this documentation is on about.
Drawing a filled circle
Re: Drawing a filled circle
Take a look at DrawCircle()
https://wiki.amigaos.net/wiki/Graphics_ ... nd_Circles
https://wiki.amigaos.net/wiki/Graphics_ ... nd_Circles
Enjoy the power of ARexx http://aminet.net/package/gfx/conv/GPS2URL
- nbache
- Beta Tester
- Posts: 1716
- Joined: Mon Dec 20, 2010 7:25 pm
- Location: Copenhagen, Denmark
- Contact:
Re: Drawing a filled circle
- and make sure you scroll down somewhat to also read https://wiki.amigaos.net/wiki/Graphics_ ... Operations and https://wiki.amigaos.net/wiki/Graphics_ ... Operations - they look relevant also.
Best regards,
Niels
Best regards,
Niels
- thomasrapp
- Posts: 310
- Joined: Sat Jun 18, 2011 11:22 pm
Re: Drawing a filled circle
The main thing to know about Area operations is that you need to set up a TmpRas and AreaInfo in the RastPort, otherwise those calls won't draw anything.
Then you can use AreaMove, AreaDraw and AreaEllipse just as you would use Move, Draw and DrawEllipse for simple drawing. At the end you have to call AreaEnd, then the area will be drawn and filled.
Here is a rather old example: https://thomas-rapp.homepage.t-online.d ... piechart.c
To draw a circle you just call AreaEllipse followed by AreaEnd.
Then you can use AreaMove, AreaDraw and AreaEllipse just as you would use Move, Draw and DrawEllipse for simple drawing. At the end you have to call AreaEnd, then the area will be drawn and filled.
Here is a rather old example: https://thomas-rapp.homepage.t-online.d ... piechart.c
To draw a circle you just call AreaEllipse followed by AreaEnd.
Re: Drawing a filled circle
Thanks for the info. I got it to work now.