cpr.geometry.Insets
A geometric operation object that abstracts the top, bottom, left, and right margins.
Index
| Name |
Type |
Description |
| bottom |
Number |
Default 0 below |
| height |
Number |
We get the sum of the top and bottom margins. |
| left |
Number |
Left default 0 |
| right |
Number |
Right default 0 |
| top |
Number |
Above default 0 |
| width |
Number |
The sum of the left and right margins is obtained. |
Constructor
| name |
type |
description |
| top
|
Number |
Top margin |
| right
|
Number |
Right margin |
| bottomoptional
|
Number |
defaultundefined
|
Bottom margin |
| leftoptional
|
Number |
defaultundefined
|
Left margin |
Properties
| type
|
Number |
|
Default 0 below
|
| type
|
Number |
| readonly
|
We get the sum of the top and bottom margins.
|
| type
|
Number |
|
Left default 0
|
| type
|
Number |
|
Right default 0
|
| type
|
Number |
|
Above default 0
|
| type
|
Number |
| readonly
|
The sum of the left and right margins is obtained.
|
Methods
Add a margin.
| name |
type |
description |
| other
|
Insets |
Another margin object to add. |
Get a copy object with different margins added.
| name |
type |
description |
| other
|
Insets |
Margin to add. |
You get a copy with the x and y axes reversed.
Returns whether all margins are empty.
Inverts all the top, bottom, left and right margins.
Invert the x-axis and y-axis.