Created
February 12, 2013 17:39
-
-
Save fwextensions/4771622 to your computer and use it in GitHub Desktop.
How to add a rectangle the same size as the canvas
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var dom = fw.getDocumentDOM(); | |
dom.addNewRectangle({ left: 0, top: 0, right: dom.width, bottom: dom.height }, 0); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
// I think that addNewRectanglePrimitive better than addNewRectangle.
// Because you can use the corner radius setting in PI to it.
var dom = fw.getDocumentDOM();
dom.addNewRectanglePrimitive({left:0, top:0, right:dom.width, bottom:dom.height}, 0);