► |  | GUI: Racket Graphics Toolkit

1 | Overview
2 | Reference
3 | Configuration
4 | Dynamic Loading
| Bibliography
| Index

► | 2 | Reference

2.1 | Windowing Classes
2.2 | Windowing Functions
2.3 | Drawing Classes
2.4 | Drawing Functions
2.5 | Editor Classes
2.6 | Editor Functions
2.7 | WXME Decoding

▼ | 2.3 | Drawing Classes

2.3.1 | bitmap%
2.3.2 | bitmap-dc%
2.3.3 | brush%
2.3.4 | brush-list%
2.3.5 | color%
2.3.6 | color-database<%>
2.3.7 | dc<%>
2.3.8 | dc-path%
2.3.9 | font%
2.3.10 | font-list%
2.3.11 | font-name-directory<%>
2.3.12 | gl-config%
2.3.13 | gl-context<%>
2.3.14 | pen%
2.3.15 | pen-list%
2.3.16 | point%
2.3.17 | post-script-dc%
2.3.18 | printer-dc%
2.3.19 | ps-setup%
2.3.20 | region%

Inherited methods:
from dc<%>
cache-font-metrics-key
clear
draw-arc
draw-bitmap
draw-bitmap-section
draw-ellipse
draw-line
draw-lines
draw-path
draw-point
draw-polygon
draw-rectangle
draw-rounded-rectangle
draw-spline
draw-text
end-doc
end-page
get-alpha
get-background
get-brush
get-char-height
get-char-width
get-clipping-region
get-font
get-gl-context
get-origin
get-pen
get-scale
get-size
get-smoothing
get-text-background
get-text-extent
get-text-foreground
get-text-mode
glyph-exists?
ok?
set-alpha
set-background
set-brush
set-clipping-rect
set-clipping-region
set-font
set-origin
set-pen
set-scale
set-smoothing
set-text-background
set-text-foreground
set-text-mode
start-doc
start-page
try-color

top ← prev up next →

post-script-dc% : class?
superclass: object%

extends: | dc<%>

A post-script-dc% object is a PostScript device context, that can write PostScript files on any platform. See also ps-setup%.

Be sure to use the following methods to start/end drawing:

- start-doc

- start-page

- end-page

- end-doc

Attempts to use a drawing method outside of an active page raises an exception.

See also printer-dc%.

( new post-script-dc% | [ | [interactive interactive] |
|  | [parent parent] |
|  | [use-paper-bbox use-paper-bbox] |
|  | [as-eps as-eps]]) |

→ ( is-a?/c post-script-dc% )
interactive : any/c = #t

| parent |  | : |  | ( or/c ( is-a?/c frame% ) ( is-a?/c dialog% ) false/c )
|  |  | = |  | #f

use-paper-bbox : any/c = #f
as-eps : any/c = #t

If interactive is true, the user is given a dialog for setting printing parameters (see get-ps-setup-from-user); the resulting configuration is installed as the current configuration). If the user chooses to print to a file (the only possibility under Windows and Mac OS X), another dialog is given to select the filename. If the user hits cancel in either of these dialogs, then ok? returns #f.

If parent is not #f, it is used as the parent window of the configuration dialog.

If interactive is #f, then the settings returned by current-ps-setup are used. A file dialog is still presented to the user if the get-file method returns #f, and the user may hit cancel in that case so that ok? returns #f.

If use-paper-bbox is #f, then the PostScript bounding box for the output is determined by drawing commands issued to the object; such a bounding box encloses all parts of the drawing ignoring clipping regions (so the bounding box may be approximate). If use-paper-bbox is not #f, then the bounding box is determined by the current paper size (as specified by current-ps-setup), and the bounding box does not include the margin (also specified by current-ps-setup).

If as-eps is #f, then the generated PostScript does not include an Encapsulated PostScript (EPS) header, and instead includes a generic PostScript header. Otherwise, the generated PostScript includes a header that identifiers it as EPS.

See also ps-setup% and current-ps-setup. The settings for a particular post-script-dc% object are fixed to the values in the current configuration when the object is created (after the user has interactively adjusted them when interactive is true).
top ← prev up next →