From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/14325 Path: main.gmane.org!not-for-mail From: Zunbeltz Izaola Newsgroups: gmane.comp.tex.context Subject: Re: MP figures in the background Date: Wed, 17 Dec 2003 22:56:03 +0100 (MET) Sender: ntg-context-admin@ntg.nl Message-ID: References: <6.0.1.1.2.20031215104348.02c8b278@server-1> Reply-To: ntg-context@ntg.nl NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: sea.gmane.org 1071698651 20098 80.91.224.253 (17 Dec 2003 22:04:11 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 17 Dec 2003 22:04:11 +0000 (UTC) Original-X-From: ntg-context-admin@ntg.nl Wed Dec 17 23:04:07 2003 Return-path: Original-Received: from ref.vet.uu.nl ([131.211.172.13] helo=ref.ntg.nl) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AWjm3-0007TS-00 for ; Wed, 17 Dec 2003 23:04:07 +0100 Original-Received: from ref.ntg.nl (localhost.localdomain [127.0.0.1]) by ref.ntg.nl (Postfix) with ESMTP id EB7C110B2E; Wed, 17 Dec 2003 23:03:56 +0100 (MET) Original-Received: from lcdx00.wm.lc.ehu.es (lcdx00.wm.lc.ehu.es [158.227.5.12]) by ref.ntg.nl (Postfix) with SMTP id DABDB10B26 for ; Wed, 17 Dec 2003 22:56:04 +0100 (MET) Original-Received: (qmail 17787 invoked by uid 30042); 17 Dec 2003 21:56:04 -0000 Original-Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 17 Dec 2003 21:56:03 -0000 Original-To: ntg-context@ntg.nl In-Reply-To: <6.0.1.1.2.20031215104348.02c8b278@server-1> Errors-To: ntg-context-admin@ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.0.13 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.comp.tex.context:14325 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:14325 > > >Hi, > > > >I'm doing a christmars card in ConTeXt!. I've the following setup > > > >\setuppapersize[CD][A4] > >\setuplayout[marking=on,location=middle] > > > >\starttext > >\startuseMPgraphic{dummy} > >... > >... > >\stopuseMPgraphic > > > >\defineoverlay[backfigure][\useMPgraphic{dummy}] > >\setupbackground[paper][background=backfigure] > >\hbox{} > >\stoptext > > >\starttext > >\startuseMPgraphic{dummy} > >... > >... > >\stopuseMPgraphic > > > >\defineoverlay[backfigure][\useMPgraphic{dummy}] > >\setupbackground[paper][background=backfigure] > >\hbox{} > >\stoptext > > \defineoverlay[page][\useMPgraphic{dummy}] > > \setupbackground[page][background=page] > > \startstandardmakeup > some text > \stopstandardmakeup > > \setupbackground[page][background=] > > rest of text on next page > > or: > > \definelayer[page] \setlayer[page]{\useMPgraphic{dummy}] > > \startstandardmakeup > some text > \stopstandardmakeup > > rest of text on next page Hi Hans! I'm in trouble with this method. (I supose the error is mine). I can draw the MP graphic using \useMPgraphic, but when i use \defineoverlay[bihotzak][\useMPgraphic{bihotz}] \setupbackgrounds[paper][background=bihotzak] I get the following error systems : randomizer starts with 150693575 [MP to PDF] (./mpgraph.1) layout : calculating backgrounds [MP to PDF] (./mpgraph.4000 ! Dimension too large. \handleMPboundingbox ... 2 \advance \dimen 0 #4bp \dimen 0=\MPxscale \dimen ... l.2 %%BoundingBox: -6 -141 --32768 --32768 I put my file in the end > > Hans (who right now is going to print this years christmas card -) > Zunbeltz (who is working hard to print a christamas card :-) \setupoutput[pdftex] \setupcolors[state=start] \setuplayout[location=middle,marking=on] \setuppagenumber[state=stop] %\setuppapersize[CD][A4] %\useexternalfigure[bihotzirudia][biho.mps][width=12cm,height=12cm] \starttext \startuseMPgraphic{bihotz} u = 0.017mm; z0 = (10,16.2)*u; z1 = (14,17.8)*u; z2 = (19.5,12.5)*u; z3 = (10,0)*u; z4 = (0.5,12.5)*u; z5 = (6,17.8)*u; z6 = (10,16.2)*u; % penwidth = 3cm; pickup pencircle scaled 0.4; randomseed := 12346; color color[],colourout,colourin; color1 = 0.9red; color2 = (red+0.4yellow); path heart; heart := z0..z1{right}..z2{down}..{dir-110}z3{dir90}..{dir 90}z4.. {right}z5..z6; pair shiftvector; picture heartpicture[]; draw heart withcolor color1; fill heart..cycle withcolor color2 ; heartpicture0 := currentpicture; currentpicture:= nullpicture; draw heart withcolor color2; fill heart..cycle withcolor color1; heartpicture1 := currentpicture; currentpicture:= nullpicture; % scalation := 0.001mm; pair shiftvector; draw heartpicture0 scaled 0.01mm; for i=1 upto 1: shiftvector := (uniformdeviate 12, uniformdeviate 12); if uniformdeviate 2 > 1: draw heartpicture0 shifted shiftvector scaled 1cm;% scaled scalation; else: draw heartpicture1 shifted shiftvector scaled 1cm;% scaled scalation; fi; endfor; setbounds currentpicture to unitsquare scaled 12cm; \stopuseMPgraphic %\definecolor[color1][r=0.9,] %\definecolor[color2][r=1,y=0.4] \useMPgraphic{bihotz} %\useMPgraphic{bihotz} \defineoverlay[bihotzak][\useMPgraphic{bihotz}] %\setlayer[page]{\externalfigure[bihotzirudia]} %\externalfigure[biho]%[width=12cm] %\defineoverlay[page] %[width=12cm] \setupbackgrounds[paper][background=bihotzak] \startstandardmakeup some text \stopstandardmakeup %\setupbackgrounds[page][background=] %\page[yes] %\leftaligned{2004 bihotz} %\leftaligned{2004 \color[color2]{urterako}} %\blank %\rightaligned{Zure Ciruelitoa} \stoptext