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

MethodDescription
add(T element)Adds an element to this canvas’s child list.
insert(int index, T element)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:

ParameterTypeDescription
elementTThe 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:

ParameterTypeDescription
indexintPosition at which an element should be inserted.
elementTThe 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:

ParameterTypeDescription
indexintPosition 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:

ParameterTypeDescription
dataXpsPathGeometryThe 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:

ParameterTypeDescription
indexintPosition at which a new path should be inserted.
dataXpsPathGeometryThe 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:

ParameterTypeDescription
fontFamilyjava.lang.StringFont family.
fontSizefloatFont size.
fontStyleXpsFontStyleFont style.
originXfloatGlyphs origin X coordinate.
originYfloatGlyphs origin T coordinate.
unicodeStringjava.lang.StringString 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:

ParameterTypeDescription
indexintPosition at which new glyphs should be inserted.
fontFamilyjava.lang.StringFont family.
fontSizefloatFont size.
fontStyleXpsFontStyleFont style.
originXfloatGlyphs origin X coordinate.
originYfloatGlyphs origin T coordinate.
unicodeStringjava.lang.StringString 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:

ParameterTypeDescription
valueXpsEdgeModeThe edge rendering mode.

deepClone()

public XpsCanvas deepClone()

Clones this canvas.

Returns: XpsCanvas - Clone of this canvas.