cox.jmatt.java.MathTools.markup.svg
Class PatternTag

java.lang.Object
  extended by cox.jmatt.java.MathTools.markup.Tag
      extended by cox.jmatt.java.MathTools.markup.svg.StyleTag
          extended by cox.jmatt.java.MathTools.markup.svg.DrawableContainerTag
              extended by cox.jmatt.java.MathTools.markup.svg.PatternTag

public class PatternTag
extends DrawableContainerTag

This class provides the <pattern> tag. Add one or more <path> tags to establish the pattern, the add this to the ('defs' block of the) root tag. To apply the pattern to a graphic and reference it by local URL ('id=' attribute)


Nested Class Summary
 
Nested classes/interfaces inherited from class cox.jmatt.java.MathTools.markup.svg.StyleTag
StyleTag.TagKeys
 
Field Summary
 
Fields inherited from class cox.jmatt.java.MathTools.markup.Tag
myTagName
 
Method Summary
static PatternTag newInstance(java.lang.String pTagID)
          This is the only way to construct an instance of this class.
 void reset()
          Overridden to preserve the ID.
 void reset(java.lang.String newID)
          Call this method to clear data and re-set the ID in one fell swoop.
 void setID(java.lang.String pID)
          Overridden to ensure the ID set is valid.
 PatternTag setPatternContentUnits(boolean pUserSpace)
          Set the pattern content unit specifier.
 PatternTag setPatternUnits(boolean pUserSpace)
          Set the pattern units specifier.
 PatternTag setSize(java.lang.Double pX, java.lang.Double pY, java.lang.Double pWidth, java.lang.Double pHeight)
          Set the dimensions of this tag.
 void setTransform(TransformPen pPen)
          Overridden to provide class-specific adjustments.
 
Methods inherited from class cox.jmatt.java.MathTools.markup.svg.DrawableContainerTag
_addContent, _addCSS, _addDef, _content, _setContent, _setDesc, _setOBUS, _setPAR, _setTitle, _setViewBox, add, addRaw, drawCircle, drawEllipse, drawLine, drawPath, drawPoint, drawPolygon, drawPolyline, drawRectangle, drawRectangle, drawText
 
Methods inherited from class cox.jmatt.java.MathTools.markup.svg.StyleTag
_configureTag, _enableCopy, canHaveDefs, isInDefs, setDefaultPen, setDefaultStyle, setDefaultTransform, setPen, setStyle
 
Methods inherited from class cox.jmatt.java.MathTools.markup.Tag
_addAttribute, _addAttributes, _addNAttribute, _asBoolean, _asDouble, _asInt, _attributes, _clampNAttribute, _clampNAttribute, _fixKey, _setEnableXMLTag, badPizza, closeTag, configureTag, configureTagFromGlobalPizza, makeTag, openTag, toString, validString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

newInstance

public static PatternTag newInstance(java.lang.String pTagID)
This is the only way to construct an instance of this class. If the ID argument is null or blank the return value is null!


setID

public void setID(java.lang.String pID)
Overridden to ensure the ID set is valid.

Overrides:
setID in class Tag

reset

public void reset()
Overridden to preserve the ID. To change it use reset(String) or re-set manually afterward.

Overrides:
reset in class Tag

reset

public void reset(java.lang.String newID)
Call this method to clear data and re-set the ID in one fell swoop.


setPatternUnits

public PatternTag setPatternUnits(boolean pUserSpace)
Set the pattern units specifier. This is 'objectBoundingBox' or 'userSpaceOnUse'.

Parameters:
pUserSpace - true for 'userSpaceOnUse', false for 'objectBoundingBox'.
See Also:
DrawableContainerTag._setOBUS(java.lang.String, boolean)

setPatternContentUnits

public PatternTag setPatternContentUnits(boolean pUserSpace)
Set the pattern content unit specifier. This is 'objectBoundingBox' or 'userSpaceOnUse'.

Parameters:
pUserSpace - true for 'userSpaceOnUse', false for 'objectBoundingBox'.
See Also:
DrawableContainerTag._setOBUS(java.lang.String, boolean)

setSize

public PatternTag setSize(java.lang.Double pX,
                          java.lang.Double pY,
                          java.lang.Double pWidth,
                          java.lang.Double pHeight)
Set the dimensions of this tag. It should be percent values or decimals between 0 and 1 for 'objectBoundingBox', or user units for 'userSpaceOnUse'.

Parameters:
pX - The X-coordinate of the pattern's starting point.
pY - The Y-coordinate of the pattern's initial point.
pWidth - The pattern width.
pHeight - The pattern height.

setTransform

public void setTransform(TransformPen pPen)
Overridden to provide class-specific adjustments.

Overrides:
setTransform in class StyleTag
Parameters:
pPen - The TransformPen containing the desired transforms.