Copyright (C) 2000-2012 |
GNU Info (groff)Drawing FunctionsDrawing Functions ----------------- The `D' drawing command has been extended. These extensions are used by GNU `pic' only if the `-x' option is given. Note: Drawing Requests. `Df N' Set the shade of gray to be used for filling solid objects to N; N must be an integer between 0 and 1000, where 0 corresponds solid white and 1000 to solid black, and values in between correspond to intermediate shades of gray. This applies only to solid circles, solid ellipses and solid polygons. By default, a level of 1000 is used. Whatever color a solid object has, it should completely obscure everything beneath it. A value greater than 1000 or less than 0 can also be used: this means fill with the shade of gray that is currently being used for lines and text. Normally this is black, but some drivers may provide a way of changing this. `DC D' Draw a solid circle with a diameter of D with the leftmost point at the current position. `DE DX DY' Draw a solid ellipse with a horizontal diameter of DX and a vertical diameter of DY with the leftmost point at the current position. `Dp DX1 DY1 DX2 DY2 ... DXN DYN' Draw a polygon with automatic closure. The first vertex is at the current position, the second vertex at an offset (DX1,DY1) from the current position, the second vertex at an offset (DX2,DY2) from the first vertex, and so on up to the Nth vertex. At the moment, GNU `pic' only uses this command to generate triangles and rectangles. `DP DX1 DY1 DX2 DY2 ... DXN DYN' Like `Dp' but draw a solid rather than outlined polygon. `Dt N' Set the current line thickness to N machine units. Traditionally, UNIX `troff' drivers use a line thickness proportional to the current point size; drivers should continue to do this if no `Dt' command has been given, or if a `Dt' command has been given with a negative value of N. A zero value of N selects the smallest available line thickness. A difficulty arises in how the current position should be changed after the execution of these commands. This is not of great importance since the code generated by GNU `pic' does not depend on this. Given a drawing command of the form \D'C X1 Y1 X2 Y2 ... XN YN' where C is not one of `c', `e', `l', `a' or `~', UNIX `troff' treats each x value as a horizontal quantity, and each y value as a vertical quantity; it assumes that the width of the drawn object is the sum of all x values, and that the height is the sum of all y values. (The assumption about the height can be seen by examining the `st' and `sb' registers after using such a `D' command in a `\w' escape sequence.) This rule also holds for all the original drawing commands with the exception of `De'. For the sake of compatibility GNU `troff' also follows this rule, even though it produces an ugly result in the case of the `Df', `Dt', and, to a lesser extent, `DE' commands. Thus after executing a `D' command of the form DC X1 Y1 X2 Y2 ... XN YN the current position should be increased horizontally by the sum of all x values and vertically by the sum of all y values. automatically generated by info2www version 1.2.2.9 |