---
title: "init(cgPoint:)"
framework: coreimage
role: symbol
role_heading: Initializer
path: "coreimage/civector/init(cgpoint:)-8cf9j"
---

# init(cgPoint:)

Initialize a Core Image vector object with two values provided by a CGPoint structure.

## Declaration

```swift
convenience init(cgPoint p: CGPoint)
```

## Parameters

- `p`: The CGPoint structure.

## Return Value

Return Value  An initialized CIVector object of length 2.

## Discussion

Discussion The CGRect structure’s y and y values are stored in the vector’s two values.

## See Also

### Initializing a Vector

- [init(values:count:)](coreimage/civector/init(values:count:).md)
- [init(x:)](coreimage/civector/init(x:).md)
- [init(x:y:)](coreimage/civector/init(x:y:)-4grr.md)
- [init(x:y:z:)](coreimage/civector/init(x:y:z:)-zais.md)
- [init(x:y:z:w:)](coreimage/civector/init(x:y:z:w:)-75emo.md)
- [init(string:)](coreimage/civector/init(string:).md)
- [init(cgAffineTransform:)](coreimage/civector/init(cgaffinetransform:)-6o8gl.md)
- [init(cgRect:)](coreimage/civector/init(cgrect:)-6bolw.md)
