ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* MPinclusions for drawing commands
@ 2003-01-23 18:08 Eckhart Guthöhrlein
  2003-01-23 20:00 ` Hans Hagen
  0 siblings, 1 reply; 5+ messages in thread
From: Eckhart Guthöhrlein @ 2003-01-23 18:08 UTC (permalink / raw)


In the following test file

\setupcolors[state=start]

\startMPinclusions
  drawoptions(withcolor \MPcolor{darkyellow});
\stopMPinclusions

\startreusableMPgraphic{test}
  fill fullcircle scaled 1cm;
\stopreusableMPgraphic

\starttext
  \reuseMPgraphic{test}
\stoptext

I was hoping for a yellow circle, but it didn't work. I guess drawoptions are 
reset by beginfig?
Is there a possibility to insert MP code for every figure in a document 
*after* every beginfig?
Or how else could I set common drawoptions for all figures?

Eckhart

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

* Re: MPinclusions for drawing commands
  2003-01-23 18:08 MPinclusions for drawing commands Eckhart Guthöhrlein
@ 2003-01-23 20:00 ` Hans Hagen
  2003-01-24  6:53   ` Eckhart Guthöhrlein
  0 siblings, 1 reply; 5+ messages in thread
From: Hans Hagen @ 2003-01-23 20:00 UTC (permalink / raw)


At 07:08 PM 1/23/2003 +0100, Eckhart Guthöhrlein wrote:
>In the following test file
>
>\setupcolors[state=start]
>
>\startMPinclusions
>   drawoptions(withcolor \MPcolor{darkyellow});
>\stopMPinclusions
>
>\startreusableMPgraphic{test}
>   fill fullcircle scaled 1cm;
>\stopreusableMPgraphic
>
>\starttext
>   \reuseMPgraphic{test}
>\stoptext
>
>I was hoping for a yellow circle, but it didn't work. I guess drawoptions are
>reset by beginfig?
>Is there a possibility to insert MP code for every figure in a document
>*after* every beginfig?
>Or how else could I set common drawoptions for all figures?

\startuseMPgraphic{common}
  ....
\stopuseMPgraphic

\startreusableMPgraphic{test}
   \includeMPgraphic{common}
   ....

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
-------------------------------------------------------------------------
                        information: http://www.pragma-ade.com/roadmap.pdf
                     documentation: http://www.pragma-ade.com/showcase.pdf
-------------------------------------------------------------------------

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

* Re: MPinclusions for drawing commands
  2003-01-23 20:00 ` Hans Hagen
@ 2003-01-24  6:53   ` Eckhart Guthöhrlein
  2003-01-24 10:18     ` Hans Hagen
  0 siblings, 1 reply; 5+ messages in thread
From: Eckhart Guthöhrlein @ 2003-01-24  6:53 UTC (permalink / raw)


On Thursday 23 January 2003 21:00, Hans Hagen wrote:
> >Or how else could I set common drawoptions for all figures?
>
> \startuseMPgraphic{common}
>   ....
> \stopuseMPgraphic
>
> \startreusableMPgraphic{test}
>    \includeMPgraphic{common}
>    ....

You still have to say \includeMPgraphic{common} in every single figure, don't 
you? It's not as good as something like \startcommonMPcode ... 
\stopcommonMPcode (which I presumed to exist, since there is hardly anything 
not to exist in context).
But the solution is fine for me now, thank you.

Eckhart

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

* Re: MPinclusions for drawing commands
  2003-01-24  6:53   ` Eckhart Guthöhrlein
@ 2003-01-24 10:18     ` Hans Hagen
  2003-01-24 12:47       ` Eckhart Guthöhrlein
  0 siblings, 1 reply; 5+ messages in thread
From: Hans Hagen @ 2003-01-24 10:18 UTC (permalink / raw)


At 07:53 AM 1/24/2003 +0100, you wrote:

>You still have to say \includeMPgraphic{common} in every single figure, don't
>you? It's not as good as something like \startcommonMPcode ...
>\stopcommonMPcode (which I presumed to exist, since there is hardly anything
>not to exist in context).

the danger of that is that it can inferfere with other graphics, for 
instance those generated by context itself

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
-------------------------------------------------------------------------
                        information: http://www.pragma-ade.com/roadmap.pdf
                     documentation: http://www.pragma-ade.com/showcase.pdf
-------------------------------------------------------------------------

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

* Re: MPinclusions for drawing commands
  2003-01-24 10:18     ` Hans Hagen
@ 2003-01-24 12:47       ` Eckhart Guthöhrlein
  0 siblings, 0 replies; 5+ messages in thread
From: Eckhart Guthöhrlein @ 2003-01-24 12:47 UTC (permalink / raw)


On Friday 24 January 2003 11:18, Hans Hagen wrote:
> the danger of that is that it can inferfere with other graphics, for
> instance those generated by context itself

So it would involve separating system graphics calls from user calls... Too 
much trouble for a small benefit, I guess.

Eckhart

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

end of thread, other threads:[~2003-01-24 12:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-23 18:08 MPinclusions for drawing commands Eckhart Guthöhrlein
2003-01-23 20:00 ` Hans Hagen
2003-01-24  6:53   ` Eckhart Guthöhrlein
2003-01-24 10:18     ` Hans Hagen
2003-01-24 12:47       ` Eckhart Guthöhrlein

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