%% les agrandissements predefinis
/square0 {
1 dict begin
/dotscale {.5 .5} def
square
end
} def
/square1 {
1 dict begin
/dotscale {.7 .7} def
square
end
} def
/square2 {
1 dict begin
/dotscale {2 sqrt dup} def
square
end
} def
/square3 {
1 dict begin
/dotscale {3 sqrt dup} def
square
end
} def
%% syntaxe : x y square
/square {
gsave
newpath
smoveto
dotscale scale
dotangle rotate
dotsize 2 div dup rmoveto
0 dotsize neg rlineto
dotsize neg 0 rlineto
0 dotsize rlineto
closepath
starfill
stroke
grestore
} def
%% syntaxe : x y square*
/square* {
1 dict begin
/startest {true} def
square
end
} def
%% syntaxe : x y square0*
/square0* {
1 dict begin
/startest {true} def
square0
end
} def
%% syntaxe : x y square1*
/square1* {
1 dict begin
/startest {true} def
square1
end
} def
%% syntaxe : x y square2*
/square2* {
1 dict begin
/startest {true} def
square2
end
} def
%% syntaxe : x y square3*
/square3* {
1 dict begin
/startest {true} def
square3
end
} def
/squares {
aload length 2 idiv
{square} repeat
} def
|