AffineTransform2D

Represents an Affine Transformation that supports only 2D.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
abstract override val inverse: AffineTransform2D?

Inherited properties

Link copied to clipboard

true if this transform is equal to the Identity transform

Link copied to clipboard

Scale component in the x direction

Link copied to clipboard

Scale component in the y direction

Link copied to clipboard

Scale component in the z direction

Link copied to clipboard

Shear component in the x direction

Link copied to clipboard

Shear component in the x direction with z unchanged

Link copied to clipboard

Shear component in the x direction with y unchanged

Link copied to clipboard

Shear component in the y direction

Link copied to clipboard

Shear component in the y direction with z unchanged

Link copied to clipboard

Shear component in the y direction with y unchanged

Link copied to clipboard

Shear component in the z direction with x unchanged

Link copied to clipboard

Shear component in the z direction with y unchanged

Link copied to clipboard

Translation component in the x direction

Link copied to clipboard

Translation component in the y direction

Link copied to clipboard

Translation component in the z direction

Functions

Link copied to clipboard
open override fun flipHorizontally(): AffineTransform2D

Applies a horizontal flip operation (around the y-axis) to this transform.

open override fun flipHorizontally(at: Double): AffineTransform2D

Applies a horizontal flip operation to this transform.

Link copied to clipboard
open override fun flipVertically(): AffineTransform2D

Applies a vertical flip operation (around the x-axis) to this transform.

open override fun flipVertically(at: Double): AffineTransform2D

Applies a vertical flip operation to this transform.

Link copied to clipboard
abstract operator fun invoke(vararg points: Point): List<Point>

Transforms the given points.

Link copied to clipboard
abstract infix override fun rotate(by: Measure<Angle>): AffineTransform2D

Appends a rotation operation (around the z-axis), at the Origin to this transform.

open override fun rotate(around: Point, by: Measure<Angle>): AffineTransform2D

Appends a rotation (around the z-axis) operation to this transform.

Link copied to clipboard
abstract fun scale(x: Double = 1.0, y: Double = 1.0): AffineTransform2D

Append a scale operation (around the Origin) to this transform.

fun scale(around: Point, x: Double = 1.0, y: Double = 1.0): AffineTransform2D

Append a scale operation to this transform, that scales around the given point.

Link copied to clipboard
abstract fun skew(x: Double = 0.0, y: Double = 0.0): AffineTransform2D

Append a skew operation to this transform.

Link copied to clipboard
abstract operator fun times(other: AffineTransform2D): AffineTransform2D

Allows transforms to be combined sequentially.

Link copied to clipboard
open infix override fun translate(by: Point): AffineTransform2D
abstract fun translate(x: Double = 0.0, y: Double = 0.0): AffineTransform2D

Append a translation operation to this transform.

Inherited functions

Link copied to clipboard

Return the angle this transform would apply.

Link copied to clipboard
operator fun invoke(polygon: ConvexPolygon): ConvexPolygon

Transforms the given polygon. Note that the resulting polygon is a 2D projection of the transformed points. That is because this transform may map the 2D points of polygon into a set of 3D points.

abstract operator fun invoke(point: Point): Vector3D
abstract fun invoke(point: Vector3D): Vector3D

Applies the transform to point. This operation treats point as a (3x1 or 4x1) Matrix (based on whether this is a 2D or 3D transform) and uses matrix multiplication to find a new 3x1 matrix to produce the result.

abstract operator fun invoke(vararg points: Vector3D): List<Vector3D>

Transforms the given points.

Link copied to clipboard
@JvmName(name = "callPoint")
inline fun AffineTransform.invoke(points: List<Point>): List<Vector3D>
@JvmName(name = "callPoint")
inline fun AffineTransform2D.invoke(points: List<Point>): List<Point>

Transforms the given points.

Link copied to clipboard

Appends a rotation (around the z-axis) operation to this transform.

Link copied to clipboard
abstract infix fun rotateX(by: Measure<Angle>): AffineTransform

Appends a rotation operation (around the x-axis), at the Origin to this transform.

Appends a rotation (around the x-axis) operation to this transform.

Link copied to clipboard
abstract infix fun rotateY(by: Measure<Angle>): AffineTransform

Appends a rotation (around the y-axis) operation to this transform.

Link copied to clipboard
abstract infix fun rotateZ(by: Measure<Angle>): AffineTransform

Appends a rotation operation (around the z-axis), at the Origin to this transform.

Appends a rotation (around the z-axis) operation to this transform.

Link copied to clipboard
abstract fun scale(x: Double = 1.0, y: Double = 1.0, z: Double = 1.0): AffineTransform

Append a scale operation (around the Origin) to this transform.

fun scale(around: Point, x: Double = 1.0, y: Double = 1.0, z: Double = 1.0): AffineTransform

Append a scale operation to this transform, that scales around the given point.

fun scale(around: Vector3D, x: Double = 1.0, y: Double = 1.0, z: Double = 1.0): AffineTransform
Link copied to clipboard
abstract fun skew(x: Double = 0.0, y: Double = 0.0, z: Double = 0.0): AffineTransform

Append a skew operation to this transform.

Link copied to clipboard
abstract operator fun times(other: AffineTransform): AffineTransform

Allows transforms to be combined sequentially.

Link copied to clipboard
Link copied to clipboard
abstract fun translate(x: Double = 0.0, y: Double = 0.0, z: Double = 0.0): AffineTransform

Append a translation operation to this transform.