You are here: Start » AVL.NET » AVL.ShearRegion(AvlNet.Region, float, AvlNet.Axis, AvlNet.Region)

AVL.ShearRegion(AvlNet.Region, float, AvlNet.Axis, AvlNet.Region)

Computes a leant region.

Namespace:AvlNet
Assembly:AVL.NET.dll

Syntax


public static void ShearRegion(
	AvlNet.Region inRegion,
	float inShear,
	AvlNet.Axis inAxis,
	out AvlNet.Region outRegion
)

Parameters

inRegion
Type: AvlNet.Region
Input region
inShear
Type: System.Single
The relative shift of each consecutive row or column
inAxis
Type: AvlNet.Axis
Switches between shifting rows or columns
outRegion
Type: AvlNet.Region
Output region

Description

The filter ShearRegion applies basic affine transform to each regions's pixel.

Shear affine transform when X axis is selected:

\[ \left[\begin{array}{ccc} x' \\ y' \end{array} \right] = \left[\begin{array}{ccc} 1 & inShear \\ 0 & 1 \end{array} \right] \left[\begin{array}{ccc} x \\ y \end{array} \right] \]

Shear affine transform when Y axis is selected:

\[ \left[\begin{array}{ccc} x' \\ y' \end{array} \right] = \left[\begin{array}{ccc} 1 & 0\\ inShear & 1 \end{array} \right] \left[\begin{array}{ccc} x \\ y \end{array} \right] \]

See also