Posted By: flits
perfect circle - 01/20/09 14:01
i want to create a bmap white a circle
the problem is that the circle isnt 100% full
there are missing pixel
the problem is that the circle isnt 100% full
there are missing pixel
Code:
BMAP* circle; circle = bmap_createblack(sz[0],sz[0],24); var format; var i = 0; var pixel; var x; var y; var a; format = bmap_lock(circle,0); pixel = pixel_for_vec(clr[0],100,format); while(i < 100) { a = 0; while(a < 360) { x = sinv(a)*(sz[0]/2-i) + sz[0]/2; y = cosv(a)*(sz[0]/2-i) + sz[0]/2; pixel_to_bmap(circle,x,y,pixel); a += 1; } i += 1; } bmap_unlock(circle);