public final class XpsCanvas extends XpsContentElement
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 |
---|---|
<T extends XpsContentElement> |
add(T element)
Adds an element to this canvas's child list.
|
XpsCanvas |
addCanvas()
Adds a new 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.
|
XpsPath |
addPath(XpsPathGeometry data)
Adds a new path to this canvas's child list.
|
XpsCanvas |
deepClone()
Clones this canvas.
|
XpsEdgeMode |
getEdgeMode()
Returns the value that controls how edges of paths within the canvas are rendered.
|
<T extends XpsContentElement> |
insert(int index,
T element)
Inserts an element to this canvas's child list at
index position. |
XpsCanvas |
insertCanvas(int index)
Inserts a new 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. |
XpsPath |
insertPath(int index,
XpsPathGeometry data)
Inserts a new path to this canvas's child list at
index position. |
void |
setEdgeMode(XpsEdgeMode value)
Sets the value that controls how edges of paths within the canvas are rendered.
|
getClip, getOpacity, getOpacityMask, getRenderTransform, setClip, setOpacity, setOpacityMask, setRenderTransform
getHyperlinkTarget, setHyperlinkTarget
get, iterator, size
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public <T extends XpsContentElement> T add(T element)
Adds an element to this canvas's child list.
T
- The type of the element to add.element
- The element to add.public <T extends XpsContentElement> T insert(int index, T element)
Inserts an element to this canvas's child list at index
position.
T
- The type of the element to insert.index
- Position at which an element should be inserted.element
- The element to insert.public XpsCanvas addCanvas()
Adds a new canvas to this canvas's child list.
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 XpsPath addPath(XpsPathGeometry data)
Adds a new path to this canvas's child list.
data
- The geometry of the path.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 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 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 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.
Copyright © 2020 Aspose. All Rights Reserved.