Contents

toPoint()

Converts the value to a point structure.

Declaration

func toPoint() -> CGPoint

Return Value

A CoreGraphics point representation of the value.

Discussion

This method treats the value as a JavaScript object, reading the values of its x and y properties using the toDouble() method and creating a CGPoint structure from the result. If the value is not a JavaScript object or does not have the appropriate properties, each of the resulting point’s coordinates is not a number (NaN).

See Also

Reading and Converting JavaScript Values