Skip to content

class MpFig

😱 Types incomplete or incorrect? 🙏 Please contribute!


methods


MpFig.boundingbox


function MpFig.boundingbox() ->  number[]

@return - minx miny maxx maxy

Return the bounding box, as an array of 4 values. number.

When the boundingbox represents a “negated rectangle”, i.e. when the first set of coordinates is larger than the second set, the picture is empty.

Reference:

MpFig.postscript


function MpFig.postscript(
  prologues: integer?,
  procset: integer?
) ->  string?

Return a string that is the ps output of the fig.

this function accepts two optional integer arguments for specifying the values of prologues (first argument) and procset (second argument)

Reference:

MpFig.svg


function MpFig.svg(prologues: integer?) ->  string?

Return a string that is the svg output of the fig.

This function accepts an optional integer argument for specifying the value of prologues.

Reference:

MpFig.png


function MpFig.png(options: string?) ->  string?

Reference:

MpFig.objects


function MpFig.objects() ->  table

Return the actual array of graphic objects in this fig.

Note: you can call fig:objects() only once for any one fig object!

Reference:

MpFig.copy_objects


function MpFig.copy_objects() ->  table

Return a deep copy of the array of graphic objects in this fig.

Reference:

MpFig.filename


function MpFig.filename() ->  string?

The filename this fig's PostScript output would have written to in stand alone mode

Reference:

MpFig.width


function MpFig.width() ->  number?

Return the fontcharwd value.

Reference:

MpFig.height


function MpFig.height() ->  number?

Return the fontcharht value.

Reference:

MpFig.depth


function MpFig.depth() ->  number?

Return the fontchardp value.

Reference:

MpFig.italcorr


function MpFig.italcorr() ->  number?

Return the fontcharit value.

Reference:

MpFig.charcode


function MpFig.charcode() ->  number?

Return the (rounded) charcode value.

Reference: