From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/23875 Path: news.gmane.org!not-for-mail From: Vit Zyka Newsgroups: gmane.comp.tex.context Subject: Re: shading box many times Date: Mon, 28 Nov 2005 14:38:31 +0100 Message-ID: <438B0857.6060108@seznam.cz> References: <438AC79A.7070806@seznam.cz> <438AE71A.2080906@wxs.nl> <438AF9E2.8070308@elvenkind.com> 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: 7bit X-Trace: sea.gmane.org 1133185244 20389 80.91.229.2 (28 Nov 2005 13:40:44 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 28 Nov 2005 13:40:44 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Mon Nov 28 14:40:40 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 1EgjEt-0004QA-CK for gctc-ntg-context-518@m.gmane.org; Mon, 28 Nov 2005 14:40:15 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 0385D1279B; Mon, 28 Nov 2005 14:40:15 +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 07121-06; Mon, 28 Nov 2005 14:40:14 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id A723C12874; Mon, 28 Nov 2005 14:38:26 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 0311812874 for ; Mon, 28 Nov 2005 14:38:25 +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 07121-05 for ; Mon, 28 Nov 2005 14:38:23 +0100 (CET) Original-Received: from smtp.seznam.cz (smtp.seznam.cz [212.80.76.43]) by ronja.ntg.nl (Postfix) with SMTP id D860C1279B for ; Mon, 28 Nov 2005 14:38:23 +0100 (CET) Original-Received: (qmail 22776 invoked from network); 28 Nov 2005 13:38:22 -0000 Original-Received: from unknown (HELO ?127.0.0.1?) (vit.zyka@62.240.166.134) by tic.go.seznam.cz with ESMTPA; 28 Nov 2005 13:38:22 -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: <438AF9E2.8070308@elvenkind.com> 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:23875 Archived-At: Taco Hoekwater wrote: > 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 >>> example can help. >> >> >> works ok here; since it concerns independent mp runs, i cannot 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. > I'm attaching an example wrong image. > > Taco A minimal version is here. It shows the randomization is not the reason. Shade disappears at 989th shade. ======================================= \startuseMPgraphic{F} def log(expr Xstart, Xstop)= begingroup save x, y, D, w, P; pair D; path P; w := 2.5pt; w := w/2; D := unitvector(Xstop-Xstart) rotated 90; z1 = Xstart shifted (w*D); z2 = Xstop shifted (w*D); z3 = Xstop shifted (-w*D); z4 = Xstart shifted (-w*D); P := z1--z2{z2-z1}..{z4-z3}z3--z4{z4-z3}..{z2-z1}cycle; P endgroup enddef; path P; x11 = 0; x12 = \overlaywidth; y11 = y12 = \overlayheight; P:= log(z11,z12); linear_shade(P,8,(1,1,1),(0,0,0)); draw P; \stopuseMPgraphic \defineoverlay[F][\uniqueMPgraphic{F}] \defineframed[F][offset=2mm,strut=yes,background=F,frame=off] \starttext \noindent\dorecurse{1000}{\F{\recurselevel} } \stoptext ============================================