128 14 translate
1.00 1.00 scale
0 0 andgate stroke
-128 -14 translate
-1.00 -1.00 scale
foo
showpage
However, in the area where I have written foo the stuff that I put in
there doesn't appear in my output. If I remove the scale however then
it does. I have tried with 2 2 scale and 0 0 scale to no avail.
Cheers
Setting scale negative will cause increasing x or y values to produce
increasing negative numbers. So 0 0 moveto 10 10 lineto stroke will
produce a diagonal line moving down and left instead of up and right.
Possibly this is what you want, without seeing the definition of
'andgate' or the contents of 'foo' its not really possible to tell.
Note that 0 0 scale will scale all output to nothing, so its no surprise
that this produces no marks.
You could just try 1 1 scale.
Ken
Doesn't scaling by a factor of exactly one ('1 1 scale' or '1.00 1.00
scale') do exactly nothing?
--
RGB
> > You could just try 1 1 scale.
> >
>
> Doesn't scaling by a factor of exactly one ('1 1 scale' or '1.00 1.00
> scale') do exactly nothing?
Well yes, that was the point. Since I don't know what else is going on
in the missing sections, that might give some clues as to whether these
were affecting the problem. If eliding the scale caused no problems, and
a 1 1 scale did, then there is something odd happening with the action
of scale.
If it works OK then you could move on to 1.1 1.1 scale and so forth to
see what happened with smaller factors.
Ken
While the upper right is what you print you can certainly place marks
in the other areas.
|see|
| |
--------
|
|
Ed
%!
/andgate
{
pop pop
0 0 moveto
0 100 lineto
100 100 lineto
100 0 lineto
0 0 lineto
} def
/foo
{
gsave
1 0 0 setrgbcolor
0 0 andgate
stroke
grestore
} def
128 14 translate
1.00 1.00 scale
0 0 andgate stroke
-128 -14 translate
-1.00 -1.00 scale
-112 -192 translate % move into view
foo
showpage
The solution is to just switch two lines so that the -1 -1 scale
comes before the translation to move back to the origin.