Returns an affine transformation matrix constructed from translation values you provide.
- iOS 2.0+
- macOS 10.0+
- Mac Catalyst 13.0+Beta
- tvOS 9.0+
- watchOS 2.0+
- Core Graphics
The value by which to move the x-axis of the coordinate system.
The value by which to move the y-axis of the coordinate system.
A new affine transform matrix.
This function creates a
CGAffine structure. which you can use (and reuse, if you want) to move a coordinate system. The matrix takes the following form:
Because the third column is always
CGAffine data structure returned by this function contains values for only the first two columns.
These are the resulting equations used to apply the translation to a point (x,y):
If you want only to move the location where an object is drawn, it is not necessary to construct an affine transform to do so. The most direct way to move your drawing is by calling the function