jDSGI - Java2D DATA Step Graphics Interface |
Back
-
Next
[ 4 of 27 ]
|
|
|
by Richard A. DeVenezia, Copyright 2004 |
HOME |
|
/*
* Richard A. DeVenezia
* June 1, 2004
*
* jDSGI test 4
*/
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,"\","test4");
width = 500;
height = 500;
%canvas (_g, width, height, 0aaaaccx)
%setColor (00000ffx);
%draw3DRect (18, 18,54,54,1);
%draw3DRect (19, 19,52,52,1);
%draw3DRect (20, 20,50,50,1);
%setColor (0666666x);
%drawArc (118, 18,54, 54, 0,180);
%drawArc (110, 10,70, 70, 180,180);
%setColor (0222222x);
%drawString ("This is " || gsf, 18, 100);
%setFont ("Comic Sans MS", 0, 16);
%drawString ("Comic Sans MS - 16", 18,125);
%setFont ("Comic Sans MS", 0, 32);
%drawString ("Comic Sans MS - 32", 18,160);
r = 45;
%translate (r, 250);
n = 23;
do i = 1 to n;
f = (i-1) / n;
x = r * cos ( f * 2 * constant('PI'));
y = r * sin ( f * 2 * constant('PI'));
%drawLine (0,0, x,y);
end;
%translate (-r, -250);
%drawOval (100, 250, 70, 70);
%drawOval (100, 260, 70, 50);
%drawOval (100, 270, 70, 30);
%drawOval (100, 280, 70, 10);
array sx[7] (100, 120, 140, 170, 220, 220, 100);
array sy[7] (200, 180, 210, 170, 215, 165, 165);
%translate (0,+30);
%drawPolygon (sx, sy);
%translate (0,-30);
array px[10];
array py[10];
n = 9;
do i = 0 to n;
f = i /n;
px [i+1] = 150 * f;
theta = 2 * constant('PI') * f + .1;
py [i+1] = cos (theta) * 50;
end;
%setColor (0dddd00x);
%translate (+200,+300);
%drawPolyline (px, py);
%translate (-200,-300);
%setColor (0ffff00x);
%drawRect (250, 10, 100, 40);
%setColor (0ffffaax);
%translate (0,60);
%drawRoundRect (250, 10, 100, 40, 25, 25);
%canvas_saveAs (gsf, gsftype, savedAs);
%canvas_delete();
if savedAs ne '' then call system ("start " || savedAs);
run;