Skip to content

Instantly share code, notes, and snippets.

@fwextensions
Created February 12, 2013 17:39
Show Gist options
  • Save fwextensions/4771622 to your computer and use it in GitHub Desktop.
Save fwextensions/4771622 to your computer and use it in GitHub Desktop.
How to add a rectangle the same size as the canvas
var dom = fw.getDocumentDOM();
dom.addNewRectangle({ left: 0, top: 0, right: dom.width, bottom: dom.height }, 0);
@akiramaru
Copy link

// 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);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment