Draws a metafile as an image.
capi
draw-metafile-to-image pane metafile &key width height max-width max-height background alpha => image
pane⇩ |
An output-pane. |
metafile⇩ |
A metafile. |
Non-negative integers, or nil . | |
Non-negative integers, or nil . | |
background⇩ |
A color specification. |
alpha⇩ |
A generalized boolean. |
image |
An image. |
The function draw-metafile-to-image
returns a new image object for pane, with metafile drawn into the image.
metafile should be a metafile as returned by with-internal-metafile.
If width and height are both nil
then the size of the image is computed from the metafile. If both width and height are integers, then they specify the size of the image and the metafile is scaled to fit. If one of width or height is nil
, then it is computed from the other dimension, preserving the aspect ratio of the metafile. The default values of width and height are both nil
.
max-width and max-height, if non-nil, constrain the computed or specified values of width and height respectively. The aspect ratio is retained when the size is constrained, so specifying a max-width can also reduce the actual height of the image. The default values of max-width and max-height are both nil
.
background should be a color spec, which controls the non-drawn parts of the image. For information about color specs, see 15.1 Color specs. If background is omitted, then the background color of pane is used (see simple-pane).
If alpha is non-nil, then the image will have an alpha component. The default value of alpha is nil
.
draw-metafile-to-image
is supported on GTK+ only where Cairo is supported (GTK+ 2.8 and later).draw-metafile-to-image
is not implemented on X11/Motif.
CAPI User Guide and Reference Manual (Macintosh version) - 01 Dec 2021 19:31:27