Interface ITransformContext
Provides methods for manipulating the current transformation matrix of the drawing context. This includes translation, scaling, rotation, and applying affine transformations. Mirrors the transformation API of the HTML5 Canvas 2D context.
public interface ITransformContext
Methods
Rotate(NFloat)
Applies a clockwise rotation to the current transform.
void Rotate(NFloat angle)
Parameters
angle
NFloatThe rotation angle in radians.
Scale(Vector)
Applies a scaling transformation using the specified scaling factors.
void Scale(Vector vector)
Parameters
vector
VectorThe scaling vector (sx, sy).
SetTransform(AffineTransform)
Resets the current transformation matrix to the identity matrix,
then replaces it with the specified transform.
Equivalent to ctx.setTransform(...)
in HTML5 Canvas.
void SetTransform(AffineTransform transform)
Parameters
transform
AffineTransformThe new transformation matrix to apply.
Transform(AffineTransform)
Multiplies the current transformation matrix by the specified matrix. This is equivalent to applying an additional transformation on top of the existing one.
void Transform(AffineTransform matrix)
Parameters
matrix
AffineTransformThe matrix to multiply with the current transform.
Translate(Vector)
Applies a translation by the specified vector. This offsets all subsequent drawing operations by the given amount.
void Translate(Vector vector)
Parameters
vector
VectorThe translation vector (dx, dy).