Class ArtDocument
java.lang.Object
com.codename1.art.ArtDocument
An artwork: a canvas size and a tree of nodes.
Read one with ArtFormats.read, or build one in code. Render it with ArtRenderer,
show it with ArtView, edit it with ArtModel and ArtEditor.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncopy()A deep copy.Finds a node by id anywhere in the tree.doubleCanvas height.getNotes()What the reader that produced this document could not represent exactly.getRoot()The root group.getTitle()The title, or null.doublegetWidth()Canvas width.The group that holdsnode, or null when it is the root or not in this document.voidReplaces the root.voidsetSize(double width, double height) Resizes the canvas.voidSets the title.toDocument(ArtNode node) The transform fromnode's space to document space, or null when it is not here.
-
Constructor Details
-
ArtDocument
public ArtDocument(double width, double height) Creates an empty document.
Parameters
width: canvas widthheight: canvas height
-
-
Method Details
-
getWidth
public double getWidth()Canvas width. -
getHeight
public double getHeight()Canvas height. -
setSize
public void setSize(double width, double height) Resizes the canvas.
Parameters
width: new widthheight: new height
-
getRoot
The root group. -
setRoot
Replaces the root.
Parameters
root: the new root
-
getTitle
The title, or null. -
setTitle
Sets the title.
Parameters
title: the title
-
getNotes
What the reader that produced this document could not represent exactly. -
copy
A deep copy. -
findById
-
parentOf
-
toDocument
-