From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/45186 Path: news.gmane.org!not-for-mail From: "luigi scarso" Newsgroups: gmane.comp.tex.context Subject: Re: Clipping bug in MetaPost with MkIV Date: Thu, 30 Oct 2008 10:53:33 +0100 Message-ID: References: <115224fb0810300106m7d77614ehdeb2272707a827f5@mail.gmail.com> <490974A1.2040506@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0104874034==" X-Trace: ger.gmane.org 1225360524 15303 80.91.229.12 (30 Oct 2008 09:55:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 30 Oct 2008 09:55:24 +0000 (UTC) To: "mailing list for ConTeXt users" Original-X-From: ntg-context-bounces@ntg.nl Thu Oct 30 10:56:26 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 1KvUGM-0001eB-Gd for gctc-ntg-context-518@m.gmane.org; Thu, 30 Oct 2008 10:56:22 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 3D22C1FC67; Thu, 30 Oct 2008 10:55:13 +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 22696-01-3; Thu, 30 Oct 2008 10:54:06 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 9B4FC1FB95; Thu, 30 Oct 2008 10:54:06 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 70A491FB8F for ; Thu, 30 Oct 2008 10:54:05 +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 22696-01-2 for ; Thu, 30 Oct 2008 10:53:33 +0100 (CET) Original-Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.156]) by ronja.ntg.nl (Postfix) with ESMTP id E450B1FBD4 for ; Thu, 30 Oct 2008 10:53:33 +0100 (CET) Original-Received: by fg-out-1718.google.com with SMTP id l26so434361fgb.8 for ; Thu, 30 Oct 2008 02:53:33 -0700 (PDT) Original-Received: by 10.187.186.16 with SMTP id n16mr969815fap.94.1225360413680; Thu, 30 Oct 2008 02:53:33 -0700 (PDT) Original-Received: by 10.187.211.5 with HTTP; Thu, 30 Oct 2008 02:53:33 -0700 (PDT) In-Reply-To: <490974A1.2040506@wxs.nl> 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:45186 Archived-At: --===============0104874034== Content-Type: multipart/alternative; boundary="----=_Part_18418_15337290.1225360413676" ------=_Part_18418_15337290.1225360413676 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Thu, Oct 30, 2008 at 9:47 AM, Hans Hagen wrote: > 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 > > it works witk minimals-beta This is LuaTeX, Version snapshot-0.30.2-2008102016, build unknown ConTeXt ver: 2008.10.30 08:50 MKIV fmt: 2008.10.30 int: english/english -- luigi ------=_Part_18418_15337290.1225360413676 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline

On Thu, Oct 30, 2008 at 9:47 AM, Hans Hagen <pragma@wxs.nl> wrote:
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


it works witk minimals-beta
This is LuaTeX, Version snapshot-0.30.2-2008102016, build unknown
ConTeXt  ver: 2008.10.30 08:50 MKIV  fmt: 2008.10.30  int: english/english


--
luigi

------=_Part_18418_15337290.1225360413676-- --===============0104874034== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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 ___________________________________________________________________________________ --===============0104874034==--