Next: 4.15 Color palette tables Up: 4. General features Previous: 4.13 Specifying pen attributes Contents Index

# 4.14 Specifying area fill attributes

Many plotting programs will allow the user to draw filled polygons or symbols. The fill may take two forms:

-G fill

-Gp dpi/pattern[:B r/g/b[F r/g/b]]

In the first case we may specify a gray shade (0-255) or a color (r/g/b in the 0-255 range), similar to the pen color settings. The second form allows us to use a predefined bit-image pattern. pattern can either be a number in the range 1-90 or the name of a 1-, 8-, or 24-bit Sun raster file. The former will result in one of the 90 predefined 64 x 64 bit-patterns provided with GMT and reproduced in Appendix E. The latter allows the user to create customized, repeating images using standard Sun rasterfiles. The dpi parameter sets the resolution of this image on the page; the area fill is thus made up of a series of these ``tiles''. Specifying dpi as 0 will result in highest resolution obtainable given the present dpi setting in .gmtdefaults. By specifying upper case -GP instead of -Gp the image will be bit-reversed, i.e., white and black areas will be interchanged (only applies to 1-bit images or predefined bit-image patterns). For these patterns and other 1-bit images one may specify alternative background and foreground colors (by appending :B r/g/b[F r/g/b]) that will replace the default white and black pixels, respectively. Setting one of the fore- or background colors to - yields a transparent image where only the back- or foreground pixels will be painted. Due to PostScript implementation limitations the rasterimages used with -G must be less than 146 x 146 pixels in size; for larger images see psimage. The format of Sun raster files is outlined in Appendix B. Note that under PostScript Level 1 the patterns are filled by using the polygon as a clip path. Complex clip paths may require more memory than the PostScript interpreter has been assigned. There is therefore the possibility that some PostScript interpreters (especially those supplied with older laserwriters) will run out of memory and abort. Should that occur we recommend that you use a regular grayshade fill instead of the patterns. Installing more memory in your printer may or may not solve the problem!

Next: 4.15 Color palette tables Up: 4. General features Previous: 4.13 Specifying pen attributes Contents Index