From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/45184 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: Clipping bug in MetaPost with MkIV Date: Thu, 30 Oct 2008 09:47:29 +0100 Message-ID: <490974A1.2040506@wxs.nl> References: <115224fb0810300106m7d77614ehdeb2272707a827f5@mail.gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1225358305 8619 80.91.229.12 (30 Oct 2008 09:18:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 30 Oct 2008 09:18:25 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Oct 30 10:19:27 2008 connect(): Connection refused Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1KvTgc-0007ex-GM for gctc-ntg-context-518@m.gmane.org; Thu, 30 Oct 2008 10:19:26 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 6016B1FBD0; Thu, 30 Oct 2008 10:18:18 +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 15758-03; Thu, 30 Oct 2008 10:18:18 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 014161FC61; Thu, 30 Oct 2008 09:47:38 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 704661FBD4 for ; Thu, 30 Oct 2008 09:47:36 +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 11975-03-8 for ; Thu, 30 Oct 2008 09:47:28 +0100 (CET) Original-Received: from mail.pragma-ade.net (dsl-083-247-100-017.solcon.nl [83.247.100.17]) by ronja.ntg.nl (Postfix) with ESMTP id A98291FC0D for ; Thu, 30 Oct 2008 09:47:28 +0100 (CET) Original-Received: from [10.100.1.112] (unverified [10.100.1.11]) by controller-1 (SurgeMail 3.9e) with ESMTP id 5504-1840426 for ; Thu, 30 Oct 2008 09:47:28 +0100 User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) In-Reply-To: <115224fb0810300106m7d77614ehdeb2272707a827f5@mail.gmail.com> X-Originating-IP: 10.100.1.11 X-Authenticated-User: hagen@controller-1 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.9 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:45184 Archived-At: Wolfgang Schuster wrote: > Hi, > > I make a hole in a MetaPost graphic and add a graphic as background but > in MkIV I get no hole but the lines I try to remove are still visible. > > All files with the two results from MkII (what I want) and MkIV are in > the attachment. > > \starttext > > \startMPcode > > picture temp ; > path mask ; > > draw (0,1cm)--(2cm,1cm) ; > draw (1cm,0)--(1cm,2cm) ; > > temp := currentpicture ; > currentpicture := nullpicture ; > mask := unitsquare scaled 2cm -- reverse fullsquare scaled 1cm shifted > (1cm,1cm) -- cycle ; > clip temp to mask ; > currentpicture := temp ; > draw fullsquare scaled 5mm shifted (1cm,1cm) ; > > temp := currentpicture ; > currentpicture := nullpicture ; > externalfigure "holz280.jpg" scaled 2cm ; > addto currentpicture also temp ; > > \stopMPcode > > \stoptext i have no clue (nor time to look into it in detail) but this seems to work ok: % engine=luatex interface=en \starttext \startMPpage externalfigure "cow.pdf" scaled 2cm ; clip currentpicture to boundingbox currentpicture -- reverse unitsquare scaled 1cm shifted (.5cm,.5cm) -- cycle ; \stopMPpage \stoptext ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl ----------------------------------------------------------------- ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________