DEF GDISK X,Y,RADIUS,COL
IF RADIUS<1 THEN GPSET X,Y,COL:RETURN '(GCIRCLE draws nothing if the radius is 0)
'get the point on the graphics layer that is closest to the center of the circle
'if the distance from the center of the circle to the closest onscreen point is
'larger than the radius, then the circle is completely offscreen
IF DX*DX+DY*DY > RADIUS*RADIUS THEN RETURN
'traditional filled circle code
GCIRCLE X,Y,RADIUS,8 'draw circle with a special color
GPAINT PX,PY,COL,8 'fill area inside
GCIRCLE X,Y,RADIUS,COL 'redraw edge in the correct color, so none of the special color is left on screen
ENDGPAINT x, y, fill_color, border_color will flood fill all pixels that aren't border_color.
This will work even there other things on the GRP, as long as you don't use that special color.
I chose 8 (that is, alpha: 0, red: 0, green: 0, blue: 8). There's no reason to ever use this color anywhere else (since it looks identical to color 0), and it should be safe.
This is much faster than filling the circle manually using GLINE/GFILL/GTRI/etc.