From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/23905 Path: news.gmane.org!not-for-mail From: Vit Zyka Newsgroups: gmane.comp.tex.context Subject: Re: shading box many times Date: Tue, 29 Nov 2005 01:35:29 +0100 Message-ID: <438BA251.90007@seznam.cz> References: <438AC79A.7070806@seznam.cz> <438AE71A.2080906@wxs.nl> <438AF9E2.8070308@elvenkind.com> <438B0C95.6000700@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1133224654 27993 80.91.229.2 (29 Nov 2005 00:37:34 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 29 Nov 2005 00:37:34 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Tue Nov 29 01:37:30 2005 Return-path: Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by ciao.gmane.org with esmtp (Exim 4.43) id 1EgtT0-0004eE-HV for gctc-ntg-context-518@m.gmane.org; Tue, 29 Nov 2005 01:35:30 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 5957312803; Tue, 29 Nov 2005 01:35:29 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 14409-05; Tue, 29 Nov 2005 01:35:23 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 96529127F0; Tue, 29 Nov 2005 01:35:23 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 0E628127F0 for ; Tue, 29 Nov 2005 01:35:22 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 14351-05 for ; Tue, 29 Nov 2005 01:35:20 +0100 (CET) Original-Received: from smtp.seznam.cz (smtp.seznam.cz [212.80.76.43]) by ronja.ntg.nl (Postfix) with SMTP id E7BF1127EC for ; Tue, 29 Nov 2005 01:35:19 +0100 (CET) Original-Received: (qmail 17877 invoked from network); 29 Nov 2005 00:35:19 -0000 Original-Received: from unknown (HELO ?127.0.0.1?) (vit.zyka@62.240.166.134) by cetus.go.seznam.cz with ESMTPA; 29 Nov 2005 00:35:19 -0000 User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) X-Accept-Language: en-us, en Original-To: mailing list for ConTeXt users In-Reply-To: <438B0C95.6000700@wxs.nl> X-Antivirus: avast! (VPS 0547-4, 24.11.2005), Outbound message X-Antivirus-Status: Clean X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.5 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:23905 Archived-At: Hans Hagen wrote: > Taco Hoekwater wrote: >=20 >> Hans Hagen wrote: >> >>> Vit Zyka wrote: >>> >>>> Dear Metafun Wizards, >>>> >>>> I have noticed some strange behaviour with box shading. It works OK = >>>> until some number of shadings. Please see example: >>>> http://typokvitek.com/tmp/shade-many.pdf >>>> Any idea for solving? Next not-minimal but small and illustrative=20 >>>> example can help. >>> >>> >>> >>> works ok here; since it concerns independent mp runs, i cannot=20 >>> imagine what goes wrong; mayeb a bad random numer; does your log say = >>> something? >> >> >> >> My results are the same as Vit's example: The last 9 items are >> not shaded but have 3 black sides and 1 white one >> (with \write18 disabled, using a single \jobname-mpgraph.mp) >> >> I don't know what is going, but at least I can reproduce the problem. >=20 >=20 >=20 > it's related to the fact that there can be 1000 specials only (this=20 > /1000 in mp-spec) >=20 > if you add: >=20 > \def\MPrgbnumber#1{\expandafter\doMPrgbnumber#10000.00000\relax} > \def\doMPrgbnumber#1.#2#3#4#5#6\relax{#2#3#4#5} >=20 > \startMPinclusions > _special_div_ :=3D 10000 ; > \stopMPinclusions >=20 > to the file, and change all 1000's in mp-spec.tex into _special_div_ it= =20 > works ok; so, the question (for taco is): does mp have the right=20 Really? Hmmm, not for me. I have got the graphics with flat color per=20 picture; every picture in the sequence has lighter and lighter color=20 (starting from black). (After performing your instructions in the=20 mp-spec.mp and refreshing metafun.mem.) ------------------------------------------ \def\MPrgbnumber#1{\expandafter\doMPrgbnumber#10000.00000\relax} \def\doMPrgbnumber#1.#2#3#4#5#6\relax{#2#3#4#5} \startMPinclusions _special_div_ :=3D 10000 ; \stopMPinclusions \startuseMPgraphic{F} def log(expr Xstart, Xstop)=3D begingroup save x, y, D, w, P; pair D; path P; w :=3D 2.5pt; w :=3D w/2; D :=3D unitvector(Xstop-Xstart) rotated 90; z1 =3D Xstart shifted (w*D); z2 =3D Xstop shifted (w*D); z3 =3D Xstop shifted (-w*D); z4 =3D Xstart shifted (-w*D); P :=3D z1--z2{z2-z1}..{z4-z3}z3--z4{z4-z3}..{z2-z1}cycle; P endgroup enddef; path P; x11 =3D 0; x12 =3D \overlaywidth; y11 =3D y12 =3D \overlayheight; P:=3D log(z11,z12); linear_shade(P,8,(1,1,1),(0,0,0)); draw P; \stopuseMPgraphic \defineoverlay[F][\uniqueMPgraphic{F}] \defineframed[F][offset=3D2mm,strut=3Dyes,background=3DF,frame=3Doff] \starttext \noindent\dorecurse{1000}{\F{\recurselevel} } \stoptext ------------------------------------------ > precission (it looks ok to me, unless we need to start calculating with= it) >=20 > so, it may be a dangerous patch. I'll adapt spec-mp to this new=20 > constant but for the moment keep the 10000 in my cont-loc file >=20 > Hans > _______________________________________________ > ntg-context mailing list > ntg-context@ntg.nl > http://www.ntg.nl/mailman/listinfo/ntg-context >=20 --=20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D Ing. V=C3=ADt Z=C3=BDka, Ph.D. TYPOkv=C3=ADtek database publishing databazove publikovani data maintaining and typesetting in typographic quality priprava dat a jejich sazba v typograficke kvalite tel.: (+420) 777 198 189 www: http://typokvitek.com =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D