DrawPolygon Drawing Command

Draws a new regular polygon.

drawpolygon <centerx centery radiusx radiusy> [type] [SIDES number] [OFFSETANGLE angle] [DEFLECTION amount] [ANGLEDEFLECTION amount] [ROTATE angle | SKEW slantangle twistangle | SLANT angle | TWIST angle] [ABOUT pointx pointy | ABOUTCENTER] [constraint] [printable] [stack] [PAGE number | MPG name/S | DOCUMENT name | WINDOW name]

center.../d The coordinates of the center point.

radius.../d The radius of the polygon.

type/k The polygon type.

Options: NORMAL(default)|STAR|PUFFY|SCALLOP|WAVY.

SIDES/i The number of sides. Default=5. Must be >2.

OFFSETANGLE/d The pre-rotation angle. Default=0.

DEFLECTION/d The spike depth. Default=40%.

ANGLEDEFLECTION/d The spike angle. Default=0%.

ROTATE/d The rotation angle. Default=0.

SKEW/d The slant and twist angle. Default=0.

SLANT/d The slant angle. Default=0.

TWIST/d The twist angle. Default=0.

ABOUT/d The rotation point.

ABOUTCENTER Rotates around its center. Default.

constraint/k The aspect ratio constraint toggle.

Options: CONSTRAIN|FREE (default).

printable/k The print object toggle.

Options: PRINT (default)|NOPRINT.

stack/k The stack position.

Options: INFRONT (default)|INBACK.

PAGE/s The page number. Default=current.

MPG/s The master page name and side. Default=current.

DOCUMENT/s The document name. Default=current.

WINDOW/s The window name. Default=current.

Results:

The identification number (handle) of the new object is returned to RESULT.

Examples:
ARexx:

drawpolygon 0.3 1.8 1.25 1.5 sides 8 puffy

 

DrawPolygon  Command Definition  url:PGScmd/drawpolygon
  created:2006-03-30 13:47:47   last updated:2006-08-18 11:50:15
  Copyright © 1985-2024 GrasshopperLLC. All Rights Reserved.

User Contributed Comments For DrawPolygon
Dan Kilroy wrote...2006-05-03 20:25:02

Script command submitted from PageStream internal documentation. Needs to be checked and merged with the command documentation above.

Gets the {...} .

objectid = DrawPolygon (xcenter ycenter xradius yradius [SIDES sides] [OFFSETANGLE angle] [DEFLECTION scale] [ANGLEDEFLECTION angle] [NORMAL | STAR | PUFFY | SCALLOP | WAVY] [ROTATE rotation | SKEW slant twist | SLANT slant | TWIST twist] [ABOUT x y | ABOUTCENTER] [INFRONT | INBACK] [CONSTRAIN | FREE] [PRINT | NOPRINT] [PAGE document:...-pagenum | MPG document:...-masterpage:side | DOCUMENT document | WINDOW document-window])


Parameters:


Results:


Notes:


See Also:


Examples:
Python:


ARexx:

Applescript:

User Contributed Comments For DrawPolygon