jDSGI - Java2D DATA Step Graphics Interface
  Back - Next   [ 17 of 27 ]
image  
by Richard A. DeVenezia, Copyright 2004  HOME
/*
 * Richard A. DeVenezia
 * June 9, 2004
 *
 * jDSGI test 17
 */

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,"\","test17");

  width  = 500;
  height = 500;

  %canvas (_g, width, height, 0ffffffx)
  %tsetwindow (1,-200,-200,200,200);

  %tsetViewport (1,0,0,.5,.5);
  %setPenWidth (1);
  link doEllipses;

  %tsetViewport (1,0,.5,.5,1);
  %setPenWidth (3);
  link doEllipses;

  %tsetViewport (1,.5,.5,1,1);
  %setPenWidth (5);
  link doEllipses;

  %tsetViewport (1,.5,0,1,.5);
  %setPenWidth (7);
  link doEllipses;

  link done;

  stop;
doEllipses:
  n = 32;
  do i = 1 to 2*n+1;
    f = (i-1) / n;

    r = 180 * f;

    %setColorHSB (r/180,.8,.8);
    %tellarc (00,00,20+r,8+r,0,360,r*3);
  end;
  return;

  stop;
done:
  %canvas_saveAs (gsf, gsftype, savedAs);

  %canvas_delete();

  if savedAs ne '' then rc = system ("start " || savedAs);
return;
run;