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

# init(cgPoint:)

Create a Core Image vector object that is initialized 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 autoreleased 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

### Creating a Vector

- [init(cgAffineTransform:)](coreimage/civector/init(cgaffinetransform:)-59e4k.md)
- [init(cgRect:)](coreimage/civector/init(cgrect:)-3undj.md)
