jDSGI - Java2D DATA Step Graphics Interface |
Back
-
Next
[ 11 of 27 ]
|
|
|
by Richard A. DeVenezia, Copyright 2004 |
HOME |
|
/*
* Richard A. DeVenezia
* June 1, 2004
*
* jDSGI test 11
*/
data _null_;
if symexist('goutpath') then goutpath=symget('goutpath'); else goutpath=pathname('WORK');
if symexist ('gsftype') then gsftype=symget('gsftype'); else gsftype='png';
gsf = cats(goutPath,"\","test11");
width = 500;
height = 500;
%canvas (_g, width, height, 0ffffffx);
saturation = .8;
brightness = .8;
n = 360;
do i = 1 to n;
f = (i-1) / n;
y = height * f;
h = height - y;
hue = f;
%setColorHSB (hue + 0, saturation, brightness);
%fillRect (0,y,width,h);
%getColor (c);
* these puts will show
* HSB selects a high and low RGB level (based on s and b)
* and interpolates between them per hue angle;
* angle r g b
* 0 h l l g morphs to h
* 60 h h l r morphs to l
* 120 l h l b morphs to h
* 180 l h l g morphs to l
* 240 l l h r morphs to h
* 300 h l h b morphs to l
* 360 h l l
*
* r g b
* 0 . + .
* 1 - . .
* 2 . . +
* 3 . - .
* 4 + . .
* 5 . . -
*;
put i z3. + 1 c hex8. ;
end;
%canvas_saveAs (gsf, gsftype, savedAs);
%canvas_delete();
if savedAs ne '' then call system ("start " || savedAs);
run;