August 16th, 2002, 04:20 PM
how to make a star and quater moon ?
how can i make star with five corners on pixels and a half moon ?
August 16th, 2002, 06:00 PM
a half moon is a circle with one half cut off, no? and a quarter moon is a big circle with a smaller circle cut off.
a five corner star (or any star) is created using polygons.
your questions should go to "graphics" and not here... if you want an answer how to do it in C, tell us your OS. there is no OS-independent graphics :(
for windows this would be something similar to:
for the moon and
HRGN rgn, rgn2;
dc=getDc(.... where you want to paint to);
releasedc(..see above..., dc);
for the star: if you want a pentagram, you need to calculate the points using sin() and cos() functions for getting exact 360/5=72 degree slices of a circle. (this answer should go to "algorithms")
... fill the other points here ...
dc=.... (see above)
graphics programming is a lot of mathematics, you should get a good book on vectors, matrices and that stuff...
ps. the reason i can tell this just from my head right now is that i had to do this stuff at work over the last 5 weeks :rolleyes: