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
angleNFloatThe rotation angle in radians.
Scale(Vector)
Applies a scaling transformation using the specified scaling factors.
void Scale(Vector vector)
Parameters
vectorVectorThe 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
transformAffineTransformThe 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
matrixAffineTransformThe 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
vectorVectorThe translation vector (dx, dy).