Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

Hull and Outfitting

Soft Driver Examples

  • Last UpdatedFeb 08, 2023
  • 2 minute read

As an example, the soft driver definition:

PSRGB|POSTSCRIPT|BANNER Y,RGB,\
    PTYPE 'statusdict begin 2 setpapertray end'

This defines a soft driver named PSRGB that uses the POSTSCRIPT driver with options to switch on the banner page, select colour output and set page type to select paper tray 2. The PTYPE string used here is a fragment of PostScript that is specific to a particular model of printer. For further details of the POSTSCRIPT driver options see POSTSCRIPT or PS.

The following command uses the soft driver definition:

plot psrgb plota22 plota22.out

It has exactly the same effect as the longer version:

plot postscript plota22 plota22.out
"BANNER Y,RGB,PTYPE 'statusdict begin 2
setpapertray end'"

As a further example, the following lines illustrate the use of the continuation character (\) to enter a long command that defines all of the former default postscript driver parameters:

PS_OLD|POSTSCRIPT|BA Y,LAY W,MAP 0 0 283.6333 197.2733,\
MONO,IG Y,PT a4,STEPS 300

When a plot driver has an RGB option to set the colour mix of pens, this can be done with a soft driver. For example, the following driver sets the default PDMS colours for the screen:

pdmsc|screen|RGB 1 .659 .659 .659,RGB 2 .8 0 0,RGB 3 .93 .604 0,\
RGB 4 .8 .8 0,RGB 5 0 .8 0,RGB 6 0 .93 .93,RGB 7 0 0 .8,\
RGB 9 .647 .165 .165,RGB 10 1 1 1,RGB 11 .803 .569 .62,\
RGB 12 .4 0 .6,RGB 13 0 .75 .8,RGB 14 .2 0 .4,RGB 15 0 0 0

Each line in the PLOTDRIVERS file is the definition of a soft driver or, if it begins with a # character, it is a comment.

When a soft driver is used with the command line options, the command line options are placed after those from the soft driver and thus take priority.

For example, the command:

plot psrgb plota22 plota22.out "BA N"

This has the same effect as the (similar) command above, except that the banner page is switched off.

TitleResults for “How to create a CRG?”Also Available in