You are here: Start » AVL.NET » Function Reference » Region » Region Spatial Transforms » AVL.ShearRegion

AVL.ShearRegion

Computes a leant region.

Namespace:AvlNet
Assembly:AVL.NET.dll

Syntax

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

Parameters

Name Type Range Default Description
inRegionAvlNet.RegionInput region.
inShearfloat<-INF, INF>The relative shift of each consecutive row or column.
inAxisAvlNet.AxisSwitches between shifting rows or columns.
outRegionAvlNet.RegionOutput 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