XpsCanvas
Inheritance: java.lang.Object, com.aspose.xps.XpsObject, com.aspose.xps.XpsElement, com.aspose.xps.XpsHyperlinkElement, com.aspose.xps.XpsContentElement
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.
Methods
Method | Description |
---|---|
Adds an element to this canvas’s child list. | |
Inserts an element to this canvas’s child list at index position. | |
addCanvas() | Adds a new canvas to this canvas’s child list. |
insertCanvas(int index) | Inserts a new canvas to this canvas’s child list at index position. |
addPath(XpsPathGeometry data) | Adds a new path to this canvas’s child list. |
insertPath(int index, XpsPathGeometry data) | Inserts a new path to this canvas’s child list at index position. |
addGlyphs(String fontFamily, float fontSize, XpsFontStyle fontStyle, float originX, float originY, String unicodeString) | Adds new glyphs to this canvas’s child list. |
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. |
getEdgeMode() | Returns the value that controls how edges of paths within the canvas are rendered. |
setEdgeMode(XpsEdgeMode value) | Sets the value that controls how edges of paths within the canvas are rendered. |
deepClone() | Clones this canvas. |
add(T element)
public T <T>add(T element)
Adds an element to this canvas’s child list.
Parameters:
Parameter | Type | Description |
---|---|---|
element | T | The element to add. |
Returns: T - Added element.
insert(int index, T element)
public T <T>insert(int index, T element)
Inserts an element to this canvas’s child list at index position.
Parameters:
Parameter | Type | Description |
---|---|---|
index | int | Position at which an element should be inserted. |
element | T | The element to insert. |
Returns: T - Inserted element.
addCanvas()
public XpsCanvas addCanvas()
Adds a new canvas to this canvas’s child list.
Returns: XpsCanvas - Added canvas.
insertCanvas(int index)
public XpsCanvas insertCanvas(int index)
Inserts a new canvas to this canvas’s child list at index position.
Parameters:
Parameter | Type | Description |
---|---|---|
index | int | Position at which a new canvas should be inserted. |
Returns: XpsCanvas - Inserted canvas.
addPath(XpsPathGeometry data)
public XpsPath addPath(XpsPathGeometry data)
Adds a new path to this canvas’s child list.
Parameters:
Parameter | Type | Description |
---|---|---|
data | XpsPathGeometry | The geometry of the path. |
Returns: XpsPath - Added path.
insertPath(int index, XpsPathGeometry data)
public XpsPath insertPath(int index, XpsPathGeometry data)
Inserts a new path to this canvas’s child list at index position.
Parameters:
Parameter | Type | Description |
---|---|---|
index | int | Position at which a new path should be inserted. |
data | XpsPathGeometry | The geometry of the path. |
Returns: XpsPath - Inserted path.
addGlyphs(String fontFamily, float fontSize, XpsFontStyle fontStyle, float originX, float originY, String unicodeString)
public XpsGlyphs addGlyphs(String fontFamily, float fontSize, XpsFontStyle fontStyle, float originX, float originY, String unicodeString)
Adds new glyphs to this canvas’s child list.
Parameters:
Parameter | Type | Description |
---|---|---|
fontFamily | java.lang.String | Font family. |
fontSize | float | Font size. |
fontStyle | XpsFontStyle | Font style. |
originX | float | Glyphs origin X coordinate. |
originY | float | Glyphs origin T coordinate. |
unicodeString | java.lang.String | String to be printed. |
Returns: XpsGlyphs - Added glyphs.
insertGlyphs(int index, String fontFamily, float fontSize, XpsFontStyle fontStyle, float originX, float originY, String unicodeString)
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.
Parameters:
Parameter | Type | Description |
---|---|---|
index | int | Position at which new glyphs should be inserted. |
fontFamily | java.lang.String | Font family. |
fontSize | float | Font size. |
fontStyle | XpsFontStyle | Font style. |
originX | float | Glyphs origin X coordinate. |
originY | float | Glyphs origin T coordinate. |
unicodeString | java.lang.String | String to be printed. |
Returns: XpsGlyphs - Added glyphs.
getEdgeMode()
public XpsEdgeMode getEdgeMode()
Returns the value that controls how edges of paths within the canvas are rendered.
Returns: XpsEdgeMode - The edge rendering mode.
setEdgeMode(XpsEdgeMode value)
public void setEdgeMode(XpsEdgeMode value)
Sets the value that controls how edges of paths within the canvas are rendered.
Parameters:
Parameter | Type | Description |
---|---|---|
value | XpsEdgeMode | The edge rendering mode. |
deepClone()
public XpsCanvas deepClone()
Clones this canvas.
Returns: XpsCanvas - Clone of this canvas.