1Prima::PS::PostScript(3U)ser Contributed Perl DocumentatiPornima::PS::PostScript(3)
2
3
4

NAME

6       Prima::PS::PostScript -  PostScript interface to Prima::Drawable
7

SYNOPSIS

9               use Prima;
10               use Prima::PS::PostScript;
11
12               my $x = Prima::PS::PostScript-> create( onSpool => sub {
13                       open F, ">> ./test.ps";
14                       print F $_[1];
15                       close F;
16               });
17               die "error:$@" unless $x-> begin_doc;
18               $x-> font-> size( 30);
19               $x-> text_out( "hello!", 100, 100);
20               $x-> end_doc;
21

DESCRIPTION

23       Realizes the Prima library interface to PostScript level 2 document
24       language.  The module is designed to be compliant with Prima::Drawable
25       interface.  All properties' behavior is as same as Prima::Drawable's,
26       except those described below.
27
28   Inherited properties
29       ::resolution
30           Can be set while object is in normal stage - cannot be changed if
31           document is opened. Applies to fillPattern realization and general
32           pixel-to-point and vice versa calculations
33
34       ::alpha
35           - ::alpha is not implemented
36
37   Specific properties
38       ::copies
39           amount of copies that PS interpreter should print
40
41       ::grayscale
42           could be 0 or 1
43
44       ::pageSize
45           physical page dimension, in points
46
47       ::pageMargins
48           non-printable page area, an array of 4 integers: left, bottom,
49           right and top margins in points.
50
51       ::reversed
52           if 1, a 90 degrees rotated document layout is assumed
53
54   Internal methods
55       emit
56           Can be called for direct PostScript code injection. Example:
57
58                   $x-> emit('0.314159 setgray');
59                   $x-> bar( 10, 10, 20, 20);
60
61       pixel2point and point2pixel
62           Helpers for translation from pixel to points and vice versa.
63
64       fill & stroke
65           Wrappers for PS outline that is expected to be filled or stroked.
66           Apply colors, line and fill styles if necessary.
67
68       spool
69           Prima::PS::PostScript is not responsible for output of generated
70           document, it just calls ::spool when document is closed through
71           ::end_doc. By default just skips data.  Prima::PS::Printer handles
72           spooling logic.
73
74       fonts
75           Returns Prima::Application::fonts, however with "iso10646-1"
76           encoding only.  That effectively allows only unicode output.
77
78
79
80perl v5.36.0                      2023-03-20          Prima::PS::PostScript(3)
Impressum