Strokes.Shear Method
Strokes.Shear Method |
Shears the Strokes collection by the specified horizontal and vertical factors.
Definition
Visual Basic .NET Public Sub Shear( _
ByVal shearX As Single, _
ByVal shearY As Single _
)C# public void Shear(
float shearX,
float shearY
);Managed C++ public: void Shear(
float *shearX,
float *shearY
);
Parameters
shearX System.Single. The horizontal factor of the shear. shearY System.Single. The vertical factor of the shear.
Exceptions
ObjectDisposedException : The Strokes collection is disposed.
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 is0
, the transformation moves the bottom edge horizontally by shearX times the height of the rectangle. When the shearX factor is0
, 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
[C#]
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);
[VB.NET]
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)
See Also