public final class XpsCanvas extends XpsElement
Class incapsulating Canvas element features. This element groups elements together. For example, Glyphs and Path elements can be grouped in a canvas in order to be identified as a unit (as a hyperlink destination) or to apply a composed property value to each child and ancestor element.
Modifier and Type | Method and Description |
---|---|
XpsCanvas |
addCanvas()
Adds a new canvas to this canvas's child list.
|
XpsCanvas |
addCanvas(XpsCanvas canvas)
Adds a canvas to this canvas's child list.
|
XpsGlyphs |
addGlyphs(String fontFamily,
float fontSize,
XpsFontStyle fontStyle,
float originX,
float originY,
String unicodeString)
Adds new glyphs to this canvas's child list.
|
XpsGlyphs |
addGlyphs(XpsGlyphs glyphs)
Adds glyphs to this canvas's child list.
|
XpsPath |
addPath(XpsPath path)
Adds a path to this canvas's child list.
|
XpsPath |
addPath(XpsPathGeometry data)
Adds a new path to this canvas's child list.
|
XpsCanvas |
deepClone()
Clones this canvas.
|
XpsPathGeometry |
getClip()
Returns the path geometry limitting the rendered region of the element.
|
XpsEdgeMode |
getEdgeMode()
Returns the value that controls how edges of paths within the canvas are rendered.
|
XpsHyperlinkTarget |
getHyperlinkTarget()
Returns The hyperlink target object.
|
float |
getOpacity()
Returns the value defining the uniform transparency of the canvas.
|
XpsBrush |
getOpacityMask()
Returns the brush specifying a mask of alpha values that is applied
to the canvas in the same fashion as the Opacity attribute, but allowing different alpha values
for different areas of the element.
|
XpsMatrix |
getRenderTransform()
Returns the affine transformation matrix establishing a new coordinate frame
for the child and descendant elements of the canvas, such as another canvas.
|
XpsCanvas |
insertCanvas(int index)
Inserts a new canvas to this canvas's child list at
index position. |
XpsCanvas |
insertCanvas(int index,
XpsCanvas canvas)
Inserts a canvas to this canvas's child list at
index position. |
XpsGlyphs |
insertGlyphs(int index,
String fontFamily,
float fontSize,
XpsFontStyle fontStyle,
float originX,
float originY,
String unicodeString)
Inserts new glyphs to this canvas's child list at
index position. |
XpsGlyphs |
insertGlyphs(int index,
XpsGlyphs glyphs)
Inserts glyphs to this canvas's child list.
|
XpsPath |
insertPath(int index,
XpsPath path)
Inserts a path to this canvas's child list at
index position. |
XpsPath |
insertPath(int index,
XpsPathGeometry data)
Inserts a new path to this canvas's child list at
index position. |
void |
setClip(XpsPathGeometry value)
Sets the path geometry limitting the rendered region of the element.
|
void |
setEdgeMode(XpsEdgeMode value)
Sets the value that controls how edges of paths within the canvas are rendered.
|
void |
setHyperlinkTarget(XpsHyperlinkTarget value)
Sets the hyperlink target object.
|
void |
setOpacity(float value)
Sets the value defining the uniform transparency of the canvas.
|
void |
setOpacityMask(XpsBrush value)
Sets the brush specifying a mask of alpha values that is applied
to the canvas in the same fashion as the Opacity attribute, but allowing different alpha values
for different areas of the element.
|
void |
setRenderTransform(XpsMatrix value)
Sets the affine transformation matrix establishing a new coordinate frame
for the child and descendant elements of the canvas, such as another canvas.
|
get, iterator, size
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public XpsCanvas addCanvas()
Adds a new canvas to this canvas's child list.
public XpsCanvas addCanvas(XpsCanvas canvas)
Adds a canvas to this canvas's child list.
canvas
- The canvas to be added.public XpsCanvas insertCanvas(int index)
Inserts a new canvas to this canvas's child list at index
position.
index
- Position at which a new canvas should be inserted.public XpsCanvas insertCanvas(int index, XpsCanvas canvas)
Inserts a canvas to this canvas's child list at index
position.
index
- Position at which a canvas should be inserted.canvas
- The canvas to be inserted.public XpsPath addPath(XpsPathGeometry data)
Adds a new path to this canvas's child list.
data
- The geometry of the path.public XpsPath addPath(XpsPath path)
Adds a path to this canvas's child list.
path
- A path to be added.public XpsPath insertPath(int index, XpsPathGeometry data)
Inserts a new path to this canvas's child list at index
position.
index
- Position at which a new path should be inserted.data
- The geometry of the path.public XpsPath insertPath(int index, XpsPath path)
Inserts a path to this canvas's child list at index
position.
index
- Position at which a path should be inserted.path
- A path to be inserted.public XpsGlyphs addGlyphs(String fontFamily, float fontSize, XpsFontStyle fontStyle, float originX, float originY, String unicodeString)
Adds new glyphs to this canvas's child list.
fontFamily
- Font family.fontSize
- Font size.fontStyle
- Font style.originX
- Glyphs origin X coordinate.originY
- Glyphs origin T coordinate.unicodeString
- String to be printed.public XpsGlyphs addGlyphs(XpsGlyphs glyphs)
Adds glyphs to this canvas's child list.
glyphs
- Glyphs to be added.public XpsGlyphs insertGlyphs(int index, String fontFamily, float fontSize, XpsFontStyle fontStyle, float originX, float originY, String unicodeString)
Inserts new glyphs to this canvas's child list at index
position.
index
- Position at which new glyphs should be inserted.fontFamily
- Font family.fontSize
- Font size.fontStyle
- Font style.originX
- Glyphs origin X coordinate.originY
- Glyphs origin T coordinate.unicodeString
- String to be printed.public XpsGlyphs insertGlyphs(int index, XpsGlyphs glyphs)
Inserts glyphs to this canvas's child list.
index
- Position at which glyphs should be inserted.glyphs
- Glyphs to be added.public XpsMatrix getRenderTransform()
Returns the affine transformation matrix establishing a new coordinate frame for the child and descendant elements of the canvas, such as another canvas. Also affects clip and opacity mask.
public void setRenderTransform(XpsMatrix value)
Sets the affine transformation matrix establishing a new coordinate frame for the child and descendant elements of the canvas, such as another canvas. Also affects clip and opacity mask.
value
- The affine transformation matrix.public XpsPathGeometry getClip()
Returns the path geometry limitting the rendered region of the element.
public void setClip(XpsPathGeometry value)
Sets the path geometry limitting the rendered region of the element.
value
- The path geometry limitting the rendered region of the element.public float getOpacity()
Returns the value defining the uniform transparency of the canvas.
public void setOpacity(float value)
Sets the value defining the uniform transparency of the canvas.
value
- The value defining the uniform transparency of the canvas.public XpsBrush getOpacityMask()
Returns the brush specifying a mask of alpha values that is applied to the canvas in the same fashion as the Opacity attribute, but allowing different alpha values for different areas of the element.
public void setOpacityMask(XpsBrush value)
Sets the brush specifying a mask of alpha values that is applied to the canvas in the same fashion as the Opacity attribute, but allowing different alpha values for different areas of the element.
value
- The brush specifying a mask.public XpsHyperlinkTarget getHyperlinkTarget()
Returns The hyperlink target object.
public void setHyperlinkTarget(XpsHyperlinkTarget value)
Sets the hyperlink target object.
value
- The hyperlink target object.public XpsEdgeMode getEdgeMode()
Returns the value that controls how edges of paths within the canvas are rendered.
public void setEdgeMode(XpsEdgeMode value)
Sets the value that controls how edges of paths within the canvas are rendered.
value
- The edge rendering mode.public XpsCanvas deepClone()
Clones this canvas.