LispWorks CAPI Reference Manual > 1 CAPI Reference Entries

NextPrevUpTopContentsIndex

draw-metafile-to-image

Function
Summary

Draws a metafile as an image.

Package

capi

Signature

draw-metafile-to-image pane metafile &key width height max-width max-height background alpha => image

Arguments

pane

An output-pane.

metafile

A metafile.

width , height

Non-negative integers, or nil .

max-width , max-height

Non-negative integers, or nil .

background

A color specification.

alpha

A generalized boolean.

Values

image

An image.

Description

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. (A color spec can be obtained by get-color-spec, make-rgb and so on.) If background is omitted, then the background color of pane is used.

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 not implemented on GTK+ or X11/Motif.

See also

clipboard
draw-metafile
free-metafile
with-internal-metafile


LispWorks CAPI Reference Manual - 21 Dec 2009

NextPrevUpTopContentsIndex