new PostcardObject(type, ctx, options)
Represents an internal object within the Postcard. Can be selected, redrawn, modified.
Parameters:
| Name |
Type |
Argument |
Description |
type |
text
|
image
|
shape
|
|
The type of object being rendered |
ctx |
CanvasRenderingContext2D
|
|
context in which to draw the object |
options |
Object
|
<optional>
|
Defines placement and content.
Properties
| Name |
Type |
Argument |
Default |
Description |
x |
Object
|
<optional>
|
0
|
X value of the object. |
y |
Object
|
<optional>
|
0
|
Y value of the object. |
w |
Object
|
<optional>
|
50
|
Width of the object. |
h |
Object
|
<optional>
|
50
|
Height of the object. |
fill |
Object
|
<optional>
|
steelblue
|
Fill (color) of the object. |
rotation |
Object
|
<optional>
|
0
|
Rotation of the object (in degrees). |
|
- Source: