d = 1
stepper = 300
IF x
MOD 4 * stepper
= 3 * stepper
THEN c1
= k1: c2
= k2
ELSE c1
= k2: c2
= k1
horzGradRec x, y, stepper, stepper, c1, c2
gradCirc x + stepper / 2, y + stepper / 2, stepper \ 3, k2, k1
vertGradRec x, y, stepper, stepper, c2, c1
gradCirc x + stepper / 2, y + stepper / 2, stepper \ 3, k1, k2
vertGradRec x, y, stepper, stepper, c2, c1
gradCirc x + stepper / 2, y + stepper / 2, stepper \ 3, k1, k2
IF x
MOD 4 * stepper
= 2 * stepper
THEN c1
= k1: c2
= k2
ELSE c1
= k2: c2
= k1
horzGradRec x, y, stepper, stepper, c2, c1
gradCirc x + stepper / 2, y + stepper / 2, stepper \ 3, k2, k1
stepper = stepper - 2 * d
IF stepper
< 10 OR stepper
> 300 THEN d
= d
* -1
'c1 color to left, c2 color to right
SUB horzGradRec
(x0
, y0
, w
, h
, c1
, c2
) midInk c1, c2, cx / w
SUB vertGradRec
(x0
, y0
, w
, h
, c1
, c2
) midInk c1, c2, cy / h
'let c1 be outer most color c2 the inner most
SUB gradCirc
(x0
, y0
, r
, c1
, c2
) midInk c2, c1, cr / r
fcirc x0, y0, cr
' let fr## be the fraction from 1st color to 2nd color 0 means all color 1, 1 means all color 2
SUB midInk
(c1
, c2
, fr##
) COLOR _RGB(r1
+ (r2
- r1
) * fr##
, g1
+ (g2
- g1
) * fr##
, b1
+ (b2
- b1
) * fr##
)
RadiusError = -Radius
X = Radius
Y = 0
' Draw the middle span here so we don't draw it twice in the main loop,
' which would be a problem with blending turned on.
LINE (CX
- X
, CY
)-(CX
+ X
, CY
), , BF
RadiusError = RadiusError + Y * 2 + 1
LINE (CX
- Y
, CY
- X
)-(CX
+ Y
, CY
- X
), , BF
LINE (CX
- Y
, CY
+ X
)-(CX
+ Y
, CY
+ X
), , BF
X = X - 1
RadiusError = RadiusError - X * 2
Y = Y + 1
LINE (CX
- X
, CY
- Y
)-(CX
+ X
, CY
- Y
), , BF
LINE (CX
- X
, CY
+ Y
)-(CX
+ X
, CY
+ Y
), , BF