Skip to content

Latest commit

 

History

History
29 lines (20 loc) · 799 Bytes

File metadata and controls

29 lines (20 loc) · 799 Bytes

Rectangle Object Simplified Format

  • Input format of jamHelpers.toRectangleObject.

Simplified format

Defined as a two-element JSON array: [ rectangle, unit ]

rectangle : four or five-element JSON array: [ left, top, right, bottom ] or [ left, top, right, bottom, radius ]
unit : string (among "distanceUnit", "percentUnit", "pixelsUnit")

left : number
top : number
right : number
bottom : number

radius : [optional] number (radius of rounded corners)

Example

[ [ 10, 10, 90, 90, 10 ], "percentUnit" ]

Rounded Rectangle