1 Creating Slide Presentations
2 Making Pictures
3 Making Slides
4 Typesetting Scheme Code
Bibliography
Index
On this page:
dc-for-text-size
draw-pict
make-pict-drawer
show-pict
current-expected-text-scale
Version: 4.0.2

 

2.9 Rendering

(dc-for-text-size)  (or/c false/c (is-a?/c dc<%>))

(dc-for-text-size dc)  void?

  dc : (or/c false/c (is-a?/c dc<%>))

A parameter that is used to determine the bounding box of picts created with text.

The drawing context installed in this parameter need not be the same as the ultimate drawing context, but it must measure text in the same way. In particular, use a post-script-dc% for preparing PostScript output, while a bitmap-dc% instance will work fine for either bitmap-dc% or canvas% output.

(draw-pict pict dc x y)  void?

  pict : pict?

  dc : (is-a?/c dc<%>)

  x : real?

  y : real?

Draws pict to dc, with its top-left corner at offset (x, y).

(make-pict-drawer pict)

  ((is-a?/c dc<%>) real? real? . -> . void?)

  pict : pict?

Generates a pict-drawer procedure for multiple renderings of pict. Using the generated procedure can be faster than repeated calls to draw-pict.

(show-pict pict [w h])  void?

  pict : pict?

  w : (or/c false/c nonnegative-exact-integer?) = #f

  h : (or/c false/c nonnegative-exact-integer?) = #f

Opens a frame that displays pict. The frame adds one method, set-pict, which takes a pict to display. The optional w and h arguments specify a minimum size for the frame’s drawing area.

(current-expected-text-scale)  (list real? real?)

(current-expected-text-scale scales)  void?

  scales : (list real? real?)

A parameter used to refine text measurements to better match an expected scaling of the image. The scale/improve-new-text form sets this parameter while also scaling the resulting pict.