ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
Cc: ntg-context@ntg.nl
Subject: Re: metafun
Date: Wed, 21 Mar 2001 16:30:15 +0100	[thread overview]
Message-ID: <3.0.6.32.20010321163015.0133b5b0@server-1> (raw)
In-Reply-To: <200103211423.PAA04140@hatchling.nlr.nl>

There are dozens of methods, like: 

% interface=en output=pdftex

\setupcolors[state=start]

\starttext 

\setMPtext{1}{\framed[width=2cm,height=2cm,frame=off]{Hi There}} 
\setMPtext{2}{\framed[width=2cm,height=2cm,frame=off]{Ha Michael}} 
\setMPtext{3}{\framed[width=2cm,height=2cm,frame=off]{Is he Dutch}} 
\setMPtext{4}{\framed[width=2cm,height=2cm,frame=off]{Or Yank}} 
\setMPtext{5}{\framed[width=2cm,height=2cm,frame=off]{Or \TeX\ user}} 

\startMPcode

def circle (expr s,xy) = 
  drawoptions () ; 
  picture img ; 
  img := image 
    ( picture pic ; pic := textext(s) ; 
      path pat ; pat := fullcircle xyscaled (urcorner pic-llcorner pic) ; 
      fill pat withcolor .8white ; 
      draw pat withcolor .8red ; 
      addto currentpicture also pic ; ) ;
  draw img shifted center img shifted xy ;   
enddef ; 

z1 = ( 10,100) ; z2 = ( 50,200) ; z3 = (100,50) ; 
z4 = (200,150) ; z5 = (300,100) ;

drawoptions (withpen pencircle scaled 2pt withcolor .8green) ; 

for i=1 upto 5 : 
  for j=i upto 5 : 
    draw z[i] -- z[j] ;
  endfor ; 
endfor ; 

circle (\MPbetex{1},z1) ; circle (\MPbetex{2},z2) ;
circle (\MPbetex{3},z3) ; circle (\MPbetex{4},z4) ;
circle (\MPbetex{5},z5) ; 

\stopMPcode

\stoptext 

Hans
-------------------------------------------------------------------------
                                  Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                      Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------


  reply	other threads:[~2001-03-21 15:30 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-21 14:23 metafun guravage m.a.
2001-03-21 15:30 ` Hans Hagen [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-02-20 16:27 metafun Hans Hagen
2021-02-20 17:43 ` metafun Otared Kavian
2021-02-20 21:19   ` metafun Hans Hagen
2010-10-23 19:34 metafun Herbert Voss
2010-10-23 22:14 ` metafun Aditya Mahajan
2016-03-24 17:23   ` metafun Piotr Kopszak
2016-03-24 17:24     ` metafun Piotr Kopszak
2016-03-24 18:14       ` metafun luigi scarso
2016-03-24 18:22       ` metafun Hans Hagen
2010-10-20 12:03 metafun Hans Hagen
2010-10-20 12:11 ` metafun Mojca Miklavec
2010-10-20 12:23   ` metafun Martin Schröder
2010-10-20 12:49   ` metafun Vedran Miletić
2010-10-20 12:17 ` metafun Taco Hoekwater
2010-10-20 22:42 ` metafun Kevin D. Robbins
2010-10-21  7:10   ` metafun Hans Hagen
2010-10-22 14:06   ` metafun Taco Hoekwater
2010-10-22 14:20     ` metafun Hans Hagen
2010-10-22 14:22       ` metafun Taco Hoekwater
2010-10-22 15:29         ` metafun Otared Kavian
2010-10-22 16:09         ` metafun Kevin D. Robbins
2010-10-22 15:12       ` metafun Wolfgang Schuster
2010-10-22 15:28         ` metafun Hans Hagen
2010-10-23 10:49     ` metafun Alan BRASLAU
2004-06-23 15:03 metafun jimarin
     [not found] ` <m2eko6gvg m.fsf@levana.de>
2004-06-23 15:11 ` metafun Patrick Gundlach
2004-06-23 15:26   ` metafun jimarin
2004-06-23 15:45     ` metafun Patrick Gundlach
2004-06-23 15:55       ` metafun jimarin
2004-06-23 16:03         ` metafun Patrick Gundlach
2004-06-24  8:13 ` metafun Hans Hagen
2001-09-16  9:13 metafun Hervé Rouault
2000-12-11 13:56 MetaFun Marc van Dongen
2000-12-12 15:35 ` MetaFun Ed L Cashin
2000-12-12 15:48   ` MetaFun Marc van Dongen
2000-12-12 16:18     ` MetaFun Ed L Cashin
2000-09-12 10:26 metafun Hans Hagen
2000-09-12 13:41 ` metafun Robert F. Beeger
     [not found] ` <4.3.2.7.0.20000912152319.00b2ae30@rzdspc1.informatik.uni-h amburg.de>
2000-09-12 15:06   ` metafun Hans Hagen
2000-09-13  7:39 ` metafun Michal Kvasnicka
2000-07-17  0:45 (no) hyphenation Hans Hagen
2000-07-19  7:13 ` Hans Hagen
2000-07-24 20:20   ` metafun Hraban

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3.0.6.32.20010321163015.0133b5b0@server-1 \
    --to=pragma@wxs.nl \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).