comet.rect¶
The comet.rect module is the factory for comet.CRect
objects.
Methods¶
- comet.rect.create(left, top, right, bottom)¶
Create a rectangle with the given side coordinates.
- Parameters:
- Returns:
The new rectangle
- Return type:
- Raises:
TypeError – When parameter types are invalid
- Available:
InDesign® comet_pdf® Illustrator®
- CScript:
- Examples:
Create a rectangle in landscape format.
rect = comet.rect.create(0.0, 0.0, 100.0, 30.0)
- comet.rect.createSquare(edgeLength, x=0.0, y=0.0)¶
Create a square rectangle with the given edge length at the given coordinates.
- Parameters:
- Returns:
The new rectangle
- Return type:
- Raises:
TypeError – When parameter types are invalid
ValueError – When parameter edgeLength has invalid value
- Available:
InDesign® comet_pdf® Illustrator®
- CScript:
- Examples:
Create a square rectangle with an edge length of 50.0 with the center at 20.0/60.0
rect = comet.rect.createSquare(50.0, 20.0, 60.0)