8.13
1 Drawing Context🔗ℹ
Represents a
drawing context that renders to some desination,
such as a bitmap or the screen.
One way to get a drawing context is Bitmap.make_dc.
The
DC.handle property returns a Racket object that
corresponds to the drawing context for use directly with
racket/draw. The
DC.from_handle function
creates a
DC from such a Racket object.
The size of the drawing area: width, height, or both.
Resets the output to an empty state.
Properties to get or set the drawing context’s configuration.
Applies a (further) transformation to the drawing context’s conversion
from drawing coordinates to deivice coordinates. In other words, these
methods change the result that is returned by the
DC.transformation property, and they affect drawing accodingly.
Saves and restores the draw context’s configuration.
The DC.save method pushes the current drawing state (pen,
brush, clipping region, and transformation) onto an internal stack, and
DC.restore pops the stack and restores the popped drawing
state. The DC.save_and_restore form wraps a body
sequence to save the drawing state on entry to the sequence and restore
it on exit, returning the value(s) produced by the body
sequence; entry and exit cover continuation jumps, like try.
Draws lines into a drawing context using the current pen. In the case
of drawing a polygon, rectangle, rounded rectangle, ellipse, or arc, a
shape is fulled using the current brush, too.
Offsets through dpt and also dx or dy are
combined.
Draws text into a drawing context using the current font.
Draws a region of a bitmap into the drawing context. The default
source region is the entire bitmap.
Copies a portion of the draw context’s content to another portion of
the drawing context. The source and destination regions can overlap.
Returns a value that changes when the selected font is changed to one
with different metrics.
Satisfied by the following symbols:
Satisfied by the following symbols:
Satisfied by the following symbols:
Satisfied by an array of six
Reals:
xx: a scale from the logical x to the device x
yx: a scale from the logical y added to the device x
xy: a scale from the logical x added to the device y
yy: a scale from the logical y to the device y
x0: an additional amount added to the device x
y0: an additional amount added to the device y