API Documentation > CorelDRAW > 2025-v26 > Shape > IVGShape
Shape.SetMatrix method
Applies new values to a shape that has undergone a transformation
Syntax:
Sub SetMatrix(ByVal d11 As Double, ByVal d12 As Double, ByVal d21 As Double, ByVal d22 As Double, ByVal tx As Double, ByVal ty As Double)
Parameters:
Name Type Description
d11
Double
d12
Double
d21
Double
d22
Double
tx
Double
ty
Double
Remarks:
The SetMatrix method sets the values for the transformation matrix of a shape. A transformation matrix is four numbers that include two transformations and two translations (or movements). Each matrix element is referred to as d11, d12, d21, and d22 respectively, left to right and top to bottom.
Examples:
The following VBA example stretches each object along its x-axis by 200%. When applied to rotated objects, it causes the stretch along the rotated axes; for example, a rotated text object is stretched along its baseline without skewing it.
Sub Test()
Dim d11 As Double, d12 As Double, d21 As Double, d22 As Double
Dim tx As Double, ty As Double, s As Shape
For Each s In ActivePage.Shapes
  s.GetMatrix d11, d12, d21, d22, tx, ty
  s.SetMatrix d11 * 2, d12, d21 * 2, d22, tx, ty
Next s 
End Sub