Search Results for

    Show / Hide Table of Contents

    Class AffineTransformation

    Represents an affine transformation on the 2D Cartesian plane.

    Inheritance
    object
    AffineTransformation
    Implements
    ICloneable
    ICoordinateSequenceFilter
    IEquatable<AffineTransformation>
    Inherited Members
    object.Equals(object, object)
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: NetTopologySuite.Geometries.Utilities
    Assembly: NetTopologySuite.dll
    Syntax
    public class AffineTransformation : ICloneable, ICoordinateSequenceFilter, IEquatable<AffineTransformation>
    Remarks

    It can be used to transform a Coordinate or Geometry. An affine transformation is a mapping of the 2D plane into itself via a series of transformations of the following basic types:

    • reflection (through a line)
    • rotation (around the origin)
    • scaling (relative to the origin)
    • shearing (in both the X and Y directions)
    • translation

    In general, affine transformations preserve straightness and parallel lines, but do not preserve distance or shape.

    An affine transformation can be represented by a 3x3 matrix in the following form:

    T = | m00 m01 m02 |
                    | m10 m11 m12 |
                    |  0   0   1  |
    A coordinate P = (x, y) can be transformed to a new coordinate P' = (x', y') by representing it as a 3x1 matrix and using matrix multiplication to compute:
    | x' |  = T x | x |
                | y' |        | y |
                | 1  |        | 1 |

    Transformation Composition

    Affine transformations can be composed using the Compose(AffineTransformation) method. Composition is computed via multiplication of the transformation matrices, and is defined as:

    A.compose(B) = TB x TA
    

    This produces a transformation whose effect is that of A followed by B. The methods Reflect(double, double, double, double), Rotate(double), Scale(double, double), Shear(double, double), and Translate(double, double) have the effect of composing a transformation of that type with the transformation they are invoked on. The composition of transformations is in general not commutative.

    Transformation Inversion

    Affine transformations may be invertible or non-invertible. If a transformation is invertible, then there exists an inverse transformation which when composed produces the identity transformation. The GetInverse() method computes the inverse of a transformation, if one exists.

    @author Martin Davis

    Constructors

    | Edit this page View Source

    AffineTransformation()

    Constructs a new identity transformation

    Declaration
    public AffineTransformation()
    | Edit this page View Source

    AffineTransformation(Coordinate, Coordinate, Coordinate, Coordinate, Coordinate, Coordinate)

    Constructs a transformation which maps the given source points into the given destination points.

    Declaration
    public AffineTransformation(Coordinate src0, Coordinate src1, Coordinate src2, Coordinate dest0, Coordinate dest1, Coordinate dest2)
    Parameters
    Type Name Description
    Coordinate src0

    source point 0

    Coordinate src1

    source point 1

    Coordinate src2

    source point 2

    Coordinate dest0

    the mapped point for source point 0

    Coordinate dest1

    the mapped point for source point 1

    Coordinate dest2

    the mapped point for source point 2

    | Edit this page View Source

    AffineTransformation(AffineTransformation)

    Constructs a transformation which is a copy of the given one.

    Declaration
    public AffineTransformation(AffineTransformation trans)
    Parameters
    Type Name Description
    AffineTransformation trans

    the transformation to copy

    | Edit this page View Source

    AffineTransformation(double, double, double, double, double, double)

    Constructs a new transformation whose matrix has the specified values.

    Declaration
    public AffineTransformation(double m00, double m01, double m02, double m10, double m11, double m12)
    Parameters
    Type Name Description
    double m00

    the entry for the [0, 0] element in the transformation matrix

    double m01

    the entry for the [0, 1] element in the transformation matrix

    double m02

    the entry for the [0, 2] element in the transformation matrix

    double m10

    the entry for the [1, 0] element in the transformation matrix

    double m11

    the entry for the [1, 1] element in the transformation matrix

    double m12

    the entry for the [1, 2] element in the transformation matrix

    | Edit this page View Source

    AffineTransformation(double[])

    Constructs a new transformation whose matrix has the specified values.

    Declaration
    public AffineTransformation(double[] matrix)
    Parameters
    Type Name Description
    double[] matrix

    an array containing the 6 values { m00, m01, m02, m10, m11, m12 }

    Exceptions
    Type Condition
    NullReferenceException

    if matrix is null

    IndexOutOfRangeException

    if matrix is too small

    Properties

    | Edit this page View Source

    Determinant

    Computes the determinant of the transformation matrix.

    Declaration
    public double Determinant { get; }
    Property Value
    Type Description
    double

    the determinant of the transformation

    Remarks

    The determinant is computed as:

    | m00 m01 m02 |
                | m10 m11 m12 | = m00 * m11 - m01 * m10
                |  0   0   1  |

    If the determinant is zero, the transform is singular (not invertible), and operations which attempt to compute an inverse will throw a NoninvertibleTransformationException.

    | Edit this page View Source

    Done

    Reports that this filter should continue to be executed until all coordinates have been transformed.

    Declaration
    public bool Done { get; }
    Property Value
    Type Description
    bool

    false

    | Edit this page View Source

    GeometryChanged

    Reports whether the execution of this filter has modified the coordinates of the geometry. If so, GeometryChanged() will be executed after this filter has finished being executed.

    Declaration
    public bool GeometryChanged { get; }
    Property Value
    Type Description
    bool
    Remarks

    Most filters can simply return a constant value reflecting whether they are able to change the coordinates.

    | Edit this page View Source

    IsIdentity

    Tests if this transformation is the identity transformation.

    Declaration
    public bool IsIdentity { get; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    MatrixEntries

    Gets an array containing the entries of the transformation matrix.

    Declaration
    public double[] MatrixEntries { get; }
    Property Value
    Type Description
    double[]

    an array of length 6

    Remarks

    Only the 6 non-trivial entries are returned, in the sequence:

    m00, m01, m02, m10, m11, m12
    

    Methods

    | Edit this page View Source

    Clone()

    Clones this transformation

    Declaration
    public object Clone()
    Returns
    Type Description
    object

    A copy of this transformation

    | Edit this page View Source

    Compose(AffineTransformation)

    Updates this transformation to be the composition of this transformation with the given AffineTransformation.

    Declaration
    public AffineTransformation Compose(AffineTransformation trans)
    Parameters
    Type Name Description
    AffineTransformation trans

    an affine transformation

    Returns
    Type Description
    AffineTransformation

    this transformation, with an updated matrix

    Remarks

    This produces a transformation whose effect is equal to applying this transformation followed by the argument transformation. Mathematically,

    A.compose(B) = TB x TA
    
    | Edit this page View Source

    ComposeBefore(AffineTransformation)

    Updates this transformation to be the composition of a given AffineTransformation with this transformation.

    Declaration
    public AffineTransformation ComposeBefore(AffineTransformation trans)
    Parameters
    Type Name Description
    AffineTransformation trans

    an affine transformation

    Returns
    Type Description
    AffineTransformation

    this transformation, with an updated matrix

    Remarks

    This produces a transformation whose effect is equal to applying the argument transformation followed by this transformation. Mathematically,

    A.composeBefore(B) = TA x TB
    
    | Edit this page View Source

    Equals(AffineTransformation)

    Declaration
    public bool Equals(AffineTransformation trans)
    Parameters
    Type Name Description
    AffineTransformation trans
    Returns
    Type Description
    bool
    | Edit this page View Source

    Equals(object)

    Tests if an object is an AffineTransformation and has the same matrix as this transformation.

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    object obj

    An object to test

    Returns
    Type Description
    bool

    true if the given object is equal to this object

    Overrides
    object.Equals(object)
    | Edit this page View Source

    Filter(CoordinateSequence, int)

    Transforms the i'th coordinate in the input sequence

    Declaration
    public void Filter(CoordinateSequence seq, int i)
    Parameters
    Type Name Description
    CoordinateSequence seq

    A CoordinateSequence

    int i

    The index of the coordinate to transform

    | Edit this page View Source

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int
    Overrides
    object.GetHashCode()
    | Edit this page View Source

    GetInverse()

    Computes the inverse of this transformation, if one exists.

    Declaration
    public AffineTransformation GetInverse()
    Returns
    Type Description
    AffineTransformation

    A new inverse transformation

    Remarks

    The inverse is the transformation which when composed with this one produces the identity transformation. A transformation has an inverse if and only if it is not singular (i.e. its determinant is non-zero). Geometrically, an transformation is non-invertible if it maps the plane to a line or a point. If no inverse exists this method will throw a NoninvertibleTransformationException.

    The matrix of the inverse is equal to the inverse of the matrix for the transformation. It is computed as follows:

                    1
                inverse(A)  =  ---   x  adjoint(A)
                               det
    
                        =   1       |  m11  -m01   m01*m12-m02*m11  |
                           ---   x  | -m10   m00  -m00*m12+m10*m02  |
                           det      |  0     0     m00*m11-m10*m01  |
    
    
    
                        = |  m11/det  -m01/det   m01*m12-m02*m11/det |
                          | -m10/det   m00/det  -m00*m12+m10*m02/det |
                          |   0           0          1               |</code></pre></blockquote>
    
    Exceptions
    Type Condition
    NoninvertibleTransformationException
    | Edit this page View Source

    Reflect(double, double)

    Updates the value of this transformation to that of a reflection transformation composed with the current value.

    Declaration
    public AffineTransformation Reflect(double x, double y)
    Parameters
    Type Name Description
    double x

    the x-ordinate of the line to reflect around

    double y

    the y-ordinate of the line to reflect around

    Returns
    Type Description
    AffineTransformation

    this transformation, with an updated matrix

    | Edit this page View Source

    Reflect(double, double, double, double)

    Updates the value of this transformation to that of a reflection transformation composed with the current value.

    Declaration
    public AffineTransformation Reflect(double x0, double y0, double x1, double y1)
    Parameters
    Type Name Description
    double x0

    the x-ordinate of a point on the line to reflect around

    double y0

    the y-ordinate of a point on the line to reflect around

    double x1

    the x-ordinate of a point on the line to reflect around

    double y1

    the y-ordinate of a point on the line to reflect around

    Returns
    Type Description
    AffineTransformation

    this transformation, with an updated matrix

    | Edit this page View Source

    ReflectionInstance(double, double)

    Creates a transformation for a reflection about the line (0,0) - (x,y).

    Declaration
    public static AffineTransformation ReflectionInstance(double x, double y)
    Parameters
    Type Name Description
    double x

    the x-ordinate of a point on the reflection line

    double y

    the y-ordinate of a point on the reflection line

    Returns
    Type Description
    AffineTransformation

    a transformation for the reflection

    | Edit this page View Source

    ReflectionInstance(double, double, double, double)

    Creates a transformation for a reflection about the line (x0,y0) - (x1,y1).

    Declaration
    public static AffineTransformation ReflectionInstance(double x0, double y0, double x1, double y1)
    Parameters
    Type Name Description
    double x0

    the x-ordinate of a point on the reflection line

    double y0

    the y-ordinate of a point on the reflection line

    double x1

    the x-ordinate of a another point on the reflection line

    double y1

    the y-ordinate of a another point on the reflection line

    Returns
    Type Description
    AffineTransformation

    a transformation for the reflection

    | Edit this page View Source

    Rotate(double)

    Updates the value of this transformation to that of a rotation transformation composed with the current value.

    Declaration
    public AffineTransformation Rotate(double theta)
    Parameters
    Type Name Description
    double theta

    the angle to rotate by in radians

    Returns
    Type Description
    AffineTransformation

    this transformation, with an updated matrix

    Remarks

    Positive angles correspond to a rotation in the counter-clockwise direction.

    | Edit this page View Source

    Rotate(double, double)

    Updates the value of this transformation to that of a rotation around the origin composed with the current value, with the sin and cos of the rotation angle specified directly.

    Declaration
    public AffineTransformation Rotate(double sinTheta, double cosTheta)
    Parameters
    Type Name Description
    double sinTheta

    the sine of the angle to rotate by

    double cosTheta

    the cosine of the angle to rotate by

    Returns
    Type Description
    AffineTransformation

    this transformation, with an updated matrix

    | Edit this page View Source

    Rotate(double, double, double)

    Updates the value of this transformation to that of a rotation around a given point composed with the current value.

    Declaration
    public AffineTransformation Rotate(double theta, double x, double y)
    Parameters
    Type Name Description
    double theta

    the angle to rotate by, in radians

    double x

    the x-ordinate of the rotation point

    double y

    the y-ordinate of the rotation point

    Returns
    Type Description
    AffineTransformation

    this transformation, with an updated matrix

    Remarks

    Positive angles correspond to a rotation in the counter-clockwise direction.

    | Edit this page View Source

    Rotate(double, double, double, double)

    Updates the value of this transformation to that of a rotation around a given point composed with the current value, with the sin and cos of the rotation angle specified directly.

    Declaration
    public AffineTransformation Rotate(double sinTheta, double cosTheta, double x, double y)
    Parameters
    Type Name Description
    double sinTheta

    the sine of the angle to rotate by

    double cosTheta

    the cosine of the angle to rotate by

    double x

    the x-ordinate of the rotation point

    double y

    the y-ordinate of the rotation point

    Returns
    Type Description
    AffineTransformation

    this transformation, with an updated matrix

    | Edit this page View Source

    RotationInstance(double)

    Creates a transformation for a rotation about the origin by an angle theta.

    Declaration
    public static AffineTransformation RotationInstance(double theta)
    Parameters
    Type Name Description
    double theta

    the rotation angle, in radians

    Returns
    Type Description
    AffineTransformation

    a transformation for the rotation

    Remarks

    Positive angles correspond to a rotation in the counter-clockwise direction.

    | Edit this page View Source

    RotationInstance(double, double)

    Creates a transformation for a rotation by an angle theta, specified by the sine and cosine of the angle.

    Declaration
    public static AffineTransformation RotationInstance(double sinTheta, double cosTheta)
    Parameters
    Type Name Description
    double sinTheta

    the sine of the rotation angle

    double cosTheta

    the cosine of the rotation angle

    Returns
    Type Description
    AffineTransformation

    a transformation for the rotation

    Remarks

    This allows providing exact values for sin(theta) and cos(theta) for the common case of rotations of multiples of quarter-circles.

    | Edit this page View Source

    RotationInstance(double, double, double)

    Creates a transformation for a rotation about the point (x,y) by an angle theta.

    Declaration
    public static AffineTransformation RotationInstance(double theta, double x, double y)
    Parameters
    Type Name Description
    double theta

    the rotation angle, in radians

    double x

    the x-ordinate of the rotation point

    double y

    the y-ordinate of the rotation point

    Returns
    Type Description
    AffineTransformation

    a transformation for the rotation

    Remarks

    Positive angles correspond to a rotation in the counter-clockwise direction.

    | Edit this page View Source

    RotationInstance(double, double, double, double)

    Creates a transformation for a rotation about the point (x,y) by an angle theta, specified by the sine and cosine of the angle.

    Declaration
    public static AffineTransformation RotationInstance(double sinTheta, double cosTheta, double x, double y)
    Parameters
    Type Name Description
    double sinTheta

    the sine of the rotation angle

    double cosTheta

    the cosine of the rotation angle

    double x

    the x-ordinate of the rotation point

    double y

    the y-ordinate of the rotation point

    Returns
    Type Description
    AffineTransformation

    a transformation for the rotation

    Remarks

    This allows providing exact values for sin(theta) and cos(theta) for the common case of rotations of multiples of quarter-circles.

    | Edit this page View Source

    Scale(double, double)

    Updates the value of this transformation to that of a scale transformation composed with the current value.

    Declaration
    public AffineTransformation Scale(double xScale, double yScale)
    Parameters
    Type Name Description
    double xScale

    the value to scale by in the x direction

    double yScale

    the value to scale by in the y direction

    Returns
    Type Description
    AffineTransformation

    this transformation, with an updated matrix

    | Edit this page View Source

    ScaleInstance(double, double)

    Creates a transformation for a scaling relative to the origin.

    Declaration
    public static AffineTransformation ScaleInstance(double xScale, double yScale)
    Parameters
    Type Name Description
    double xScale

    the value to scale by in the x direction

    double yScale

    the value to scale by in the y direction

    Returns
    Type Description
    AffineTransformation

    a transformation for the scaling

    | Edit this page View Source

    ScaleInstance(double, double, double, double)

    Creates a transformation for a scaling relative to the point (x,y).

    Declaration
    public static AffineTransformation ScaleInstance(double xScale, double yScale, double x, double y)
    Parameters
    Type Name Description
    double xScale

    The value to scale by in the x direction

    double yScale

    The value to scale by in the y direction

    double x

    The x-ordinate of the point to scale around

    double y

    The y-ordinate of the point to scale around

    Returns
    Type Description
    AffineTransformation

    A transformation for the scaling

    | Edit this page View Source

    SetToIdentity()

    Sets this transformation to be the identity transformation.

    Declaration
    public AffineTransformation SetToIdentity()
    Returns
    Type Description
    AffineTransformation

    this transformation, with an updated matrix

    Remarks

    The identity transformation has the matrix:

    | 1 0 0 |
                | 0 1 0 |
                | 0 0 1 |
    | Edit this page View Source

    SetToReflection(double, double)

    Sets this transformation to be a reflection about the line defined by vector (x,y).

    Declaration
    public AffineTransformation SetToReflection(double x, double y)
    Parameters
    Type Name Description
    double x

    the x-component of the reflection line vector

    double y

    the y-component of the reflection line vector

    Returns
    Type Description
    AffineTransformation

    this transformation, with an updated matrix

    Remarks

    The transformation for a reflection is computed by:

    d = sqrt(x2 + y2)
                sin = x / d;
                cos = x / d;
                Tref = Trot(sin, cos) x Tscale(1, -1) x Trot(-sin, cos)
    | Edit this page View Source

    SetToReflection(double, double, double, double)

    Sets this transformation to be a reflection about the line defined by a line (x0,y0) - (x1,y1).

    Declaration
    public AffineTransformation SetToReflection(double x0, double y0, double x1, double y1)
    Parameters
    Type Name Description
    double x0

    The x-ordinate of one point on the reflection line

    double y0

    The y-ordinate of one point on the reflection line

    double x1

    The x-ordinate of another point on the reflection line

    double y1

    The y-ordinate of another point on the reflection line

    Returns
    Type Description
    AffineTransformation

    This transformation with an updated matrix

    | Edit this page View Source

    SetToReflectionBasic(double, double, double, double)

    Explicitly computes the math for a reflection. May not work.

    Declaration
    public AffineTransformation SetToReflectionBasic(double x0, double y0, double x1, double y1)
    Parameters
    Type Name Description
    double x0

    The x-ordinate of one point on the reflection line

    double y0

    The y-ordinate of one point on the reflection line

    double x1

    The x-ordinate of another point on the reflection line

    double y1

    The y-ordinate of another point on the reflection line

    Returns
    Type Description
    AffineTransformation

    This transformation with an updated matrix

    | Edit this page View Source

    SetToRotation(double)

    Sets this transformation to be a rotation around the orign.

    Declaration
    public AffineTransformation SetToRotation(double theta)
    Parameters
    Type Name Description
    double theta

    the rotation angle, in radians

    Returns
    Type Description
    AffineTransformation

    this transformation, with an updated matrix

    Remarks

    A positive rotation angle corresponds to a counter-clockwise rotation. The transformation matrix for a rotation by an angle theta has the value:

    |  cos(theta)  -sin(theta)   0 |
    |  sin(theta)   cos(theta)   0 |
    |           0            0   1 |
    
    | Edit this page View Source

    SetToRotation(double, double)

    Sets this transformation to be a rotation around the origin by specifying the sin and cos of the rotation angle directly.

    Declaration
    public AffineTransformation SetToRotation(double sinTheta, double cosTheta)
    Parameters
    Type Name Description
    double sinTheta

    the sine of the rotation angle

    double cosTheta

    the cosine of the rotation angle

    Returns
    Type Description
    AffineTransformation

    this transformation, with an updated matrix

    Remarks

    The transformation matrix for the rotation has the value:

    |  cosTheta  -sinTheta   0 |
    |  sinTheta   cosTheta   0 |
    |         0          0   1 |
    
    | Edit this page View Source

    SetToRotation(double, double, double)

    Sets this transformation to be a rotation around a given point (x,y).

    Declaration
    public AffineTransformation SetToRotation(double theta, double x, double y)
    Parameters
    Type Name Description
    double theta

    the rotation angle, in radians

    double x

    the x-ordinate of the rotation point

    double y

    the y-ordinate of the rotation point

    Returns
    Type Description
    AffineTransformation

    this transformation, with an updated matrix

    Remarks

    A positive rotation angle corresponds to a counter-clockwise rotation. The transformation matrix for a rotation by an angle theta has the value:

    |  cosTheta  -sinTheta   x-x*cos+y*sin |
    |  sinTheta   cosTheta   y-x*sin-y*cos |
    |           0            0   1 |
    
    | Edit this page View Source

    SetToRotation(double, double, double, double)

    Sets this transformation to be a rotation around a given point (x,y) by specifying the sin and cos of the rotation angle directly.

    Declaration
    public AffineTransformation SetToRotation(double sinTheta, double cosTheta, double x, double y)
    Parameters
    Type Name Description
    double sinTheta

    the sine of the rotation angle

    double cosTheta

    the cosine of the rotation angle

    double x

    the x-ordinate of the rotation point

    double y

    the y-ordinate of the rotation point

    Returns
    Type Description
    AffineTransformation

    this transformation, with an updated matrix

    Remarks

    The transformation matrix for the rotation has the value:

    |  cosTheta  -sinTheta   x-x*cos+y*sin |
    |  sinTheta   cosTheta   y-x*sin-y*cos |
    |         0          0         1       |
    
    | Edit this page View Source

    SetToScale(double, double)

    Sets this transformation to be a scaling.

    Declaration
    public AffineTransformation SetToScale(double xScale, double yScale)
    Parameters
    Type Name Description
    double xScale

    the amount to scale x-ordinates by

    double yScale

    the amount to scale y-ordinates by

    Returns
    Type Description
    AffineTransformation

    this transformation, with an updated matrix

    Remarks

    The transformation matrix for a scale has the value:

    |  xScale      0  dx |
    |  0      yScale  dy |
    |  0           0   1 |
    
    | Edit this page View Source

    SetToShear(double, double)

    Sets this transformation to be a shear.

    Declaration
    public AffineTransformation SetToShear(double xShear, double yShear)
    Parameters
    Type Name Description
    double xShear

    the x component to shear by

    double yShear

    the y component to shear by

    Returns
    Type Description
    AffineTransformation

    this transformation, with an updated matrix

    Remarks

    The transformation matrix for a shear has the value:

    |  1      xShear  0 |
    |  yShear      1  0 |
    |  0           0  1 |
    
    Note that a shear of (1, 1) is not equal to shear(1, 0) composed with shear(0, 1). Instead, shear(1, 1) corresponds to a mapping onto the line x = y.
    | Edit this page View Source

    SetToTranslation(double, double)

    Sets this transformation to be a translation.

    Declaration
    public AffineTransformation SetToTranslation(double dx, double dy)
    Parameters
    Type Name Description
    double dx

    the x component to translate by

    double dy

    the y component to translate by

    Returns
    Type Description
    AffineTransformation

    this transformation, with an updated matrix

    Remarks

    For a translation by the vector (x, y) the transformation matrix has the value:

    |  1  0  dx |
    |  1  0  dy |
    |  0  0   1 |
    
    | Edit this page View Source

    SetTransformation(AffineTransformation)

    Sets this transformation to be a copy of the given one

    Declaration
    public AffineTransformation SetTransformation(AffineTransformation trans)
    Parameters
    Type Name Description
    AffineTransformation trans

    a transformation to copy

    Returns
    Type Description
    AffineTransformation

    this transformation, with an updated matrix

    | Edit this page View Source

    SetTransformation(double, double, double, double, double, double)

    Sets this transformation's matrix to have the given values.

    Declaration
    public AffineTransformation SetTransformation(double m00, double m01, double m02, double m10, double m11, double m12)
    Parameters
    Type Name Description
    double m00

    the entry for the [0, 0] element in the transformation matrix

    double m01

    the entry for the [0, 1] element in the transformation matrix

    double m02

    the entry for the [0, 2] element in the transformation matrix

    double m10

    the entry for the [1, 0] element in the transformation matrix

    double m11

    the entry for the [1, 1] element in the transformation matrix

    double m12

    the entry for the [1, 2] element in the transformation matrix

    Returns
    Type Description
    AffineTransformation

    this transformation, with an updated matrix

    | Edit this page View Source

    Shear(double, double)

    Updates the value of this transformation to that of a shear transformation composed with the current value.

    Declaration
    public AffineTransformation Shear(double xShear, double yShear)
    Parameters
    Type Name Description
    double xShear

    the value to shear by in the x direction

    double yShear

    the value to shear by in the y direction

    Returns
    Type Description
    AffineTransformation

    this transformation, with an updated matrix

    | Edit this page View Source

    ShearInstance(double, double)

    Creates a transformation for a shear.

    Declaration
    public static AffineTransformation ShearInstance(double xShear, double yShear)
    Parameters
    Type Name Description
    double xShear

    the value to shear by in the x direction

    double yShear

    the value to shear by in the y direction

    Returns
    Type Description
    AffineTransformation

    a transformation for the shear

    | Edit this page View Source

    ToString()

    Gets a text representation of this transformation. The string is of the form:

    AffineTransformation[[m00, m01, m02], [m10, m11, m12]]
    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    A string representing this transformation

    Overrides
    object.ToString()
    | Edit this page View Source

    Transform(Coordinate, Coordinate)

    Applies this transformation to the src coordinate and places the results in the dest coordinate (which may be the same as the source).

    Declaration
    public Coordinate Transform(Coordinate src, Coordinate dest)
    Parameters
    Type Name Description
    Coordinate src

    the coordinate to transform

    Coordinate dest

    the coordinate to accept the results

    Returns
    Type Description
    Coordinate

    the dest coordinate

    | Edit this page View Source

    Transform(CoordinateSequence, int)

    Applies this transformation to the i'th coordinate in the given CoordinateSequence.

    Declaration
    public void Transform(CoordinateSequence seq, int i)
    Parameters
    Type Name Description
    CoordinateSequence seq

    a CoordinateSequence

    int i

    the index of the coordinate to transform

    | Edit this page View Source

    Transform(Geometry)

    Creates a new Geometry which is the result of this transformation applied to the input Geometry.

    Declaration
    public Geometry Transform(Geometry g)
    Parameters
    Type Name Description
    Geometry g

    A Geometry

    Returns
    Type Description
    Geometry

    The transformed Geometry

    | Edit this page View Source

    Translate(double, double)

    Updates the value of this transformation to that of a translation transformation composed with the current value.

    Declaration
    public AffineTransformation Translate(double x, double y)
    Parameters
    Type Name Description
    double x

    the value to translate by in the x direction

    double y

    the value to translate by in the y direction

    Returns
    Type Description
    AffineTransformation

    this transformation, with an updated matrix

    | Edit this page View Source

    TranslationInstance(double, double)

    Creates a transformation for a translation.

    Declaration
    public static AffineTransformation TranslationInstance(double x, double y)
    Parameters
    Type Name Description
    double x

    the value to translate by in the x direction

    double y

    the value to translate by in the y direction

    Returns
    Type Description
    AffineTransformation

    a transformation for the translation

    Implements

    ICloneable
    ICoordinateSequenceFilter
    IEquatable<T>
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX