Sophie

Sophie

distrib > Fedora > 13 > i386 > by-pkgid > 5764c67416561ab82b35afcf9c650e17 > files > 738

GMT-doc-4.5.2-1.fc13.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">

<!--Converted with LaTeX2HTML 2002-2-1 (1.71)
original version by:  Nikos Drakos, CBLU, University of Leeds
* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan
* with significant contributions from:
  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
<HTML>
<HEAD>
<TITLE>4.14 Specifying area fill attributes</TITLE>
<META NAME="description" CONTENT="4.14 Specifying area fill attributes">
<META NAME="keywords" CONTENT="GMT_Docs">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">

<META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">

<LINK REL="STYLESHEET" HREF="GMT_Docs.css">

<LINK REL="next" HREF="node67.html">
<LINK REL="previous" HREF="node65.html">
<LINK REL="up" HREF="node30.html">
<LINK REL="next" HREF="node67.html">
</HEAD>

<BODY  bgcolor="#ffffff">
<!--Navigation Panel-->
<A NAME="tex2html3450"
  HREF="node67.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> 
<A NAME="tex2html3444"
  HREF="node30.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> 
<A NAME="tex2html3438"
  HREF="node65.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> 
<A NAME="tex2html3446"
  HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A> 
<A NAME="tex2html3448"
  HREF="node255.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.png"></A> 
<BR>
<B> Next:</B> <A NAME="tex2html3451"
  HREF="node67.html">4.15 Color palette tables</A>
<B> Up:</B> <A NAME="tex2html3445"
  HREF="node30.html">4. General features</A>
<B> Previous:</B> <A NAME="tex2html3439"
  HREF="node65.html">4.13 Specifying pen attributes</A>
 &nbsp; <B>  <A NAME="tex2html3447"
  HREF="node1.html">Contents</A></B> 
 &nbsp; <B>  <A NAME="tex2html3449"
  HREF="node255.html">Index</A></B> 
<BR>
<BR>
<!--End of Navigation Panel-->

<H1><A NAME="SECTION0012140000000000000000">
4.14 Specifying area fill attributes</A>
</H1>

<P>
<A NAME="17602"></A><A NAME="17603"></A><A NAME="17604"></A><A NAME="17605"></A><A NAME="17606"></A><A NAME="17607"></A><A NAME="17608"></A><A NAME="18133"></A>
<A NAME="sec:fill"></A>
<P>
Many plotting programs will allow the user to draw filled polygons or
symbols.  The fill specification may take two forms: 

<P>
<BR> 

<P>
<B>-G</B><I>fill</I>
<P>
<B>-Gp</B><I>dpi/pattern</I>[:<B>B</B><I>color</I>[<B>F</B><I>color</I>]]
<P>
<BR> 

<DL>
<DT><STRONG>fill:</STRONG></DT>
<DD>In the first case we may specify a <I>gray</I> shade (0-255), RGB color
(<I>r</I>/<I>g</I>/<I>b</I> all in the 0-255 range or in hexadecimal <I>#rrggbb</I>), HSV color (<I>hue</I>-<I>saturation</I>-<I>value</I>
in the 0-360, 0-1, 0-1 range), CMYK color (<I>cyan</I>/<I>magenta</I>/<I>yellow</I>/<I>black</I>,
each ranging from 0-100%), or a valid color <I>name</I>; in that respect it is similar
to specifying the pen color settings (see pen color discussion under Section&nbsp;<A HREF="node65.html#sec:pen">4.13</A>).
</DD>
<DT><STRONG>pattern:</STRONG></DT>
<DD>The second form allows us to use a predefined bit-image pattern.
<I>pattern</I> 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 <A NAME="tex2html1145"
  HREF="http://gmt.soest.hawaii.edu"><B>GMT</B></A> and reproduced in Appendix&nbsp;<A HREF="node199.html#app:E">E</A>.
The latter allows the user to create customized, repeating images using
standard Sun raster files<A NAME="tex2html1143"
  HREF="footnode.html#foot18134"><SUP>4.11</SUP></A>.  The <I>dpi</I> parameter sets the resolution of
this image on the page;  the area fill is thus made up of a series of these
``tiles''.  Specifying <I>dpi</I> as 0 will result in highest resolution
obtainable given the present dpi setting in <U>.gmtdefaults4</U>.
By specifying upper case <B>-GP</B> instead of <B>-Gp</B> 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>B</B><I>color</I>[<B>F</B><I>color</I>]) that will
replace the default white and black pixels, respectively.  Setting one of the
fore- or background colors to - yields a <I>transparent</I> image where only the
back- <I>or</I> foreground pixels will be painted.
</DD>
</DL>

<P>
Due to <I>PostScript</I> implementation limitations the raster images used with
<B>-G</B> must be less than 146 x 146 pixels in size; for larger images see
<A NAME="tex2html1146"
  HREF="../man/psimage.html"><I><B>psimage</B></I></A><A NAME="18819"></A>.  The format of Sun raster files is outlined in Appendix&nbsp;<A HREF="node172.html#app:B">B</A>.
Note that under <I>PostScript</I> Level 1 the patterns are filled by using
the polygon as a <I>clip path</I>.  Complex clip paths may require
more memory than the <I>PostScript</I> interpreter has been assigned.
There is therefore the possibility that some <I>PostScript</I> 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
<I>may or may not</I> solve the problem! 

<P>
Table&nbsp;<A HREF="#tbl:fillex">4.6</A> contains a few examples of fill specifications.

<P>
<BR><P></P>
<DIV ALIGN="CENTER"><A NAME="17677"></A>
<TABLE>
<CAPTION><STRONG>Table 4.6:</STRONG>
A few examples of fill specifications.</CAPTION>
<TR><TD>
<DIV ALIGN="CENTER"><TABLE CELLPADDING=3 BORDER="1">
<TR><TD ALIGN="CENTER" COLSPAN=1><I>Fill example</I></TD>
<TD ALIGN="CENTER" COLSPAN=1><I>Comment</I></TD>
</TR>
<TR><TH ALIGN="LEFT"><B>-G</B>128</TH>
<TD ALIGN="LEFT">Solid gray</TD>
</TR>
<TR><TH ALIGN="LEFT"><B>-G</B>127/255/0</TH>
<TD ALIGN="LEFT">Chartreuse, R/G/B-style</TD>
</TR>
<TR><TH ALIGN="LEFT"><B>-G</B>#00ff00</TH>
<TD ALIGN="LEFT">Green, hexadecimal RGB code</TD>
</TR>
<TR><TH ALIGN="LEFT"><B>-G</B>25-0.86-0.82</TH>
<TD ALIGN="LEFT">Chocolate, h-s-v - style</TD>
</TR>
<TR><TH ALIGN="LEFT"><B>-G</B>DarkOliveGreen1</TH>
<TD ALIGN="LEFT">One of the named colors</TD>
</TR>
<TR><TH ALIGN="LEFT"><B>-Gp</B>300/7</TH>
<TD ALIGN="LEFT">Simple diagonal hachure pattern in b/w at 300 dpi</TD>
</TR>
<TR><TH ALIGN="LEFT"><B>-Gp</B>300/7:Bred</TH>
<TD ALIGN="LEFT">Same, but with red lines on white</TD>
</TR>
<TR><TH ALIGN="LEFT"><B>-Gp</B>300/7:BredF-</TH>
<TD ALIGN="LEFT">Now the gaps between red lines are transparent</TD>
</TR>
<TR><TH ALIGN="LEFT"><B>-Gp</B>100/marble.ras</TH>
<TD ALIGN="LEFT">Using user image of marble as the fill at 100 dpi</TD>
</TR>
</TABLE>

<A NAME="tbl:fillex"></A></DIV></TD></TR>
</TABLE>
</DIV><P></P>
<BR>

<P>
<HR>
<!--Navigation Panel-->
<A NAME="tex2html3450"
  HREF="node67.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> 
<A NAME="tex2html3444"
  HREF="node30.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> 
<A NAME="tex2html3438"
  HREF="node65.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> 
<A NAME="tex2html3446"
  HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A> 
<A NAME="tex2html3448"
  HREF="node255.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.png"></A> 
<BR>
<B> Next:</B> <A NAME="tex2html3451"
  HREF="node67.html">4.15 Color palette tables</A>
<B> Up:</B> <A NAME="tex2html3445"
  HREF="node30.html">4. General features</A>
<B> Previous:</B> <A NAME="tex2html3439"
  HREF="node65.html">4.13 Specifying pen attributes</A>
 &nbsp; <B>  <A NAME="tex2html3447"
  HREF="node1.html">Contents</A></B> 
 &nbsp; <B>  <A NAME="tex2html3449"
  HREF="node255.html">Index</A></B> 
<!--End of Navigation Panel-->
<ADDRESS>
Paul Wessel
2010-01-14
</ADDRESS>
</BODY>
</HTML>