jDSGI - Java2D DATA Step Graphics Interface |
Back
-
Next
[ 8 of 27 ]
|
|
|
by Richard A. DeVenezia, Copyright 2004 |
HOME |
|
/*
* Richard A. DeVenezia
* June 1, 2004
*
* jDSGI test 8
*/
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,"\","test8");
width = 500;
height = 500;
%canvas (_g, width, height, 0ffffffx)
* 0,0 -> ul : 1,1 -> lr;
cx = 0.55;
cy = 0.45;
r = max (cx, cy, 1-cx, 1-cy);
n = 15;
do i = 0 to n;
f = i / n ;
w = 1 + 2 * r * (1-f) * width ;
h = 1 + 2 * r * (1-f) * height ;
ulx = cx * width - w/2 ;
uly = cy * height - h/2 ;
%setColorRGB ( 255 * (1-f)
, 255 * (1-f)
, 255
);
%fillRoundRect (ulx,uly,w,h,.25*w,.25*h);
end;
%canvas_saveAs (gsf, gsftype, savedAs);
%canvas_delete ();
if savedAs ne '' then call system ("start " || savedAs);
run;