<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=windows-1250"
http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Vafa Khalighi napsal(a):
<blockquote
cite="mid:CAMwtXV1esXiM1Ag18M0GucY+T2cRo55yG0xLn4955QRwPLdieg@mail.gmail.com"
type="cite">
<pre wrap="">I have a metafont source file that has the following code:
begingroup
my_T := currenttransform;
currenttransform := identity slanted my_slant;
currentpicture := nullpicture;
clearxy;
picture joined_fit_plus_pic;
pickup pensquare;
x1=x2=-2mag; x3=x4=2mag+kashida_width;
y1=y4=0; y2=y3=horiz_width;
fill (z1--z2--z3--z4--cycle) withweight 1;
joined_fit_plus_pic := currentpicture;
currenttransform := my_T;
endgroup;
when I run metafont on this, it runs smoothly without any problems.
but when I use mfplain format of metapost, I get the following error:
</pre>
<blockquote type="cite">
<blockquote type="cite">
<pre wrap="">currenttransform.withweight1
</pre>
</blockquote>
</blockquote>
<pre wrap=""><!---->! Improper transformation argument.
<to be read again>
;
l.61 fill (z1--z2--z3--z4--cycle) withweight 1;
?
What is wrong? and how do I fix this? If required, I can provide the
full source.
--
<a class="moz-txt-link-freetext" href="http://tug.org/metapost/">http://tug.org/metapost/</a>
</pre>
</blockquote>
<tt>You cannot use withweight in metapost as this is "bitmap" operation
-- in metafont you can add number of pixels for a given point (e.g. you
can draw some parallel lines and fill some region and then say
"cull..." to make visible only the points with weight 2 to get this
region filled with pattern of parallel lines. This technique cannot be
used with metapost as it does not count number of pixels -- in that
case you can use clipping instead.<br>
All the best,<br>
Karel<br>
</tt>
</body>
</html>