Function

CGAffineTransformFromString

Returns a Core Graphics affine transform structure corresponding to the data in a given string.

Declaration

CGAffineTransform CGAffineTransformFromString(NSString *string);

Parameters

string

A string whose contents are of the form “{a, b, c, d, tx, ty}”, where a, b, c, d, tx, and ty are the floating-point component values of the CGAffineTransform data structure. An example of a valid string is @”{1,0,0,1,2.5,3.0}”. The string is not localized, so items are always separated with a comma. For information about the position of each value in the transform array, see CGAffineTransform.

Return Value

A Core Graphics affine transform structure. If the string is not well-formed, the function returns the identity transform.

Discussion

In general, you should use this function only to convert strings that were previously created using the NSStringFromCGAffineTransform function.

See Also

Primitive Type Conversions

CGPointFromString

Returns a Core Graphics point structure corresponding to the data in a given string.

CGRectFromString

Returns a Core Graphics rectangle structure corresponding to the data in a given string.

CGSizeFromString

Returns a Core Graphics size structure corresponding to the data in a given string.

CGVectorFromString

Returns a Core Graphics vector corresponding to the data in a given string.

NSStringFromCGAffineTransform

Returns a string formatted to contain the data from an affine transform.

NSStringFromCGPoint

Returns a string formatted to contain the data from a point.

NSStringFromCGRect

Returns a string formatted to contain the data from a rectangle.

NSStringFromCGSize

Returns a string formatted to contain the data from a size data structure.

NSStringFromCGVector

Returns a string formatted to contain the data from a vector data structure.