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. |
addGlyphs(String fontFamily, float fontSize, XpsFontStyle fontStyle, float originX, float originY, String unicodeString) | Adds new glyphs to this canvas’s child list. |
addPath(XpsPathGeometry data) | Adds a new path to this canvas’s child list. |
deepClone() | Clones this canvas. |
equals(Object arg0) | |
get(int i) | Provides access to element’s children by index i . |
getClass() | |
getClip() | Returns the path geometry limiting the rendered region of the element. |
getEdgeMode() | Returns the value that controls how edges of paths within the canvas are rendered. |
getHyperlinkTarget() | Returns hyperlink target object. |
getOpacity() | Returns the value defining the uniform transparency of the element. |
getOpacityMask() | Returns the brush specifying a mask of alpha values that is applied to the element in the same fashion as the Opacity attribute, but allowing different alpha values for different areas of the element. |
getRenderTransform() | Returns the affine transformation matrix establishing a new coordinate frame for all attributes of the element and for all child elements (if any). |
hashCode() | |
insertCanvas(int index) | Inserts a new canvas to this canvas’s child list at index position. |
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. |
insertPath(int index, XpsPathGeometry data) | Inserts a new path to this canvas’s child list at index position. |
iterator() | Implementation of Iterable interface. |
notify() | |
notifyAll() | |
setClip(XpsPathGeometry value) | Sets the path geometry limiting the rendered region of the element. |
setEdgeMode(XpsEdgeMode value) | Sets the value that controls how edges of paths within the canvas are rendered. |
setHyperlinkTarget(XpsHyperlinkTarget value) | Sets hyperlink target object. |
setOpacity(float value) | Sets the value defining the uniform transparency of the element. |
setOpacityMask(XpsBrush value) | Sets the brush specifying a mask of alpha values that is applied to the element in the same fashion as the Opacity attribute, but allowing different alpha values for different areas of the element. |
setRenderTransform(XpsMatrix value) | Sets the affine transformation matrix establishing a new coordinate frame for all attributes of the element and for all child elements (if any). |
size() | Returns the number of child elements. |
toString() | |
wait() | |
wait(long arg0) | |
wait(long arg0, int arg1) |
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.
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.
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.
deepClone()
public XpsCanvas deepClone()
Clones this canvas.
Returns: XpsCanvas - Clone of this canvas.
equals(Object arg0)
public boolean equals(Object arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | java.lang.Object |
Returns: boolean
get(int i)
public XpsContentElement get(int i)
Provides access to element’s children by index i .
Parameters:
Parameter | Type | Description |
---|---|---|
i | int | Index of child element. |
Returns: XpsContentElement - Child element at i position.
getClass()
public final native Class<?> getClass()
Returns: java.lang.Class
getClip()
public XpsPathGeometry getClip()
Returns the path geometry limiting the rendered region of the element.
Returns: XpsPathGeometry - The path geometry limiting the rendered region of the element.
getEdgeMode()
public XpsEdgeMode getEdgeMode()
Returns the value that controls how edges of paths within the canvas are rendered.
Returns: XpsEdgeMode - The edge rendering mode.
getHyperlinkTarget()
public XpsHyperlinkTarget getHyperlinkTarget()
Returns hyperlink target object.
Returns: XpsHyperlinkTarget - Hyperlink target object.
getOpacity()
public float getOpacity()
Returns the value defining the uniform transparency of the element.
Returns: float - The value defining the uniform transparency of the element.
getOpacityMask()
public XpsBrush getOpacityMask()
Returns the brush specifying a mask of alpha values that is applied to the element in the same fashion as the Opacity attribute, but allowing different alpha values for different areas of the element.
Returns: XpsBrush - The brush specifying a mask.
getRenderTransform()
public XpsMatrix getRenderTransform()
Returns the affine transformation matrix establishing a new coordinate frame for all attributes of the element and for all child elements (if any).
Returns: XpsMatrix - The affine transformation matrix.
hashCode()
public native int hashCode()
Returns: int
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.
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.
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.
iterator()
public Iterator<XpsContentElement> iterator()
Implementation of Iterable interface.
Returns: java.util.Iterator<com.aspose.xps.XpsContentElement> - Returns enumerator for the list.
notify()
public final native void notify()
notifyAll()
public final native void notifyAll()
setClip(XpsPathGeometry value)
public void setClip(XpsPathGeometry value)
Sets the path geometry limiting the rendered region of the element.
Parameters:
Parameter | Type | Description |
---|---|---|
value | XpsPathGeometry | The path geometry limiting the rendered region of the element. |
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. |
setHyperlinkTarget(XpsHyperlinkTarget value)
public void setHyperlinkTarget(XpsHyperlinkTarget value)
Sets hyperlink target object.
Parameters:
Parameter | Type | Description |
---|---|---|
value | XpsHyperlinkTarget | Hyperlink target object. |
setOpacity(float value)
public void setOpacity(float value)
Sets the value defining the uniform transparency of the element.
Parameters:
Parameter | Type | Description |
---|---|---|
value | float | The value defining the uniform transparency of the element. |
setOpacityMask(XpsBrush value)
public void setOpacityMask(XpsBrush value)
Sets the brush specifying a mask of alpha values that is applied to the element in the same fashion as the Opacity attribute, but allowing different alpha values for different areas of the element.
Parameters:
Parameter | Type | Description |
---|---|---|
value | XpsBrush | The brush specifying a mask. |
setRenderTransform(XpsMatrix value)
public void setRenderTransform(XpsMatrix value)
Sets the affine transformation matrix establishing a new coordinate frame for all attributes of the element and for all child elements (if any).
Parameters:
Parameter | Type | Description |
---|---|---|
value | XpsMatrix | The affine transformation matrix. |
size()
public int size()
Returns the number of child elements.
Returns: int - The number of child elements.
toString()
public String toString()
Returns: java.lang.String
wait()
public final void wait()
wait(long arg0)
public final native void wait(long arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long |
wait(long arg0, int arg1)
public final void wait(long arg0, int arg1)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long | |
arg1 | int |