Share via


InkWordNode.GetMidline Method

Returns the midline line for an InkWordNode object.

Namespace:  Microsoft.Ink
Assembly:  Microsoft.Ink.Analysis (in Microsoft.Ink.Analysis.dll)

Syntax

'Declaration
Public Function GetMidline As Point()
'Usage
Dim instance As InkWordNode 
Dim returnValue As Point()

returnValue = instance.GetMidline()
public Point[] GetMidline()
public:
array<Point>^ GetMidline()
public function GetMidline() : Point[]

Return Value

Type: array<System.Drawing.Point[]
Returns the midline line for an InkWordNode object.

Remarks

The midline line is an imaginary horizontal line with which the top of the main body of each character (excluding ascenders) is aligned. For example, for the printed word "rat," the tops of the "r" and the "a" align with the midline line.

Examples

The following example draws the midline line for an InkWordNode, inkWord, by using a Renderer object, theRenderer, and a Graphics object, panelGraphics, which was created by a Panel.

Dim midlinePoints As Point() = inkWord.GetMidline()
' Convert to pixel coordinates
theRenderer.InkSpaceToPixel(panelGraphics, midlinePoints)
panelGraphics.DrawLines(New Pen(Color.Brown), midlinePoints)
                Point[] midlinePoints = inkWord.GetMidline();
                // Convert to pixel coordinates
                theRenderer.InkSpaceToPixel(panelGraphics, ref midlinePoints);
                panelGraphics.DrawLines(new Pen(Color.Brown), midlinePoints);

Platforms

Windows 7, Windows Vista, Windows Server 2008 R2, Windows Server 2008

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Version Information

.NET Framework

Supported in: 3.0

See Also

Reference

InkWordNode Class

InkWordNode Members

Microsoft.Ink Namespace

GetAscender

GetBaseline

GetDescender