2.2 Basic Pict Constructors
Creates an arbitrary self-rendering pict. The arguments to the
rendering procedure will be a device context and top-left location for
drawing.
When the rendering procedure is called, the current pen and brush will
be solid and in the pict’s color (and linewidth), and the scale and
offset of the dc will be set. The text mode will be transparent, but
the font and text colors are not guaranteed to be anything in
particular.
Creates a pict that draws nothing. The one-argument case supplies a
value used for both the width and height. In the one- and two-argument
case, the ascent and descent are 0 for the resulting pict’s
bounding box; in the three-argument case, the height is computed by
adding the given ascent and descent.
Creates a pict that draws text. For creating text picts within a slide
presentation, see
t. The size of the resulting pict may
depend on the value of
dc-for-text-size.
The style argument must be one of the following:
null — the default, same as 'default
a font% object
a font family symbol, such a 'roman (see font%)
a font face string, such as "Helvetica" (see font%)
(cons str sym) combining a face string and a font
family (in case the face is unavailable; see font%)
(cons 'bold style) for a valid style
(cons 'italic style)
(cons 'subscript style)
(cons 'superscript style)
(cons 'caps style)
(cons 'combine style) — allows kerning and ligatures
(the default, unless the 'modern family is specified)
(cons 'no-combine style) — renders characters individually
If both 'combine and 'no-combine are specified, the
first one takes precedence. If caps is specified, the angle must be
zero.
The given size is in pixels, but it is ignored if a
font% object is provided in the text-style.
The angle is in radians, and positive values rotate
counter-clockwise. For a non-zero angle, the resulting
pict’s bounding box covers the rotated text, and the descent is zero
and the ascent is the height.
Straight lines, centered within their bounding boxes.
Frames a given pict. If the color or line width are provided, the
override settings supplied by the context.
Unfilled and filled ellipses.
Unfilled and filled rectangles.
If draw-border? is #f, then the pen is set to be transparent
before drawing the rectangle.
Unfilled and filled rectangles with rounded corners. The
corner-radius is used to determine how much
rounding occurs in the corners. If it is a positive number,
then it determines the radius of a circle touching the edges
in each corner, and the rounding of the rectangle follow the
edge of those circles. If it is a negative number, then the
radius of the circles in the corners is the absolute value of the
corner-radius times the smaller of width
and height.
The angle determines how much the rectangle is
rotated, in radians.
A pict that display a bitmap. When a path is provided, the image is
loaded with the 'unknown/mask flag, which means that a mask
bitmap is generated if the file contains a mask.
If the bitmap cannot be loaded, if the given bitmap% object
is not valid, or if the bitmap-draft-mode parameter is set to
#t, the result pict draws the word “bitmap failed”.
Creates an arrow or arrowhead in the specific direction within a
size by size pict. Points on the arrow may extend
slightly beyond the bounding box.
Creates a line (with some number of arrowheads) as a zero-sized pict
suitable for use with
pin-over. The 0-sized picture contains
the starting point.
The size is used for the arrowhead size. Even though
pip-line creates no arrowheads, it accepts the size
argument for consistency with the other functions.
Adds a line or line-with-arrows onto
pict, using one of the
pict-finding functions (e.g.,
lt-find) to extract the source
and destination of the line.
If under? is true, then the line and arrows are added under
the existing pict drawing, instead of on top. If
solid? is false, then the arrowheads are hollow instead of
filled.
The start-angle, end-angle, start-pull, and
end-pull arguments control the curve of the line (and the
defaults produce a straight line):
The start-angle and end-angle arguments
specify the direction of curve at its start and end positions;
if either is #f, it defaults to the angle of a
straight line from the start position to end position.
The start-pull and end-pull arguments specify
a kind of momentum for the starting and ending angles; larger
values preserve the angle longer.
The line-width, color, and style arguments
apply to the added line.
When the hide-arrowhead? argument is a true value, then space
for an arrowhead is kept around the line, but the arrowhead itself is
not drawn.
A contract that matches the second argument of
text.
A parameter that determines whether
bitmap loads/uses a
bitmap.