home *** CD-ROM | disk | FTP | other *** search
/ Global Amiga Experience / globalamigaexperience.iso / graphic / cad / xcad3000 / xcdoc / drawtext < prev    next >
Text File  |  1995-07-10  |  11KB  |  257 lines

  1.  
  2.    5.9.1 DRAW TEXT
  3.  
  4.  
  5. The DRAW TEXT command is used to draw one or more text entities. The
  6. parameters used to define the text height and width etc. are taken from the
  7. selected parameters defined for the viewport or the system default
  8. parameters. Any of these parameters can be altered within the command by
  9. using the PARAMETERS modifier.
  10.  
  11.  
  12.    COMMAND FORMAT
  13.  
  14.       #DRAW TEXT TEXT string [modifiers] :Loc x1 x2 ... xn [:Loc x1 ... ]
  15.  
  16. Text entities are drawn at each location entered after the colon. ( See fig.
  17. 5.62 ). If more than one string is specified after the TEXT modifier, then
  18. the separate text strings are drawn sequentially at each location. ( See
  19. fig. 5.63 ). If more locations than strings are entered, the text strings
  20. will be drawn starting at the beginning of the list again after the last
  21. has been drawn.
  22.  
  23. If a colon is entered in the IDENTS stream, the text strings will be drawn
  24. starting at the first of any list of text strings entered after the TEXT
  25. modifier.
  26.  
  27.  
  28.    MODIFIERS
  29.  
  30. LAYER          Requires a layer number. This will override the current
  31.                active layer.
  32.  
  33. DEPTH          Requires a depth number. This will override the current
  34.                active depth.
  35.  
  36. TEXT           The TEXT modifier is followed by one or more text strings
  37.                each of which will be drawn as a text entity. The string
  38.                itself can be entered in one of three ways:
  39.  
  40.                   TEXT string
  41.  
  42.                If the required string consists of standard alpha-numeric
  43.                characters, it can be typed as is - delimiters are not
  44.                required.
  45.  
  46.                   TEXT "string"
  47.  
  48.                If the required string contains any characters that may have
  49.                some special meaning in the command line - a colon or return
  50.                for example - then delimiters must be used to enclose the
  51.                string. There are several characters that may be used as
  52.                text delimiters, for a full description see the documentation
  53.                for command format.
  54.  
  55.                   TEXT ""string1"string2"stringN""
  56.  
  57.                If more than one string is going to be entered for the
  58.                command, then each individual string must be separated by
  59.                a common delimiter. The start and end of the complete
  60.                sequence of strings must be prefixed and suffixed with
  61.                double delimiters.
  62.  
  63.                The total maximum number of characters for all strings must
  64.                not exceed 1024 characters.
  65.  
  66. RECTANGLE      If the RECTANGLE modifier is used, then the position, height
  67.                and width of the text string is calculated to fit into a
  68.                specified rectangle. The command format differs slightly
  69.                when using this modifier:
  70.  
  71.                   #DRAW TEXT TEXT string RECTANGLE :Loc x1 x2 [:Loc ... ]
  72.  
  73.                The locations 'x1' and 'x2' define the extents of a
  74.                rectangle into which the text will be fitted. ( See fig. 5.64
  75.                ).
  76.  
  77.                Using RECTANGLE excludes the use of the HEIGHT, WIDTH and
  78.                ANGLE modifiers.
  79.  
  80. INCREMENT      The INCREMENT modifier can be used to increment the last
  81.                numeric value or alphbetic character of a text string in
  82.                ascending or descending order.
  83.  
  84.                As an example, if the command
  85.  
  86.                   #DRAW TEXT TEXT pin18 INCREMENT ASCENDING :Loc x1 x2 ...
  87.  
  88.                was used, the text entities created at each location
  89.                entered after the colon would appear as:
  90.  
  91.                   "pin18"
  92.                   "pin19"
  93.                   "pin20"      etc.
  94.  
  95.                If the text string ends in a numeric value, the value can
  96.                be incremented infinitley but can only be decremented to
  97.                zero. If the last character is alphabetic, when the
  98.                characters 'z' or 'Z' are reached, the next occurance of
  99.                the string will restart with the last letter 'a' or 'A'.
  100.  
  101.                The modifier should be followed by one of two keywords:
  102.  
  103.                   ASCENDING      For ascending increments.
  104.                   DESCENDING     For descending increments.
  105.  
  106.                ( See fig. 5.65 ).
  107.  
  108. TNODE          The TNODE modifier is used to relate a text entity to an
  109.                existing tnode entity. Using TNODE excludes entering any
  110.                text parameters as the text entity will take its parameters
  111.                from the identified tnode.
  112.  
  113.                The command format when using the TNODE modifier is as
  114.                follows:
  115.  
  116.                   #DRAW TEXT TEXT string TNODE :Ent x1 x2 ... x2 [:Ent ... ]
  117.  
  118.                Instead of entering locations for each text entity, an
  119.                existing tnode must be identified. The identified tnode is
  120.                used to provide the text origin and parameters.
  121.  
  122.                The relationship created between the text and tnode entities
  123.                is a parent/child relationship where the tnode is the parent
  124.                entity and the text is the child entity. Therefore if the
  125.                tnode is moved or deleted, the text entity will also be
  126.                moved or deleted. Modifying the text entity will not affect
  127.                its parent tnode.
  128.  
  129.  
  130. PARAMETERS     The PARAMETERS modifier is used to enter a further family
  131.                of modifiers used to control the text parameters and
  132.                appearance.
  133.  
  134. .HEIGHT        A real value defining the character height. ( See fig. 5.66
  135.                ).
  136.  
  137. .WIDTH         A real value defining the character width. If the HEIGHT
  138.                modifier is used without the WIDTH modifier, the character
  139.                width will be set to its default width in proportion to
  140.                the character height.
  141.  
  142. .ANGLE         Text angle in degrees. ( See fig. 5.67 ).
  143.  
  144. .ALIGN         The ALIGN modifier allows you to derive the angle for the
  145.                text by aligning it to a segment of an existing line, string,
  146.                polygon or xhatch polygon entity. The command format changes
  147.                slightly when ALIGN is used:
  148.  
  149.                   #DRAW TEXT TEXT string PARAMETERS ALIGN
  150.                                        :Ent x1 :Loc x2 x3 ... xn [:Ent ... ]
  151.  
  152.                'x1' is used to select the required entity. The angle of the
  153.                segment identified will be used to obtain the angle for the 
  154.                text. Only angle in the region of +/- 90 degrees will be
  155.                used. Locations 'x2' through to 'xn' define the origin points
  156.                for text entities.
  157.  
  158.                ALIGN excludes use of the ANGLE modifier.
  159.  
  160. .SLANT         Text slant in degrees. A slant of zero will produce
  161.                standard upright text. A positive angle, say 10 degrees,
  162.                will slant the text to the right. A negative angle will
  163.                slant the text to the left.
  164.  
  165. .SPACING       Should be followed by one of two keywords:
  166.  
  167.                   PROPORTIONAL   Which will produce proportionally
  168.                                  spaced characters.
  169.  
  170.                   UNIFORM        Which will produce uniformly spaced
  171.                                  characters. Uniform spacing is required
  172.                                  in circumstances where tables or data
  173.                                  need to align vertically. ( See fig.
  174.                                  5.68 ).
  175.  
  176. .CHARSPACING   Requires a real value defining the distance between
  177.                adjacent characters as a proportion of the character width.
  178.                A value of zero will align characters with no space between
  179.                them. A value of .5 will space each character by half the
  180.                width of the character. Negative values can be used to
  181.                produce overlapping characters.
  182.  
  183. .LINESPACING   A real value defining the spacing of vertically adjacent
  184.                text strings as a proportion of the character height. A
  185.                value of 1.5 will separate each line by half the character
  186.                height. A value of 1 will leave no space between lines.
  187.  
  188. .BOXED         A flag indicating a box will be placed around the text.
  189.  
  190. .FONT          The name of an existing text font or a new font created
  191.                with the DEFINE FONT command. ( See fig. 5.69 ).
  192.  
  193. .JUSTIFY       Requires one of three keywords which define how the text
  194.                will be positioned relative to its input location:
  195.  
  196.                   LEFT     Text will be left justified.
  197.                   CENTRE   Text will be centre justified.
  198.                   RIGHT    Text will be right justified.
  199.  
  200.                ( See fig 5.70 ).
  201.  
  202. .NOFILL        Disables text fill if it is currently selected.
  203.  
  204.  
  205. The following modifiers affect the graphic appearance of the text. The
  206. FILLED modifier can only be used on text fonts that may be filled. Fonts
  207. such as the default STANDARD font cannot be filled.
  208.  
  209. .FILLED        Specifies that the text is to be filled with a solid colour
  210.                or patternfill. If none of the following modifiers are used,
  211.                the text will be filled with the colour assigned to the
  212.                layer it will be created on.
  213.  
  214. ..COLOURFILL   Requires a colour number which will be used to fill the
  215.                text overriding the default layer colour assignment.
  216.  
  217. ...OUTLINE     Will outline a colour filled character in the layer
  218.                dependent colour.
  219.  
  220. ..PATTERNFILL  Takes the name of a patternfill which will be used to fill
  221.                the text. To view all of the currently defined patternfills,
  222.                use the command DISPLAY PATTERNFILL.
  223.  
  224. ...COLOUR      Only applicable to single colour patternfills. As with the
  225.                modifier COLOURFILL, a colour number is entered which will
  226.                be used as the patternfill colour overiding the default
  227.                layer colour assignment.
  228.  
  229. ....BACKGROUND Specifies that the patternfill background areas are to be
  230.                filled with the layer dependent colour. If this modifier
  231.                is not used, the background is filled with the background
  232.                colour ( colour 0 ).
  233.  
  234. ...OUTLINE     Will outline a patternfilled character in the layer
  235.                dependent colour.
  236.  
  237.  
  238. The following modifiers can be used to alter the graphic appearance of any
  239. type of text font.
  240.  
  241. .HARDFONT      Specifies that a hardware font will be selected. If this
  242.                modifier is used without specifying a style and thickness,
  243.                any previous hardfont selection made with SELECT TEXT is
  244.                cancelled. The default will be set ( style 0 thickness 1 ).
  245.  
  246. ..STYLE        Requires one of the hardware line-style numbers 0 to 15. To
  247.                view the hardware line-styles, use the command DISPLAY
  248.                HARDFONT.
  249.  
  250. ..THICKNESS    Display line thickness, a value between 1 and 5.
  251.  
  252. ATTRIBUTE      Used to enter one or more attributes associated with this
  253.                entity. For a full description of the ATTRIBUTE option, see
  254.                the documentation for the command ADD ATTRIBUTE.
  255.  
  256.  
  257.