Difference between revisions of "Command/startMPdrawing"

From Wiki
Jump to navigation Jump to search
(Created page with "Documentation for \startMPdrawing ... \stopMPdrawing")
 
 
(One intermediate revision by the same user not shown)
Line 17: Line 17:
 
Similar to the command {{cmd|MPdrawing}}.</cd:description>
 
Similar to the command {{cmd|MPdrawing}}.</cd:description>
 
<cd:examples><cd:example title=""><context source="yes">
 
<cd:examples><cd:example title=""><context source="yes">
 +
\startMPdrawing
 +
fill fullcircle scaled 2cm withcolor darkyellow;
 +
\stopMPdrawing
 +
 +
text before
 +
\MPdrawingdonetrue  % you don't the drawing without
 +
\getMPdrawing
 +
text after
 +
</context></cd:example><cd:example title="with lua"><context source="yes">
 
\startluacode
 
\startluacode
 
   context.startMPdrawing()
 
   context.startMPdrawing()
Line 26: Line 35:
 
   context("text after")
 
   context("text after")
 
\stopluacode
 
\stopluacode
</context></cd:example><cd:example title=""><context source="yes">
 
\startMPdrawing
 
fill fullcircle scaled 2cm withcolor darkyellow;
 
\stopMPdrawing
 
 
text before
 
\MPdrawingdonetrue
 
\getMPdrawing
 
text after
 
 
</context></cd:example></cd:examples>
 
</context></cd:example></cd:examples>
 
<cd:notes></cd:notes>
 
<cd:notes></cd:notes>

Latest revision as of 13:00, 8 May 2024


\startMPdrawing ... \stopMPdrawing

Summary

The environment \startMPdrawing ... \stopMPdrawing is used for Metapost inline graphics.

Settings

\startMPdrawing[...] ... \stopMPdrawing
[...]-

Description

Similar to the command \MPdrawing.

Examples

Example 1

\startMPdrawing
fill fullcircle scaled 2cm withcolor darkyellow;
\stopMPdrawing

text before
\MPdrawingdonetrue  % you don't the drawing without
\getMPdrawing
text after

with lua

\startluacode
  context.startMPdrawing()
  context("fill fullcircle scaled 2cm withcolor darkyellow;")
  context.stopMPdrawing()
  context("text before")
  context.MPdrawingdonetrue()
  context.getMPdrawing()
  context("text after")
\stopluacode

Notes

See also

Help from ConTeXt-Mailinglist/Forum

All issues with: