Ellipses

Previous topic - Next topic

Kitty Hello

If you want to fill ellipses on PocketPC, where the POLYVECTOR does not work, try this:
Code (glbasic) Select
// ------------------------------------------------------------- //
// -=#  ELLPISE  #=-
// ------------------------------------------------------------- //
FUNCTION Ellipse: x, y, w, h, col
LOCAL dy, xi
w=w/2
h=h/2
x=x+w
FOR dy = -h TO h
xi = w/h * SQR(h*h - dy*dy)
DRAWRECT x-xi, y+dy+h, xi+xi, 1, col
NEXT
ENDFUNCTION // ELLIPSE