draw-metafile-to-image pane metafile &key width height max-width max-height background alpha => image
An output-pane.
A metafile.
Non-negative integers, or nil
.
Non-negative integers, or nil
.
A color specification.
A generalized boolean.
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
.
The
max-width
and
max-height
arguments, 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 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
.
CAPI User Guide and Reference Manual (Windows version) - 3 Aug 2017