Share via


Stroke.Move Method

Applies a translation to the ink of the Stroke object.

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

Syntax

'Declaration
Public Sub Move ( _
    offsetX As Single, _
    offsetY As Single _
)
'Usage
Dim instance As Stroke 
Dim offsetX As Single 
Dim offsetY As Single

instance.Move(offsetX, offsetY)
public void Move(
    float offsetX,
    float offsetY
)
public:
void Move(
    float offsetX, 
    float offsetY
)
public function Move(
    offsetX : float, 
    offsetY : float
)

Parameters

  • offsetX
    Type: System.Single

    The distance to translate the view transform in the X dimension, in HIMETRIC units, in ink space coordinates.

  • offsetY
    Type: System.Single

    The distance to translate the view transform in the Y dimension, in HIMETRIC units, in ink space coordinates.

Examples

In this example, the points of each selected Stroke object of an InkOverlay are used to create a new Stroke object. The new Stroke object is then moved by 200 HIMETRIC units in both the X and Y direction.

For Each S As Stroke In mInkOverlay.Selection
    Dim sPts() As Point = S.GetPoints()
    Dim newStroke As Stroke = S.Ink.CreateStroke(sPts)
    newStroke.Move(200, 200)
Next
foreach (Stroke S in mInkOverlay.Selection)
{
    Point[] sPts = S.GetPoints();
    Stroke newStroke = S.Ink.CreateStroke(sPts);
    newStroke.Move(200, 200);
}

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

Stroke Class

Stroke Members

Microsoft.Ink Namespace

Stroke.Transform

Strokes.Move