4 Pict Drawing Adjusters
Scales a pict drawing, as well as its bounding box
, by multiplying
it current size by factor
(if two arguments are supplied)
or by multiplying the current width by w-factor
and current height by
(if three arguments are supplied).
The drawing is scaled by adjusting the destination dc<%>’s
scale while drawing the original pict.
Scales pict so that it fits within the bounding box of
size-pict (if two arguments are supplied) or
into a box of size width by height
(if three arguments are supplied).
If mode is 'preserve or
'preserve/max, the width and height are scaled by
the same factor so pict’s aspect ratio is
preserved. If mode is 'preserve the
result’s bounding box will not be larger than width
by height but it may be smaller. When mode
is 'preserve/max, the opposite is true; the
bounding box will never be smaller, but might be larger.
If mode is 'inset or 'inset/max,
the aspect ratio is preserved as with 'preserve and
'preserve/max, but the resulting pict is centered
on a bounding box of exactly width by
If mode is 'distort, the width and height
are scaled separately.
Changed in version 1.4 of package pict-lib: Added #:mode argument.
Rotates a pict’s drawing by theta radians counter-clockwise.
The bounding box of the resulting pict is the box encloses the rotated
corners of pict (which inflates the area of the bounding
box, unless theta is a multiple of half of pi). The
ascent and descent lines of the result’s bounding box are the
horizontal lines that bisect the rotated original lines; if the ascent
line drops below the descent line, the two lines are flipped.
Shear’s the pict by a factor of x-shear
along the x-axis and by a factor of y-shear along
the y-axis. The bounding box is inflated to
contain the result. The result’s ascent and descent
are the same as pict’s.
Added in version 1.8 of package pict-lib.
Translate the pict by dx and dy.
If bb? is not #f then the bounding box is extended
to ensure the image fits.
Added in version 1.10 of package pict-lib.
Creates a container picture that doesn’t draw the child picture,
but uses the child’s size.
Selects a specific pen width for drawing, which applies to pen drawing
for pict that does not already use a specific pen width.
A #f value for w makes the pen transparent (in contrast
to a zero value, which means “as thin as possible for the target device”).
(linestyle style pict) → pict?
| ||style|| ||:|| |
|(or/c 'transparent 'solid 'xor 'hilite|
| 'dot 'long-dash 'short-dash 'dot-dash|
| 'xor-dot 'xor-long-dash 'xor-short-dash|
| pict : pict-convertible?|
Selects a specific pen style for drawing, which applies to pen drawing
for pict that does not already use a specific pen style.
|> (define styles|
| '(transparent solid xor hilite dot long-dash short-dash|
| dot-dash xor-dot xor-long-dash xor-short-dash xor-dot-dash))|
Selects a specific color drawing, which applies to drawing in
that does not already use a specific color. The
parameter causes all non-white colors to be
converted to black.
Makes the given pict
semi-transparent, where an opacity of
is fully transparent, and an opacity of 1
opaque. See set-alpha
for information about the
contexts and cases when semi-transparent drawing works.
|> (clip shape)|
Insets and clips the pict’s drawing to its bounding
. Usually, the inset amounts are negative.
A parameter that determines whether colorize
uses color or
Creates a bitmap with the same size as pict, draws
pict into the bitmap, and then returns a pict that
draws with the bitmap.
This has the effect of speeding up subsequent drawing of
the pict and also of cropping it to its bounding box. Any
sub-picts of pict remain intact within the new
The scale-amount argument controls the size of the bitmap
used to render the pict. For example, if scale-amount
is 2, then a bitmap that’s twice as wide and
twice as tall as the pict is used to draw into. Regardless
of the value of scale-amount, the result pict’s size
is that same as pict’s size.
The inset-amount argument allows freeze to save
more of the area that the pict draws in, which is useful
when a pict draws outside of its bounding box. The
values are used as the arguments to inset.
As with the scale-amount argument, the size of
the resulting pict is the same as the size of the input pict;
this argument controls the size of the bitmap.
Changed in version 1.13 of package pict-lib: Added the
scale and inset arguments.