Graphic Primitives

BengtPSLib Graphic Primitives

The Postscript and PDF page description languages have only a few real graphic primitives. These primitives consist of the following:

  • Lines (strokes). A line is drawn by connecting points and cubic Bezier curves. Lines can have the following attributes:
    • Width.
    • Mitered, round or beveled join
    • Flat, round or squared end caps.
    • Dashed
  • Polygons.  A polygon is one or more loops connected by points and cubic Bezier curves. These loops can overlap each other or themselves and are filled using either the winding or the even odd rule.
  • Text.  BengtPSLib renders text internally and presents it to the application’s graphics system as ‘cached item’s. These cached items can be either polygons or images, depending how initialization flags and how the text was interpreted internally.
  • Images.  BengtPSLib extracts Images from the postscript stream and presents them to the application’s graphics system as raw images with alpha.  The returned image format is specified by interpreter initialization calls and is either raw Grayscale, RGB or CMYK.