DefineGraphic

since version 4.3.10

Define a metapost graphic to be used in Box. EXPERIMENTAL!

Child elements

(none)

Parent elements

(none)

Attributes

name (text)

The name of the graphic.

Example

<DefineGraphic name="dottedbox">
   beginfig(1);
        pickup pencircle scaled 0.4mm;
        draw (0,0) -- (box_width,0) -- (box_width, box_height) -- (0, box_height) -- cycle dashed withdots ;
    endfig;
</DefineGraphic>

<Record element="data">
    <PlaceObject row="3" column="1">
        <Box height="5" width="1" graphic="dottedbox" />
    </PlaceObject>
</Record>

See also

The section Create and use images with MetaPost in the avanced topics section.