Matrix::Shear Method (Single, Single, MatrixOrder)

 

Applies the specified shear vector to this Matrix in the specified order.

Namespace:   System.Drawing.Drawing2D
Assembly:  System.Drawing (in System.Drawing.dll)

public:
void Shear(
	float shearX,
	float shearY,
	MatrixOrder order
)

Parameters

shearX
Type: System::Single

The horizontal shear factor.

shearY
Type: System::Single

The vertical shear factor.

order
Type: System.Drawing.Drawing2D::MatrixOrder

A MatrixOrder that specifies the order (append or prepend) in which the shear is applied.

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. Caution is in order when both parameters are nonzero, because the results are hard to predict. For example, if both factors are 1, the transformation is singular (hence noninvertible), squeezing the entire plane to a single line.

For an example, see Shear(Single, Single).

.NET Framework
Available since 1.1
Return to top
Show: