Freigeben über


Strokes.Shear Method

Shears the Strokes collection 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 Strokes
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 void Shear (
    float shearX, 
    float shearY
)
public function Shear (
    shearX : float, 
    shearY : float
)
Not applicable.

Parameters

  • shearX
    The horizontal factor of the shear.
  • shearY
    The vertical factor of the shear.

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.

Example

This C# example applies a horizontal shear of 0.5 to the Strokes collection in the InkCollector, theInkCollector.

theInkCollector.Ink.Strokes.Shear(0.5f, 0);

This Microsoft Visual Basic.NET example applies a horizontal shear of 0.5 to the Strokes collection in the InkCollector, theInkCollector.

theInkCollector.Ink.Strokes.Shear(0.5f, 0)

Platforms

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

Version Information

.NET Framework

Supported in: 3.0

See Also

Reference

Strokes Class
Strokes Members
Microsoft.Ink Namespace
Stroke.Shear