亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? unx25.htm

?? Unix Unleashed, Third Edition is written with the power user and system administrator in mind. This
?? HTM
?? 第 1 頁 / 共 2 頁
字號:

<P>pic comes to your rescue with a solution. It understands Cartesian coordinates, as shown in Figure 25.3.

<BR></P>

<P>

<BR><B><A HREF="25unx15.gif">Figure 25.3. </B><B><I>x,y</I></B><B> coordinates.</A></B>

<BR></P>

<P>Again, the unit is inches. The important thing to remember is that your first object starts at 0,0. In other words, the coordinates are relative. There is no specific location on a page or in a drawing that is always 0,0. It depends on where you start.

<BR></P>

<P>Cartesian coordinates enable you to specify the two boxes shown in Figure 25.1 as

<BR></P>

<PRE>.PS

box at 0,0 &quot;Box 1&quot;

box at 0,-1 &quot;Box 2&quot;

.PE</PRE>

<P>You'll probably find this easier.

<BR></P>

<P>pic also has an invis command. At first glance, it doesn't seem very useful. How often do you expect to draw a page full of invisible boxes? The real advantage of invis is in placing text. Consider Figure 25.4.

<BR></P>

<P>

<BR><B><A HREF="25unx16.gif">Figure 25.4. Using invisible lines.</A></B>

<BR></P>

<P>Placing those pesky dots could be a problem. Using invis, though, makes it easy. The code that produces Figure 25.4 is

<BR></P>

<PRE>.PS

box; move; box

line invis .75 &quot;\s12 . . . \s0&quot;

box

.PE</PRE>

<P>There are other uses for invis. You can use it, for example, to define a large area in which you will be drawing several smaller objects and to provide compass points outside a smaller object.

<BR></P>

<H3 ALIGN="CENTER">

<CENTER><A ID="I11" NAME="I11">

<FONT SIZE=4><B>Additional Shapes and Functions</B>

<BR></FONT></A></CENTER></H3>

<P>pic includes two more shapes in addition to the ones you've already seen. They are the arc and the spline.

<BR></P>

<P>To pic, an arc is a quarter of a circle. You can use the arc command to draw a circle, as in

<BR></P>

<PRE>.PS

arc; arc; arc; arc

.PE</PRE>

<P>A more sensible use of arc is to draw a rectangle with rounded corners. For example,

<BR></P>

<PRE>.PS

line left; arc; line down; arc

line right; arc; line up; arc

.PE</PRE>

<P>To make a spiral like the one shown in Figure 25.5, combine a series of arcs. For example,

<BR></P>

<PRE>.PS

arc rad .04

arc rad .08

arc rad .12

arc rad .16

arc rad .20

arc rad .24

arc rad .28

arc rad .32

arc rad .36

arc rad .40

arc rad .44

arc rad .48

.PE</PRE>

<P>produces the following:

<BR></P>

<P>

<BR><B><A HREF="25unx20.gif">Figure 25.5. A spiral made of arcs.</A></B>

<BR></P>

<P>pic also recognizes trigonometric and other mathematical functions:

<BR></P>

<TABLE BORDER>

<TR>

<TD>

<P>atan2 </P>

<TD>

<P>(e<SUB>1</SUB>, e<SUB>2</SUB>)</P>

<TD>

<P>the arctangent of e<SUB>1</SUB>, e<SUB>2</SUB></P>

<TR>

<TD>

<P>cos </P>

<TD>

<P><BR></P>

<TD>

<P>cosine of e (e must be in radians)</P>

<TR>

<TD>

<P>exp </P>

<TD>

<P><BR></P>

<TD>

<P>10<SUP>e</SUP></P>

<TR>

<TD>

<P>int </P>

<TD>

<P><BR></P>

<TD>

<P>integer part (by truncation)</P>

<TR>

<TD>

<P>log </P>

<TD>

<P><BR></P>

<TD>

<P>logarithm base 10 of e</P>

<TR>

<TD>

<P>max </P>

<TD>

<P>(e<SUB>1</SUB>, e<SUB>2</SUB>)</P>

<TD>

<P>maximum of e<SUB>1</SUB> and e<SUB>2</SUB></P>

<TR>

<TD>

<P>min </P>

<TD>

<P>(e<SUB>1</SUB>, e<SUB>2</SUB>)</P>

<TD>

<P>minimum of e<SUB>1</SUB> and e<SUB>2</SUB></P>

<TR>

<TD>

<P>rand </P>

<TD>

<P>(n)</P>

<TD>

<P>random number between 1 and n</P>

<TR>

<TD>

<P>sin </P>

<TD>

<P><BR></P>

<TD>

<P>sine of e (e must be in radians)</P>

<TR>

<TD>

<P>sqrt </P>

<TD>

<P><BR></P>

<TD>

<P>square root of e</P></TABLE>

<P>These functions must be followed by an expression in parentheses. In the case of atan2, max, and min, two expressions must follow. rand is followed by empty parentheses and produces a random number between 0 and 1.

<BR></P>

<P>Lines and shapes don't have to be solid. You can draw dotted and dashed objects. Consider the following code. 

<BR></P>

<PRE>.PS

B1: box

move to B1.n up .05 right .05

B2: box dashed

move to B2.n up .05 right .05

B3: box dotted

.PE</PRE>

<H3 ALIGN="CENTER">

<CENTER><A ID="I12" NAME="I12">

<FONT SIZE=4><B>Controlling Size</B>

<BR></FONT></A></CENTER></H3>

<P>pic variables include several that specify the default size of pic objects. Table 25.1 lists these variables and their default values.

<BR></P>

<UL>

<LH><B>Table 25.1. Default values of </B><B>pic</B><B> variables.</B>

<BR></LH></UL>

<TABLE BORDER>

<TR>

<TD>

<PRE><I>Variable</I>

<BR></PRE>

<TD>

<PRE><I>Default Value</I>

<BR></PRE>

<TD>

<PRE><I>Variable</I>

<BR></PRE>

<TD>

<PRE><I>Default Value</I>

<BR></PRE>

<TR>

<TD>

<P>arcrad</P>

<TD>

<P>.25i</P>

<TD>

<P>ellipsewid</P>

<TD>

<P>  .75i</P>

<TR>

<TD>

<P>arrowhead</P>

<TD>

<P>  2i</P>

<TD>

<P>lineht</P>

<TD>

<P>   .5i</P>

<TR>

<TD>

<P>arrowht</P>

<TD>

<P> .1i</P>

<TD>

<P>linewid</P>

<TD>

<P>  .75i</P>

<TR>

<TD>

<P>arrowwid</P>

<TD>

<P>.05i</P>

<TD>

<P>moveht</P>

<TD>

<P>   .5i</P>

<TR>

<TD>

<P>boxht</P>

<TD>

<P> .5i</P>

<TD>

<P>movewid</P>

<TD>

<P>  .75i</P>

<TR>

<TD>

<P>boxwid</P>

<TD>

<P>.75i</P>

<TD>

<P>scale</P>

<TD>

<P>    1i</P>

<TR>

<TD>

<P>circlerad</P>

<TD>

<P>.25i</P>

<TD>

<P>textht</P>

<TD>

<P>    0i</P>

<TR>

<TD>

<P>dashwid</P>

<TD>

<P> .5i</P>

<TD>

<P>textwid</P>

<TD>

<P>    0i</P>

<TR>

<TD>

<P>ellipseht</P>

<TD>

<P> .5i</P>

<TD>

<P><BR></P>

<TD>

<P><BR></P></TABLE>

<P>arrowwid and arriowht refer to the arrowhead. The arrowhead variable specifies the fill style of the arrowhead.

<BR></P>

<P>It's easy to change the value of a variable. For example,

<BR></P>

<PRE>boxht = .75; boxwid = .5</PRE>

<P>Remember: The default unit for pic is inches.

<BR></P>

<P>There are other ways of controlling the size of a picture. You can specify a height or a width&#151;or both&#151;on the .PS line. Usually it's better to specify only the width. If you specify both dimensions, your picture may be distorted.

<BR></P>

<HR ALIGN=CENTER>

<NOTE>

<IMG SRC="note.gif" WIDTH = 35 HEIGHT = 35><B>NOTE:</B> For some reason, you must specify the width first. For example, .PS 2 4 produces a picture 2 inches wide and 4 inches long. This is the opposite of the order in which you specify the dimensions of a 
box or ellipse. The width and height you specify refer to the whole picture.

<BR></NOTE>

<HR ALIGN=CENTER>

<P>You can also set the variable scale. By default, scale is set at 100 or 1, depending on your version of pic. (You can test this by scaling a drawing to 1.5. If you get an error message or a garbled result, use 150.) All the dimensions in a pic drawing 
are divided by the scaling factor. Therefore, if the scale is normally 1 and you set it to 4, your 1-inch lines will be a quarter-inch long. For example,

<BR></P>

<PRE>.PS

scale = 2

box ht 2i wid 2i

.PE</PRE>

<P>This code produces a box scaled down to half the size of its specifications, that is, a 1- inch square.

<BR></P>

<HR ALIGN=CENTER>

<NOTE>

<IMG SRC="caution.gif" WIDTH = 37 HEIGHT = 35><B>CAUTION: </B>Text is not scaled. If your text needs resizing, you must do it with \s, and it's usually a matter of trial and error to find out what will fit in your scaled figure.

<BR></NOTE>

<HR ALIGN=CENTER>

<H3 ALIGN="CENTER">

<CENTER><A ID="I13" NAME="I13">

<FONT SIZE=4><B>Object Blocks</B>

<BR></FONT></A></CENTER></H3>

<P>You can define any sequence of objects or moves as a block, which you can manipulate almost as if it were a simple box. You need to name the block. The name must begin with an uppercase letter. Although pic places no specific restrictions on the length 

of the name, shorter is better.

<BR></P>

<P>Object blocks are useful when you are placing text.

<BR></P>

<P>You can also position an object block easily, as in

<BR></P>

<PRE>.PS

C1: circle rad .125

Spiral [

arc rad .04

arc rad .08

arc rad .12

arc rad .16

arc rad .20

arc rad .24

arc rad .28

arc rad .32

arc rad .36

arc rad .40

arc rad .44

arc rad .48

] with .s at C1.n

.PE</PRE>

<H3 ALIGN="CENTER">

<CENTER><A ID="I14" NAME="I14">

<FONT SIZE=4><B>Macros and Variables</B>

<BR></FONT></A></CENTER></H3>

<P>If you want to reuse an object, you can put it in a file by itself and use the copy function: 

<BR></P>

<PRE>.PS

&lt;pic code&gt;

copy filename

&lt;pic code&gt;

.PE</PRE>

<P>You can also define a pic macro. Don't confuse pic macros with troff macros. In the broadest sense, a macro is a short way of referring to a complex process. In other words, a pic macro is just a collection of pic commands that have been given a name.

<BR></P>

<P>Unlike object blocks, which merely give you a convenient way of referring to positions in and around the object, macros can be used to draw objects. The first three lines of the following code sequence enable you to draw the defined object by invoking 
its name, as shown in the last line.

<BR></P>

<PRE>.PS

define SQ %

box ht .5 wid .5

%

SQ; move; SQ

.PE</PRE>

<P>This code produces

<BR></P>

<P><B><IMG SRC="25unx21.gif"></B></P>

<P>To create a macro, use the word define followed by a name for your macro and a delimeter. Next come all your pic instructions and finally, another delimeter. In the first example, I used % for delimeters. In the second example, I used curly braces. 
There is no default. The choice is yours.

<BR></P>

<P>Macros can have up to nine arguments, specified $1 through $9. For example, you can define a square and supply the dimensions as arguments when you invoke the macro, as shown in the first three lines of the following code. The last line produces the 1/2 

inches square shown in Figure 25.6.

<BR></P>

<PRE>.PS

define SQ }

box ht $1 wid $1 &quot;$2&quot;

{

SQ(.5, square)

.PE</PRE>

<P>produces

<BR></P>

<P>

<BR><B><A HREF="25unx22.gif">Figure 25.6. Squares Created with a Macro</A></B>

<BR></P>

<P>Macro definitions require delimiters. As you can see, though, the choice is up to you. Percent signs (%) are usual choices. When you invoke the macro, the arguments go in parentheses.

<BR></P>

<P>Macro definitions persist throughout a file. If you ever have to get rid of a macro, use undef SQ&#151;or whatever you've named your macro.

<BR></P>

<H3 ALIGN="CENTER">

<CENTER><A ID="I15" NAME="I15">

<FONT SIZE=4><B>Debugging</B>

<BR></FONT></A></CENTER></H3>

<P>When you're dealing with pic, you aren't troubleshooting&#151;you're debugging. It's much easier to do this as you code. Draw the first element of your picture. Before you print it, send the file through pic to see whether any error messages are 
generated. If your file contains only pic, you can do this:

<BR></P>

<PRE>pic filename</PRE>

<P>If your file contains text, just use your normal troff command line. However, instead of sending the file to a printer, redirect your output to /dev/null. See Chapter 28, &quot;Tools for Writers,&quot; for more information on directing output to 
/dev/null.

<BR></P>

<P>pic tries to help you pinpoint your errors with messages similar to the following:

<BR></P>

<PRE>pic: syntax error near line 26

context is

        &gt;&gt;&gt; linr &lt;&lt;&lt; left 1i</PRE>

<P>Occasionally, pic tells you that it has reduced the size of your picture. This is almost always because you've made a mistake. Most often, you've left out a decimal point, and pic is trying to fit a line 1625 inches long&#151;you meant 1.625 
inches&#151;on an 8.5-inch page. When this happens, your picture naturally is mangled out of all recognition.

<BR></P>

<P>Usually, your debugging involves the placement of objects and the placement or size of text.

<BR></P>

<H3 ALIGN="CENTER">

<CENTER><A ID="I16" NAME="I16">

<FONT SIZE=4><B><I>pic</I></B><B> Tips and Tricks</B>

<BR></FONT></A></CENTER></H3>

<P>If you can't get an object placed correctly by moving down and left (or up and right) from an object, try referring to both objects by their centers, as in box.c.

<BR></P>

<P>If your drawing involves a number of objects and placement is crucial, use x,y coordinates.

<BR></P>

<P>If you're having trouble placing text, remember over and under.

<BR></P>

<P>Using a box invis or a line invis to place your text usually works well.

<BR></P>

<P>Make yourself a library of pic drawings so that you don't have to keep reinventing the spiral.

<BR></P>

<H3 ALIGN="CENTER">

<CENTER><A ID="I17" NAME="I17">

<FONT SIZE=4><B>Summary</B>

<BR></FONT></A></CENTER></H3>

<P>pic is a troff preprocessor for drawing lines, arrows, boxes, circles, ellipses, arcs, and splines. Output tends to vary from system to system, so be prepared to spend some time debugging. pic is well worth the trouble if you frequently include simple 
graphics in text files. It is especially useful for organization charts, flow charts, state diagrams, and the like.

<BR></P>

<P><A HREF="unx24.htm"><IMG SRC="bluprev.gif" WIDTH = 32 HEIGHT = 32 BORDER = 0 ALT="Previous Page"></A>

<A HREF="index.htm"><IMG SRC="blutoc.gif" WIDTH = 32 HEIGHT = 32 BORDER = 0 ALT="TOC"></A>

<A HREF="unx26.htm"><IMG SRC="blunext.gif" WIDTH = 32 HEIGHT = 32 BORDER = 0 ALT="Next Page"></A>

<A HREF="index.htm"><IMG SRC="bluprev.gif" WIDTH = 32 HEIGHT = 32 BORDER = 0 ALT="Home"></A>

</P></BODY></HTML>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品国产乱子伦一区| 偷拍自拍另类欧美| 久久人人97超碰com| 在线综合视频播放| 欧美日韩国产电影| 欧洲一区在线电影| 色综合久久天天综合网| av资源网一区| aaa国产一区| 99久精品国产| 91国偷自产一区二区开放时间| 不卡视频在线看| 成+人+亚洲+综合天堂| 成人国产精品免费观看动漫| 成人激情校园春色| fc2成人免费人成在线观看播放| 成人动漫一区二区在线| eeuss影院一区二区三区| 91热门视频在线观看| 91丨九色丨蝌蚪丨老版| 91香蕉视频mp4| 欧美日韩另类国产亚洲欧美一级| 欧美日韩高清在线| 制服丝袜在线91| 久久伊人蜜桃av一区二区| 国产视频一区在线观看| 日韩一区日韩二区| 亚洲午夜在线电影| 青青草一区二区三区| 久久精品国产久精国产| 国产成人综合自拍| 91免费国产在线观看| 欧美美女黄视频| 精品国一区二区三区| 国产视频一区二区在线| 国产精品美女久久久久aⅴ| 日韩美女视频一区二区| 亚洲一区二区中文在线| 强制捆绑调教一区二区| 国产91清纯白嫩初高中在线观看 | 国内精品免费在线观看| 高清免费成人av| 色激情天天射综合网| 制服丝袜中文字幕一区| 国产视频911| 亚洲成人久久影院| 国精产品一区一区三区mba视频| 成人av网站在线| 欧美精选在线播放| 国产亚洲福利社区一区| 亚洲综合图片区| 国产麻豆一精品一av一免费 | 一区在线观看视频| 亚洲第一二三四区| 国产乱码精品1区2区3区| 99免费精品在线观看| 欧美一区二区三区的| 中文字幕av一区二区三区 | 91福利视频久久久久| 日韩欧美一区中文| 国产精品久久久久久久第一福利| 日韩精品电影在线| 国产成人丝袜美腿| 欧美久久久久久久久中文字幕| 国产精品久久久久久久久动漫| 蜜桃av一区二区三区| av资源站一区| 久久久亚洲精品一区二区三区| 一卡二卡欧美日韩| 国产精品456| 欧美一二三区精品| 亚洲欧美日本在线| 国产尤物一区二区在线| 欧美日韩在线播放三区| 国产精品美女一区二区三区| 蜜桃视频一区二区三区| 日本国产一区二区| 中国av一区二区三区| 精品在线一区二区三区| 欧美日韩成人在线| 亚洲欧美一区二区不卡| 国产精品亚洲一区二区三区在线 | 欧美天堂亚洲电影院在线播放| 日本一区二区成人| 免费看欧美女人艹b| 在线视频综合导航| 国产精品成人一区二区艾草 | 久久亚洲精品小早川怜子| 亚洲成人精品一区| 色哟哟日韩精品| 1024精品合集| 成人少妇影院yyyy| 精品99一区二区| 久久超级碰视频| 欧美一区二区免费视频| 亚洲国产精品综合小说图片区| 97久久人人超碰| 欧美激情在线一区二区三区| 精品一区二区在线视频| 日韩一区二区在线播放| 性久久久久久久久久久久| 色综合久久精品| 亚洲激情自拍视频| 色婷婷精品大视频在线蜜桃视频| 成人欧美一区二区三区| 丁香激情综合五月| 中文乱码免费一区二区| 成人激情免费网站| 国产精品丝袜在线| 99re这里只有精品首页| 自拍偷拍亚洲综合| 97久久精品人人爽人人爽蜜臀| 成人免费在线视频| 91在线视频播放| 亚洲一区二区视频| 欧美中文字幕一区| 亚洲成人精品影院| 欧美一级久久久| 男人的天堂久久精品| 欧美成人福利视频| 国产综合色视频| 国产日韩影视精品| 福利电影一区二区| 亚洲欧洲性图库| 欧美三级三级三级爽爽爽| 日韩在线卡一卡二| 日韩免费一区二区| 国产精品亚洲成人| 国产精品乱人伦| 欧美主播一区二区三区美女| 日本欧美一区二区在线观看| 久久综合九色综合97婷婷女人| 成人不卡免费av| 亚洲综合成人网| 日韩欧美国产系列| 国产福利一区二区三区| 亚洲精品国久久99热| 欧美日韩免费电影| 国产一区视频网站| 亚洲品质自拍视频| 欧美日本一区二区| 国内外成人在线| 亚洲人成网站在线| 91精品中文字幕一区二区三区| 国产成人免费在线观看不卡| 亚洲一区免费观看| 精品国偷自产国产一区| 99国产精品久久| 久久99国产精品久久| 中文字幕亚洲一区二区av在线| 91精品国产综合久久精品app| 国产成人亚洲精品青草天美| 亚洲一区自拍偷拍| 欧美精品一区二区在线观看| 91在线精品一区二区三区| 奇米精品一区二区三区在线观看| 中文字幕一区二区三区不卡在线| 欧美精选一区二区| 成人激情小说乱人伦| 日韩va欧美va亚洲va久久| 国产精品美女视频| 日韩精品一区二区三区swag| 一本大道久久a久久精二百| 久久99在线观看| 一个色综合网站| 久久久蜜桃精品| 国产一区二区91| 亚洲欧洲精品一区二区三区| 日韩一卡二卡三卡| av午夜精品一区二区三区| 亚洲国产另类精品专区| 精品剧情在线观看| 99riav一区二区三区| 青娱乐精品在线视频| 一区二区三区日韩| 精品福利在线导航| 色综合天天做天天爱| 久久99国产精品成人| 亚洲精品视频在线观看免费 | 亚洲综合成人网| 久久久久久久久99精品| 欧美中文字幕一二三区视频| 国产91丝袜在线观看| 日韩黄色免费网站| 中文字幕在线不卡一区| 欧美一区二区人人喊爽| 91捆绑美女网站| 国产精品自拍网站| 美女视频一区在线观看| 亚洲九九爱视频| 国产欧美精品一区二区色综合| 欧美va在线播放| 欧美狂野另类xxxxoooo| 波多野结衣中文字幕一区二区三区 | 国产区在线观看成人精品| 欧美日韩一区二区不卡| 94-欧美-setu| 国产成人精品三级| 捆绑紧缚一区二区三区视频| 亚洲欧美日韩国产另类专区|