The "psw" Package

These routines provide PostScript generation facilities.

Library: karma
Link With: -lkarma

Functions

psw_va_createCreate a PostScriptPage object.
psw_mono_imageWrite a monochrome image to a PostScriptPage object.
psw_pseudocolour_imageWrite a pseudocolour image to a PostScriptPage object.
psw_rgb_imageWrite a truecolour image to a PostScriptPage object.
psw_directcolour_imageWrite a directcolour image to a PostScriptPage object.
psw_closeClose a PostScriptPage object.
psw_finishClose a PostScriptPage object.
psw_rgb_lineWrite a colour line to a PostScriptPage object.
psw_rgb_polygonWrite a colour polygon to a PostScriptPage object.
psw_rgb_arcWrite a colour arc to a PostScriptPage object.
psw_rgb_ellipseWrite a colour ellipse to a PostScriptPage object.
psw_rgb_textWrite a colour string to a PostScriptPage object.
psw_set_attributesSet the attributes for a PostScriptPage object.

Tables

psw_ATTRIBUTESList of attributes for PostScriptPage object


Functions


PostScriptPage psw_va_create (Channel channel, double hoffset, double voffset, double hsize, double vsize, flag portrait, flag eps, ...)

This routine will create a PostScriptPage object ready for writing PostScript commands to. The routine automatically writes the PostScript header.

Parameters:

Returns: A PostScriptPage object on success, else NULL
Multithreading Level: Unsafe
Note:


flag psw_mono_image (PostScriptPage pspage, CONST unsigned char *image, unsigned int xlen, unsigned int ylen, CONST uaddr *xoffsets, CONST uaddr *yoffsets, CONST unsigned char imap[256], double xstart, double ystart, double xend, double yend)

Write a monochrome image to a PostScriptPage object.

Parameters:

Returns: TRUE on success, else FALSE.
Multithreading Level: Unsafe


flag psw_pseudocolour_image (PostScriptPage pspage, CONST unsigned char *image, unsigned int xlen, unsigned int ylen, CONST uaddr *xoffsets, CONST uaddr *yoffsets, CONST unsigned char imap_red[256], CONST unsigned char imap_green[256], CONST unsigned char imap_blue[256], double xstart, double ystart, double xend, double yend)

Write a pseudocolour image to a PostScriptPage object.

Parameters:

Returns: TRUE on success, else FALSE.
Multithreading Level: Unsafe


flag psw_rgb_image (PostScriptPage pspage, CONST unsigned char *image_reds, CONST unsigned char *image_greens, CONST unsigned char *image_blues, unsigned int xlen, unsigned int ylen, CONST uaddr *xoffsets_red, CONST uaddr *yoffsets_red, CONST uaddr *xoffsets_green, CONST uaddr *yoffsets_green, CONST uaddr *xoffsets_blue, CONST uaddr *yoffsets_blue, uaddr stride, double xstart, double ystart, double xend, double yend)

Write a truecolour image to a PostScriptPage object.

Parameters:

Returns: TRUE on success, else FALSE.
Multithreading Level: Unsafe


flag psw_directcolour_image (PostScriptPage pspage, CONST unsigned char *image_reds, CONST unsigned char *image_greens, CONST unsigned char *image_blues, unsigned int xlen, unsigned int ylen, CONST uaddr *xoffsets_red, CONST uaddr *yoffsets_red, CONST uaddr *xoffsets_green, CONST uaddr *yoffsets_green, CONST uaddr *xoffsets_blue, CONST uaddr *yoffsets_blue, uaddr stride, CONST unsigned char imap_red[256], CONST unsigned char imap_green[256], CONST unsigned char imap_blue[256], double xstart, double ystart, double xend, double yend)

Write a directcolour image to a PostScriptPage object.

Parameters:

Returns: TRUE on success, else FALSE.
Multithreading Level: Unsafe


flag psw_close (PostScriptPage pspage, flag flush, flag close)

This routine will write a tail to a PostScriptPage object and will deallocate the object.

Parameters:

Returns: TRUE on succes, else FALSE. In either case, the PostScriptPage object is deallocated (and closed if close is TRUE).
Multithreading Level: Unsafe


flag psw_finish (PostScriptPage pspage, flag eps, flag flush, flag close)

This routine will write a tail to a PostScriptPage object and will deallocate the object.

Parameters:

Returns: TRUE on succes, else FALSE. In either case, the PostScriptPage object is deallocated (and closed if close is TRUE).
Multithreading Level: Unsafe


flag psw_rgb_line (PostScriptPage pspage, double red, double green,double blue, double xstart, double ystart, double xend, double yend)

Write a colour line to a PostScriptPage object.

Parameters:

Returns: TRUE on success, else FALSE.
Multithreading Level: Unsafe


flag psw_rgb_polygon (PostScriptPage pspage, double red, double green, double blue, CONST double *x_arr, CONST double *y_arr, unsigned int num_points, flag fill)

Write a colour polygon to a PostScriptPage object.

Parameters:

Returns: TRUE on success, else FALSE.
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

flag psw_rgb_arc (PostScriptPage pspage, double red, double green, double blue, double cx, double cy, double rx, double ry, double angle1, double angle2, double rotation, flag fill)

Write a colour arc to a PostScriptPage object.

Parameters:

Returns: TRUE on success, else FALSE.
Multithreading Level: Unsafe


flag psw_rgb_ellipse (PostScriptPage pspage, double red, double green, double blue, double cx, double cy, double rx, double ry, flag fill)

Write a colour ellipse to a PostScriptPage object.

Parameters:

Returns: TRUE on success, else FALSE.
Multithreading Level: Unsafe


flag psw_rgb_text (PostScriptPage pspage, double red, double green,double blue, CONST char *string, CONST char *fontname, unsigned int fontsize, double xstart, double ystart, double angle)

Write a colour string to a PostScriptPage object.

Parameters:

Returns: TRUE on success, else FALSE.
Multithreading Level: Unsafe


flag psw_set_attributes (PostScriptPage pspage, ...)

Set the attributes for a PostScriptPage object.

Parameters:

Returns: TRUE on success, else FALSE.
Multithreading Level: Unsafe


Tables


psw_ATTRIBUTES

Name Set Type Meaning
PSW_ATT_END End of varargs list
PSW_ATT_LINEWIDTH_MM double Linewidth in mm
PSW_ATT_LINEWIDTH_RELATIVE double Linewidth scaled to page size


Back to Karma Home Page
Contact: Richard Gooch
Web Development: Ariel Internet Services