In This Article

XamlGlyph Class

Defines the glyph built using XAML path data.

public class XamlGlyph : Glyph
Inheritance:
object Glyph object

Remarks

For internal use only.

Constructors

XamlGlyph(Size)

Initializes a new instance of the Glyph class.

public XamlGlyph(Size canvasSize)
Parameter Type Description
canvasSize Size

The size of the canvas where individual paths of the glyph are positioned.

XamlGlyph(Size, XamlPath)

Initializes a new instance of the Glyph class.

public XamlGlyph(Size canvasSize, XamlGlyph.XamlPath path)
Parameter Type Description
canvasSize Size

The size of the canvas where individual paths of the glyph are positioned.

path XamlGlyph.XamlPath

The XAML path data to be included.

XamlGlyph(Size, params XamlPath[])

Initializes a new instance of the Glyph class.

public XamlGlyph(Size canvasSize, params XamlGlyph.XamlPath[] paths)
Parameter Type Description
canvasSize Size

The size of the canvas where individual paths of the glyph are positioned.

paths XamlPath[]

The XAML path data to be included.

XamlGlyph(Size, string)

Initializes a new instance of the Glyph class.

public XamlGlyph(Size canvasSize, string path)
Parameter Type Description
canvasSize Size

The size of the canvas where individual paths of the glyph are positioned.

path string

The XAML path data to be included with the default stroke thickness and color.

Properties

CanvasSize

Gets or sets the size of the canvas where individual paths of the glyph are positioned.

public Size CanvasSize { get; }

Property Value

Size

Paths

Gets the list of paths which are used to render the glyph.

public IList<XamlGlyph.XamlPath> Paths { get; }

Property Value

IList<XamlGlyph.XamlPath>

Methods

DrawCore(Graphics, Point, Color, SizeF)

Performs the core painting of the glyph at the given location.

protected override sealed void DrawCore(Graphics g, Point location, Color color, SizeF scaleFactor)
Parameter Type Description
g Graphics

The Graphics object used to paint.

location Point

The location of the top-left corner of the glyph.

color Color

The color used to paint.

scaleFactor SizeF

The scale factor to apply when painting (e.g. 1.0 for original size and 2.0 for double size).

GetUnscaledSize(SizeF)

Gets the original size of the glyph before scaling to the given scale factor.

protected override sealed Size GetUnscaledSize(SizeF scaleFactor)
Parameter Type Description
scaleFactor SizeF

The scale factor to apply when painting (e.g. 1.0 for original size and 2.0 for double size).

Returns

Size:

The size of the the glyph after it is scaled.

Inherited Members