Prima::...stScript(3)
π Prima::...stScript(3) β Prima::PS::PostScript π
okay bestie, welcome to the User Contributed Perl Documentation page for Prima::...stScript(3) β aka Prima::PS::PostScript. it's giving PostScript realness, and we're gonna get through it together π«Ά
β¨ NAME β¨
Prima::PS::PostScript β PostScript interface to Prima::Drawable
π SYNOPSIS π
Recommended usage:
use Prima::PS::Printer;
my $x = Prima::PS::File-> new( file => 'out.ps');
or
my $x = Prima::PS::FileHandle-> new( handle => \&STDOUT);
Low-level:
use Prima::PS::PostScript;
my $x = Prima::PS::PostScript-> create( onSpool => sub {
open F, ">> ./test.ps";
print F $_[1];
close F;
});
Printing:
die "error:$@" unless $x-> begin_doc;
$x-> font-> size( 30);
$x-> text_out( "hello!", 100, 100);
$x-> end_doc;
πΈ DESCRIPTION πΈ
Implements the Prima library interface to PostScript level 2 document language. The module is designed to be compliant with the Prima::Drawable interface. All properties' behavior is as same as Prima::Drawable's except those described below.
π Inherited properties π
resolutionβ Can be set while the object is in the normal stage β cannot be changed if the document is opened. Applies to implementation of thefillPatternproperty and general pixel-to-point and vice versa calculations.alphaβ"alpha"is not implemented.
π¦ Specific properties π¦
copiesβ The number of copies that the PS interpreter should print.grayscaleβ could be 0 or 1.pageSizeβ The physical page dimension, in points.pageMarginsβ Non-printable page area, an array of 4 integers: left, bottom, right, and top margins in points.reversedβ if 1, a 90 degrees rotated document layout is assumed.
π§ Internal methods π§
emitβ Can be called for direct PostScript code injection. Example:
$x-> emit('0.314159 setgray');
$x-> bar( 10, 10, 20, 20);
pixel2pointandpoint2pixelβ Helpers for translation from pixels to points and vice versa.fill&strokeβ Wrappers for PS outline that are expected to be either filled or stroked. Apply colors, line, and fill styles if necessary.spoolβPrima::PS::PostScriptis not responsible for the output of the generated document, it only calls the"::spool"method when the document is closed through an"::end_doc"call. By default discards the data. The"Prima::PS::Printer"class handles the spooling logic.fontsβ CallsPrima::Application::fontsand returns its output filtered so that only the fonts that support the"iso10646-1"encoding are present. This effectively allows only unicode output.
mwah π β this page is from perl v5.42.0, dated 2024-08-20, and it belongs to Prima::...stScript(3). bye bestie π«Άβ¨
π¦ where this page comes from
- opensuse-leap 16.0: perl-Prima 1.74000-bp160.1.13 Β· AGPL-3.0-only AND BSD-2-Clause
- opensuse-leap 16.0: perl-Prima 1.74000-bp160.1.13 Β· AGPL-3.0-only AND BSD-2-Clause
- opensuse-leap 16.0: perl-Prima 1.74000-bp160.1.13 Β· AGPL-3.0-only AND BSD-2-Clause
- opensuse-leap 16.0: perl-Prima 1.74000-bp160.1.13 Β· AGPL-3.0-only AND BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms