use strict;
+my $thiscolour = "1 0 1 0";
+my $spotcolour = "0 0 0 0";
+
+sub chip ($$) {
+ my ($this, $spot) = @_; # put in a gsave
+ <<END;
+ $thiscolour setcmykcolor
+ newpath
+ 0 0 chip 0.5 mul 0 360 arc fill
+
+ $spotcolour setcmykcolor
+ newpath
+ 0 0 spot 0.5 mul 0 360 arc fill
+END
+}
+
print <<END or die $!;
%!
/spot 3.5 def
-/thiscolour { 1 0 1 0 setcmykcolor } def
-/spotcolour { 0 0 0 0 setcmykcolor } def
-
tw 0 translate
% diagonal conversion
gsave
-1 6 div costcirch dc translate
- 1 0 1 0 setcmykcolor
- newpath
- 0 0 chip 0.5 mul 0 360 arc fill
-
- 0 0 0 0 setcmykcolor
- newpath
- 0 0 spot 0.5 mul 0 360 arc fill
+ ${\ chip($thiscolour, $spotcolour) }
grestore
END