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

  1.  
  2.    5.7.1 DRAW POLYGON
  3.  
  4.  
  5. The DRAW POLYGON command is used to define a closed polygon which can be
  6. filled with a solid colour or a patternfill. A single polygon entity may
  7. consist of up to 64 separate polygons, one main polygon and 63 sub-polygons.
  8. Sub-polygons can be used to define inner boundaries within the main polygon
  9. that act as 'holes' and will be excluded from the fill.
  10.  
  11. If none of the font modifiers are used, the polygon will be filled with its
  12. layer dependent colour.
  13.  
  14.  
  15.    COMMAND FORMAT    ( except for PARALLEL )
  16.  
  17.       #DRAW POLYGON [modifiers] :Loc x1 x2 ... xn [:Loc x1 ... xn] [CR]
  18.          Loc ...
  19.  
  20. The first set of locations entered define the main polygon boundary. If this
  21. set of locations is delimited with a colon, then a sub-polygon boundary
  22. definition can be entered. Futher sub-polygon boundaries may be entered
  23. until a return is used to terminate the last boundary location list. When
  24. the polygon has been created, a second polygon entity can be defined in the
  25. same way. To terminate the command, a return should be entered at the 'Loc'
  26. prompt which appears when the previously defined polygon has been created.
  27.  
  28. Polygons can somtimes be required to be drawn using existing entities to
  29. define the boundary of the area to be filled. To create a polygon boundary
  30. using existing entities, the IDENTS point on entity modes - CHAIN, GENERATE,
  31. END, MID, ORG and NEAR - can be used to generate the required boundary. For
  32. more information on this subject see the documentation for IDENTS or use the
  33. command:
  34.  
  35.    #HELP MANUAL IDENTS LOCS
  36.  
  37. ( See figs. 5.46 to 5.48 ).
  38.  
  39.  
  40.    MODIFIERS
  41.  
  42. LAYER          Requires a layer number. This will override the current
  43.                active layer.
  44.  
  45. DEPTH          Requires a depth number. This will override the current
  46.                active depth.
  47.  
  48. PARALLEL       Format:
  49.  
  50.                   #DRAW POLYGON PARALLEL [value] :Ent x1 :Loc x2 :Ent ...
  51.  
  52.                Will draw a polygon parallel to an exsiting polygon. 'x1'
  53.                identifies the existing polygon.
  54.  
  55.                'x2' is used to define on which side of the existing polygon
  56.                to draw the new polygon boundary. If a value is entered after
  57.                PARALLEL, the new polygon boundary will be drawn at the
  58.                specified distance from the existing polygon. ( See fig. 5.49
  59.                ). If no value is entered, the distance is derived as the
  60.                distance between 'x2' and the nearest side of the existing
  61.                polygon.
  62.  
  63.                In PARALLEL mode, all sub-polygons are defined in the same
  64.                way.
  65.  
  66. RECTANGLE      Will draw rectangular polygons. Two locations are entered
  67.                for each sub-polygon, these define the extents of the
  68.                rectangle. ( See fig. 5.50 ).
  69.  
  70.                In RECTANGLE mode, all sub-polygons are defined in the same
  71.                way.
  72.  
  73. The following modifiers all define alternative methods for filling the
  74. polygon. The 4 main types of fill are defined with the modifiers COLOURFILL,
  75. PATTERNFILL, HALFTONE and SHADOW.
  76.  
  77. COLOURFILL     Requires a colour number in the range 0 to 7. This indicates
  78.                that the polygon will be filled with a specific colour and
  79.                not the layer dependent colour.
  80.  
  81. .HALFTONE      This modifier will 'halftone' the colour fill by applying
  82.                a mask which lets the background colour show through at every
  83.                second pixel in the filled area.
  84.  
  85. .OUTLINE       Will outline the polygon with the layer dependent colour.
  86.  
  87. PATTERNFILL    Requires the name of a patternfill previously defined with
  88.                the DEFINE PATTERNFILL command. The polygon area will be
  89.                filled with the named patternfill.
  90.  
  91.                The following modifiers only apply to patternfills that
  92.                were originally defined using colour 1 only. ( See the
  93.                command DEFINE PATTERNFILL ).
  94.  
  95. .COLOUR        Requires a colour number in the range 0 to 7. The colour
  96.                specified will be used as the 'foreground' colour for the
  97.                patternfill overriding the default layer dependent colour.
  98.  
  99. ..BACKGROUND   The background of a patternfill is normally filled with the
  100.                background colour, colour 0. This modifier when used with
  101.                COLOUR will fill the background of the patternfill with the
  102.                layer dependent colour.
  103.  
  104. .OUTLINE       Will outline the patternfilled polygon with the layer
  105.                dependent colour.
  106.  
  107. .TRANSPARENT   If this modifier is used, instead of filling the background
  108.                of a patternfill with a solid colour, the background will be
  109.                made transparent. This will allow any graphics 'beneath' the
  110.                patternfill background areas to show through.
  111.  
  112. .MASK          Specifies that the patternfilled polygon is to be used as a
  113.                mask. All background areas of the patternfill will be filled
  114.                with the background colour blotting out any graphics beneath.
  115.                The patterned areas will become transparent allowing any
  116.                graphics beneath these areas to show through.
  117.  
  118. HALFTONE       This modifier will 'halftone' a solid colour fill by applying
  119.                a mask which lets the background colour show through at every
  120.                second pixel in the filled area.
  121.  
  122. SHADOW         Defines a SHADOW polygon. A shadow polygon is a mask used to
  123.                block out every second pixel in the polygon area. The mask
  124.                is arranged:
  125.  
  126.                                     * * * * * * *
  127.                                      * * * * * * *
  128.                                     * * * * * * *
  129.                                      * * * * * * *       * = pixel
  130.  
  131.                Every 'on' position in the mask will be set to the background
  132.                colour. Every 'off' position will allow whatever graphics are
  133.                beneath the polygon area to show through.
  134.  
  135. ATTRIBUTE      Used to enter one or more attributes associated with this
  136.                entity. For a full description of the ATTRIBUTE option, see
  137.                the documentation for the command ADD ATTRIBUTE.
  138.  
  139.  
  140.