ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* graphics inclusion in metapost (real weird metafun)
       [not found] ` <Pine.LNX.4.30.0012130737160.31521-100000@simux.mecanica.up m.es>
@ 2000-12-14  9:49   ` Hans Hagen
  2000-12-15 13:01     ` another nice new metapost trick: outline fonts Hans Hagen
  0 siblings, 1 reply; 2+ messages in thread
From: Hans Hagen @ 2000-12-14  9:49 UTC (permalink / raw)
  Cc: smuelas

Hi, 

A few days ago Santiago Muelas send me mail in which he discussed the
possibility to include graphic in metapost. That discussion focused at core
mp support (i.e. extending mp). As an experiment, I hacked graphic
inclusion support into the context mp special macros (those that also take
care of shading) and the result can be seen at: 

http://www.pragma-ade.com/pragma-tmp/metafun/metajoke.pdf    (metajoke.zip) 

There is also a zip there for those who want to play with it. All pdftex
formats [png,jpg,pdf] are supported as well as reuae of graphics. The main
drawback is that one has to know the aspect ratio of a graphic [but I can
envision multipass approach] and the a limitation is that one cannot scale
the 'currentpicture' afterwards. On the other hand, graphics can be
scaled/shifted/rotated ans obey clipping. It proved to be a nearly trivial
simple implementation. 

Hans

-------------------------------------------------------------------------
                                                  Hans Hagen | PRAGMA ADE
                      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
-------------------------------------------------------------------------


^ permalink raw reply	[flat|nested] 2+ messages in thread

* another nice new metapost trick: outline fonts
  2000-12-14  9:49   ` graphics inclusion in metapost (real weird metafun) Hans Hagen
@ 2000-12-15 13:01     ` Hans Hagen
  0 siblings, 0 replies; 2+ messages in thread
From: Hans Hagen @ 2000-12-15 13:01 UTC (permalink / raw)


Hi, 

After playing a bit with pstoedit i was able to cook up a utility that
enables metapost to handle outline fonts; think of: 

beginfig (1) ;
  graphictext
    "\framed[frame=off,width=10cm,align=normal]{\input tufte }"
    scaled 8
  % slanted .2
    withdrawcolor blue
    withfillcolor red
    withpen pencircle scaled 2pt ;
endfig ;

This also works in macros [like textext does] and uses makempy [a simple
perl script] to prepare a file suitable for mp. This is a rather generic
feature btw. An example can be found at:  

  http://www.pragma-ade.com/pragma-tmp/metafun/outline-1.pdf

The other trick, embedded graphics, can be found at:

  http://www.pragma-ade.com/pragma-tmp/metafun/metajoke.pdf

So, now we can make fancy titlepages, 

Hans
-------------------------------------------------------------------------
                                                  Hans Hagen | PRAGMA ADE
                      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
-------------------------------------------------------------------------


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2000-12-15 13:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <3.0.6.32.20001213072304.0128f1d0@pop.wxs.nl>
     [not found] ` <Pine.LNX.4.30.0012130737160.31521-100000@simux.mecanica.up m.es>
2000-12-14  9:49   ` graphics inclusion in metapost (real weird metafun) Hans Hagen
2000-12-15 13:01     ` another nice new metapost trick: outline fonts Hans Hagen

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).