Class XpsCanvas

Class XpsCanvas

Namespace: Aspose.Page.XPS.XpsModel
Assembly: Aspose.Page.dll (25.3.0)

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.

public sealed class XpsCanvas : XpsContentElement, IEnumerable<xpscontentelement>, IEnumerable

Inheritance

objectXpsObjectXpsElementXpsHyperlinkElementXpsContentElementXpsCanvas

Implements

IEnumerable<xpscontentelement>, IEnumerable

Inherited Members

XpsContentElement.RenderTransform, XpsContentElement.Clip, XpsContentElement.Opacity, XpsContentElement.OpacityMask, XpsHyperlinkElement.HyperlinkTarget, XpsElement.GetEnumerator(), XpsElement.this[int], XpsElement.Count, object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Properties

EdgeMode

Returns/sets the value that controls how edges of paths within the canvas are rendered.

public XpsEdgeMode EdgeMode { get; set; }

Property Value

XpsEdgeMode

Methods

Add<t>(T)

Adds an element to this canvas’s child list.

public T Add<t>(T element) where T : XpsContentElement

Parameters

element T

The element to be added.

Returns

T

Added element.

Type Parameters

T

The type of the element to add.

AddCanvas()

Adds a new canvas to this canvas’s child list.

public XpsCanvas AddCanvas()

Returns

XpsCanvas

Added canvas.

AddGlyphs(string, float, FontStyle, float, float, string)

Adds new glyphs to this canvas’s child list.

public XpsGlyphs AddGlyphs(string fontFamily, float fontSize, FontStyle fontStyle, float originX, float originY, string unicodeString)

Parameters

fontFamily string

Font family.

fontSize float

Font size.

fontStyle FontStyle

Font style.

originX float

Glyphs origin X coordinate.

originY float

Glyphs origin T coordinate.

unicodeString string

String to be printed.

Returns

XpsGlyphs

Added glyphs.

AddPath(XpsPathGeometry)

Adds a new path to this canvas’s child list.

public XpsPath AddPath(XpsPathGeometry data)

Parameters

data XpsPathGeometry

The geometry of the path.

Returns

XpsPath

Added path.

Clone()

Clones this canvas.

public XpsCanvas Clone()

Returns

XpsCanvas

Clone of this canvas.

Insert<t>(int, T)

Inserts an element to this canvas’s child list at index position.

public T Insert<t>(int index, T element) where T : XpsContentElement

Parameters

index int

Position at which an element should be inserted.

element T

The element to be inserted.

Returns

T

Inserted element.

Type Parameters

T

The type of the element to add.

InsertCanvas(int)

Inserts a new canvas to this canvas’s child list at index position.

public XpsCanvas InsertCanvas(int index)

Parameters

index int

Position at which a new canvas should be inserted.

Returns

XpsCanvas

Inserted canvas.

InsertGlyphs(int, string, float, FontStyle, float, float, string)

Inserts new glyphs to this canvas’s child list at index position.

public XpsGlyphs InsertGlyphs(int index, string fontFamily, float fontSize, FontStyle fontStyle, float originX, float originY, string unicodeString)

Parameters

index int

Position at which new glyphs should be inserted.

fontFamily string

Font family.

fontSize float

Font size.

fontStyle FontStyle

Font style.

originX float

Glyphs origin X coordinate.

originY float

Glyphs origin T coordinate.

unicodeString string

String to be printed.

Returns

XpsGlyphs

Added glyphs.

InsertPath(int, XpsPathGeometry)

Inserts a new path to this canvas’s child list at index position.

public XpsPath InsertPath(int index, XpsPathGeometry data)

Parameters

index int

Position at which a new path should be inserted.

data XpsPathGeometry

The geometry of the path.

Returns

XpsPath

Inserted path. </t></t></xpscontentelement>

 English