Bagikan melalui


Stroke.Shear Method

Shears the Stroke object by the specified horizontal and vertical factors.

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

Syntax

'Declaration
Public Sub Shear ( _
    shearX As Single, _
    shearY As Single _
)
'Usage
Dim instance As Stroke 
Dim shearX As Single 
Dim shearY As Single

instance.Shear(shearX, shearY)
public void Shear(
    float shearX,
    float shearY
)
public:
void Shear(
    float shearX, 
    float shearY
)
public function Shear(
    shearX : float, 
    shearY : float
)

Parameters

Remarks

The transformation applied in this method is a pure shear only if one of the parameters is 0. Applied to a rectangle at the origin, when the shearY factor is 0, the transformation moves the bottom edge horizontally by shearX times the height of the rectangle. When the shearX factor is 0, it moves the right edge vertically by shearY times the width of the rectangle.

Note

When both parameters are nonzero, the results may not be intuitive.

This method throws an exception if the shear is non-invertible. The shear is non-invertible if the product of the shearX and shearY parameters equals 1.

Examples

In this example, each selected Stroke object of an InkOverlay is modified by applying a horizontal shear of 0.5.

For Each S As Stroke In mInkOverlay.Selection
    S.Shear(0.5F, 0)
Next
foreach (Stroke S in mInkOverlay.Selection)
{
    S.Shear(0.5f, 0);
}

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

Strokes.Shear