1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!--Converted with LaTeX2HTML 99.2beta8 (1.46)
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>2.1.1 Specifying pen attributes</TITLE>
<META NAME="description" CONTENT="2.1.1 Specifying pen attributes">
<META NAME="keywords" CONTENT="tutorial">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="LaTeX2HTML v99.2beta8">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
<LINK REL="STYLESHEET" HREF="tutorial.css">
<LINK REL="next" HREF="node52.html">
<LINK REL="previous" HREF="node50.html">
<LINK REL="up" HREF="node50.html">
<LINK REL="next" HREF="node52.html">
</HEAD>
<BODY bgcolor="#ffffff">
<!--Navigation Panel-->
<A NAME="tex2html1143"
HREF="node52.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.gif"></A>
<A NAME="tex2html1137"
HREF="node50.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.gif"></A>
<A NAME="tex2html1131"
HREF="node50.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.gif"></A>
<A NAME="tex2html1139"
HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.gif"></A>
<A NAME="tex2html1141"
HREF="node79.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.gif"></A>
<BR>
<B> Next:</B> <A NAME="tex2html1144"
HREF="node52.html">2.1.2 Specifying fill attributes</A>
<B> Up:</B> <A NAME="tex2html1138"
HREF="node50.html">2.1 General Information</A>
<B> Previous:</B> <A NAME="tex2html1132"
HREF="node50.html">2.1 General Information</A>
  <B> <A NAME="tex2html1140"
HREF="node1.html">Contents</A></B>
  <B> <A NAME="tex2html1142"
HREF="node79.html">Index</A></B>
<BR>
<BR>
<!--End of Navigation Panel-->
<H2><A NAME="SECTION00411000000000000000">
2.1.1 Specifying pen attributes</A>
</H2>
<P>
<A NAME="921"></A><A NAME="922"></A>
<P>
A pen in <A NAME="tex2html170"
HREF="http://www.soest.hawaii.edu/gmt"><B>GMT</B></A> has three attributes: <I>width</I>, <I>color</I>,
and <I>texture</I>. Most programs will accept pen attributes in
the form of an option argument, e.g.,
<P>
<BR>
<P>
<B>-W</B><I>width</I>[/<I>color</I>][<B>t</B><I>texture</I>][<B>p</B>]
<P>
<DL>
<DD><A NAME="934"></A>
<A NAME="935"></A>
<A NAME="936"></A></DD>
<DT><STRONG><IMG
WIDTH="20" HEIGHT="15" ALIGN="BOTTOM" BORDER="0"
SRC="img46.gif"
ALT="$\rightarrow$"></STRONG></DT>
<DD><I>Width</I> is normally measured in units of the
current device resolution (i.e., DOTS_PR_INCH in your
<U>.gmtdefaults</U> file). Thus, if the dpi is set to 300 this unit
is 1/300th of an inch. Append <B>p</B> to specify pen width in points
(1/72 of an inch)<A NAME="tex2html169"
HREF="footnode.html#foot940"><SUP>2.1</SUP></A>.
Note that a pen thickness of 5 will be of different
physical width depending on your dpi setting, whereas a thickness of
5<B>p</B> will always be 5/72 of an inch. Minimum-thickness pens can be
achieved by giving zero width, but the result is device-dependent.
<P>
<A NAME="942"></A>
<A NAME="943"></A>
<A NAME="944"></A></DD>
<DT><STRONG><IMG
WIDTH="20" HEIGHT="15" ALIGN="BOTTOM" BORDER="0"
SRC="img46.gif"
ALT="$\rightarrow$"></STRONG></DT>
<DD>The <I>color</I> can be specified as a <I>gray</I>
shade in the range 0-255 (linearly going from black to white) or using
the RGB system where you specify <I>r</I>/<I>g</I>/<I>b</I>, each ranging
from 0-255. Here 0/0/0 is black and 255/255/255 is white.
<P>
<A NAME="950"></A>
<A NAME="951"></A>
<A NAME="952"></A></DD>
<DT><STRONG><IMG
WIDTH="20" HEIGHT="15" ALIGN="BOTTOM" BORDER="0"
SRC="img46.gif"
ALT="$\rightarrow$"></STRONG></DT>
<DD>The <I>texture</I> attribute controls the appearance
of the line. To get a dotted line, simply append ``<B>t</B>o'' after the
width and color arguments; a dashed pen is requested with ``<B>t</B>a''.
For exact specifications you may append ``<B>t</B><I>string</I>:<I>offset</I>'',
where <I>string</I> is a series of integers separated by underscores.
These numbers represent a pattern by indicating the length of line
segments and the gap between segments. The <I>offset</I> phase-shifts the
pattern along the line. For example, if you want a yellow line of width
2 that alternates between long dashes (20 units), a 10 unit gap, then
a 5 unit dash, then another 10 unit gap, with pattern offset by 10 units
from the origin, specify <B>-W</B>2/255/255/0<B>t</B>20_10_5_10:10.
Here, the texture units can be specified in dpi units or points (see above).
</DD>
</DL>
<P>
<HR>
<!--Navigation Panel-->
<A NAME="tex2html1143"
HREF="node52.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.gif"></A>
<A NAME="tex2html1137"
HREF="node50.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.gif"></A>
<A NAME="tex2html1131"
HREF="node50.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.gif"></A>
<A NAME="tex2html1139"
HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.gif"></A>
<A NAME="tex2html1141"
HREF="node79.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.gif"></A>
<BR>
<B> Next:</B> <A NAME="tex2html1144"
HREF="node52.html">2.1.2 Specifying fill attributes</A>
<B> Up:</B> <A NAME="tex2html1138"
HREF="node50.html">2.1 General Information</A>
<B> Previous:</B> <A NAME="tex2html1132"
HREF="node50.html">2.1 General Information</A>
  <B> <A NAME="tex2html1140"
HREF="node1.html">Contents</A></B>
  <B> <A NAME="tex2html1142"
HREF="node79.html">Index</A></B>
<!--End of Navigation Panel-->
<ADDRESS>
Paul Wessel
2001-04-18
</ADDRESS>
</BODY>
</HTML>
|