jckhoa
07-15-2010, 08:06 AM
I want to create a circle, then assign an outline to it for collision detection. That is basically the idea but I don't know how to go about that. Anyone can help?
I use Clanlib 2.1.1 and it's my first time to use Clanlib. My game has one window and one graphic context gc1, for eg, provided by it.
I draw background picture via gc1
I draw sprites via gc1
I draw a circle using CL_Draw::circle() via gc1
--> I'm stuck here.
In SDL, I could achieve this by drawing my circle in a separate surface, then make my surface transparent. However in Clanlib 2.1.1, since everything is drawn by gc I can't isolate my circle from the rest. I tried searching for another function to draw a circle but was in vain.
I would appreciate if anybody give some light.
I use Clanlib 2.1.1 and it's my first time to use Clanlib. My game has one window and one graphic context gc1, for eg, provided by it.
I draw background picture via gc1
I draw sprites via gc1
I draw a circle using CL_Draw::circle() via gc1
--> I'm stuck here.
In SDL, I could achieve this by drawing my circle in a separate surface, then make my surface transparent. However in Clanlib 2.1.1, since everything is drawn by gc I can't isolate my circle from the rest. I tried searching for another function to draw a circle but was in vain.
I would appreciate if anybody give some light.