locateProps(SVGElement parent, int level, int defs, Vector hiddens, Vector visibles) Walk the current parent node downward to find all "hiddens" (The SVG
elements within a section that have IDs) and all "visibles"
(The SVG elements outside the sections).
public void
mirrorProp(SVGLocatableElement prop, boolean flipHorizontal) Mirrors the prop about the horizontal or vertical axis.
public void
paint(Graphics g) Paint the photo in the back, then layer all SVG images on top.
public void
removeProp() Removes the current prop if it is displayed.
public void
rotateProp(SVGLocatableElement prop, float angle) Rotates the prop by the given angle.
public void
scaleProp(SVGLocatableElement prop, float scale) Scales the prop by the given scale.
public void
setPhoto(int number) Establishes the current background photo.
public void
setPropsLibrary(SVGImage image) Establishes the current prop library, which holds definitions of props in
its section(s).
public void
translateProp(SVGLocatableElement prop, float dx, float dy) Translate the prop by the given horizontal and vertical distances.
Repeat a keypress.
Parameters: keyCode - The code for the key that was pressed.
locateProps
static void locateProps(SVGElement parent, int level, int defs, Vector hiddens, Vector visibles)(Code)
Walk the current parent node downward to find all "hiddens" (The SVG
elements within a section that have IDs) and all "visibles"
(The SVG elements outside the sections).
Parameters: parent - The relative parent node. Parameters: level - The nesting level (0..n). Parameters: defs - The nesting level. Parameters: hiddens - The list of elements with IDs within a section. Parameters: visibles - The list of elements outside a section.
mirrorProp
public void mirrorProp(SVGLocatableElement prop, boolean flipHorizontal)(Code)
Mirrors the prop about the horizontal or vertical axis.
Parameters: angle - The angle by which the image will be rotated. Parameters: flipHorizontal - true if mirroring will be about thevertical axis; false if mirroring will be about thehorizontal axis.
Establishes the current prop library, which holds definitions of props in
its section(s). Each prop is located by its ID.
When a prop is used on the display, a <use> element is
inserted into the library, effectively making the prop available for
display.
Parameters: image - The SVG image containing the prop definitions. The image mayalso contain elements that are statically positioned.
translateProp
public void translateProp(SVGLocatableElement prop, float dx, float dy)(Code)
Translate the prop by the given horizontal and vertical distances.
Parameters: dx - The horizontal distance to move the prop. Parameters: dy - The vertical distance to move the prop.