Point2D
class Point2D : NSObject
Represents pixel coordinates on image. Top left corner of an image has (x: 0, y: 0) coordinate.
This coordinate system is used to represent the position of an object relative to the frame.
The origin is the left top corner of the frame. The position of an object is expressed as x, y
.
-
Horizontal distance in pixels from the origin to the object
Declaration
Swift
var x: Int { get }
-
Vertical distance in pixels from the origin to the object
Declaration
Swift
var y: Int { get }
-
CGPoint
representation of pixel coordinatesDeclaration
Swift
var cgPoint: CGPoint { get }
-
Declaration
Swift
init(x: Int, y: Int)