Simple example for SDL2_gfx? |
Re: Simple example for SDL2_gfx? |
rtrussell
|
What specific drawing function(s) are you calling? I use SDL2_gfx extensively, and it certainly 'works' although IMHO it leaves a lot to be desired. For example arcs and sectors take the subtended angle as an integer parameter in degrees! This means it is impossible to get 'pixel-accurate' results if the radius is more than around 60 pixels, which I consider to be somewhat ridiculous. In an ideal world I'd like to see something with a functionality comparable with GDI Plus in Windows, that is full support for anti-aliasing and all parameters as floating-point values rather than integers. But in the absence of that, SDL2_gfx works acceptably well for my purposes. Richard. |
|||||||||||||
|
joymaker
|
RTRussell: I simply used circleColor, though the renderer was directed to a texture, rather than to the window itself. No pixels. But your report is encouraging, I'll try some more experiments.
Perchance do you have a crisp little nugget of a sample program that I can try building? |
|||||||||||
|
rtrussell
|
You could try this:
|
|||||||||||||||
|
A nice example |
joymaker
|
Thanks, rtrussel, that worked great! My bug was not in the misunderstanding of the primitives, but in a misunderstanding of color specification. (I created something with an alpha of zero.)
I juiced up your examples just a little by adding some circles, here's the result. I think you should share it widely, there is a real lack of such sample code that I can find anywhere on the web! Ken
|
|||||||||||||
|
A nice example |
joymaker
|
Thanks, rtrussel, that worked great! My bug was not in the misunderstanding of the primitives, but in a misunderstanding of color specification. (I created something with an alpha of zero.)
I juiced up your examples just a little by adding some circles, here's the result. I think you should share it widely, there is a real lack of such sample code that I can find anywhere on the web! Ken
|
|||||||||||||
|