| goptions reset=all cback=FloralWhite vpos=25 hpos=40;
%macro bgpainter(hpos=,vpos=,text=,height=,font=,angle=,across=,down=,startdate=);
data _bgpainter(keep=x y function text angle size style position
xsys ysys hsys color when);
length style $ 32;
retain xsys ysys hsys '4' text &text style "&font"
position "+" when "B";
retain holdy holdx xinc ydec daysago ctot 0 angle &angle
size &height;
length color cstring $ 8 function $ 8;
array _ctemp {6} $ 8 _temporary_ ("CXFFFFE0" "CXFFFEFF"
"CXD0FFFF" "CXFFFEFE" "CXE0FFE0" "CXFEFEFF") ;
if _n_=1 then do;
daysago=date()-&startdate;
ydec= &vpos / &down;
xinc= &hpos / &across;
holdy= &vpos + ydec/2;
ctot=dim(_ctemp);
end;
cnum=0;
do i=1 to &down;
holdy=holdy-ydec;
holdx=0-xinc/2;
do j=1 to &across;
holdx=holdx+xinc;
cnum=cnum+1;
cstring=_ctemp(mod(cnum-1,ctot)+1);
do k=3,5,7;
if substr(cstring,k,2)
NE "FF" then do;
num=input(substr(cstring,k,2),hex2.);
num=round(num-daysago/5);
if num<0
then num=0;
substr(cstring,k,2)=put(num,hex2.);
end;
end;
color=cstring;
x=holdx;
y=holdy;
function="move";
output;
function="label";
output;
end;
end;
run;
%mend bgpainter;
%bgpainter(across=4,down=5,text="rolandberry@hotmail.com",angle=30,height=1,font='Arial',
vpos=25,hpos=40,startdate="26dec07"d);
proc print data=_bgpainter;
run;
proc ganno annotate=_bgpainter;
run;
|