PSBrush, PSColor, PSFont, PSPattern - graphics state objects with added PostScript information
Contents
Description
PSBrush, PSColor, PSFont, and PSPattern are subclasses of Brush, Color, Font, and Pattern, respectively,
that store added information needed to generate idraw-compatible PostScript. Unidraw's structured
graphics objects use these subclasses exclusively.
Name
PSBrush, PSColor, PSFont, PSPattern - graphics state objects with added PostScript information
Psbrush Protected Operations
voidCalcDashPat(int)
Compute the equivalent PostScript dash pattern from the line pattern specified in the constructor.
Psbrush Public Operations
PSBrush()PSBrush(intpattern,intwidth)
Create an undefined PSBrush (the parameterless constructor) or one having the specified line
pattern and width. Structured graphics having an undefined brush will not render their stroked
portions.
intGetLinePattern()intWidth()
Return constructor-specified brush parameters.
booleanNone()
Return true if this is an undefined brush.
constint*GetDashPattern()intGetDashPatternSize()intGetDashOffset()
Return values required to characterize the brush in PostScript. The equivalent PostScript dash
pattern is computed from the brush's line pattern.
Pscolor Public Operations
PSColor(Color_Intensity,Color_Intensity,Color_Intensity,constchar*name)
Create a PSColor, supplying color intensity information and a name to associate with the
intensities. The name is used solely to generate idraw-compatible PostScript.
Psfont Public Operations
PSFont(constchar*name,constchar*PS_name,constchar*PS_size)
Construct a PSFont, supplying the window-system-specified font name and the corresponding
PostScript font name and its size.
constchar*GetName()constchar*GetPrintFont()constchar*GetPrintSize()constchar*GetPrintFontAndSize()
Return constructor-supplied parameters. GetPrintFontAndSize returns the concatenation of the
PostScript font name and its size, with a space interposed for legibility.
intGetLineHt()
Return an integer version of the PostScript font's size (as supplied to the constructor).
Pspattern Public Operations
PSPattern()PSPattern(intdither,floatgraylevel)PSPattern(constint*pattern,int)
Create an undefined PSPattern (the parameterless constructor), or one having specific dither and
graylevel values, or one that replicates a pattern defined by the given array. Structured
graphics having an undefined pattern will not render their filled portions.
booleanNone()
Return true if this is an undefined pattern.
floatGetGrayLevel()
Return the graylevel that the pattern approximates, if one was specified in the constructor.
constint*GetData()intGetSize()
Return the array that defines the replicated pattern and its size, if the pattern was constructed
with one.
See Also
idraw(1I), pspaint(3I), and the InterViews 3.1 reference manual Unidraw 2 February 1991 pspaint(3U)
Synopsis
#include<Unidraw/Graphic/pspaint.h>
