forked from progrium/darwinkit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontour.gen.go
136 lines (115 loc) · 4.3 KB
/
contour.gen.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
// Code generated by DarwinKit. DO NOT EDIT.
package vision
import (
"unsafe"
"github.com/progrium/macdriver/macos/foundation"
"github.com/progrium/macdriver/objc"
)
// The class instance for the [Contour] class.
var ContourClass = _ContourClass{objc.GetClass("VNContour")}
type _ContourClass struct {
objc.Class
}
// An interface definition for the [Contour] class.
type IContour interface {
objc.IObject
PolygonApproximationWithEpsilonError(epsilon float64, error foundation.IError) Contour
ChildContourAtIndexError(childContourIndex uint, error foundation.IError) Contour
NormalizedPoints() objc.Object
AspectRatio() float64
IndexPath() foundation.IndexPath
ChildContours() []Contour
PointCount() int
NormalizedPath() unsafe.Pointer
ChildContourCount() int
}
// A class that represents a detected contour in an image. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/vision/vncontour?language=objc
type Contour struct {
objc.Object
}
func ContourFrom(ptr unsafe.Pointer) Contour {
return Contour{
Object: objc.ObjectFrom(ptr),
}
}
func (cc _ContourClass) Alloc() Contour {
rv := objc.Call[Contour](cc, objc.Sel("alloc"))
return rv
}
func (cc _ContourClass) New() Contour {
rv := objc.Call[Contour](cc, objc.Sel("new"))
rv.Autorelease()
return rv
}
func NewContour() Contour {
return ContourClass.New()
}
func (c_ Contour) Init() Contour {
rv := objc.Call[Contour](c_, objc.Sel("init"))
return rv
}
// Simplifies the contour to a polygon using a Ramer-Douglas-Peucker algorithm. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/vision/vncontour/3618958-polygonapproximationwithepsilon?language=objc
func (c_ Contour) PolygonApproximationWithEpsilonError(epsilon float64, error foundation.IError) Contour {
rv := objc.Call[Contour](c_, objc.Sel("polygonApproximationWithEpsilon:error:"), epsilon, objc.Ptr(error))
return rv
}
// Retrieves the child contour object at the specified index. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/vision/vncontour/3548321-childcontouratindex?language=objc
func (c_ Contour) ChildContourAtIndexError(childContourIndex uint, error foundation.IError) Contour {
rv := objc.Call[Contour](c_, objc.Sel("childContourAtIndex:error:"), childContourIndex, objc.Ptr(error))
return rv
}
// The contour’s array of points in normalized coordinates. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/vision/vncontour/3548326-normalizedpoints?language=objc
func (c_ Contour) NormalizedPoints() objc.Object {
rv := objc.Call[objc.Object](c_, objc.Sel("normalizedPoints"))
return rv
}
// The aspect ratio of the contour. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/vision/vncontour/3600614-aspectratio?language=objc
func (c_ Contour) AspectRatio() float64 {
rv := objc.Call[float64](c_, objc.Sel("aspectRatio"))
return rv
}
// The contour object’s index path. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/vision/vncontour/3548324-indexpath?language=objc
func (c_ Contour) IndexPath() foundation.IndexPath {
rv := objc.Call[foundation.IndexPath](c_, objc.Sel("indexPath"))
return rv
}
// An array of contours that this contour encloses. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/vision/vncontour/3548323-childcontours?language=objc
func (c_ Contour) ChildContours() []Contour {
rv := objc.Call[[]Contour](c_, objc.Sel("childContours"))
return rv
}
// The contour’s number of points. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/vision/vncontour/3548327-pointcount?language=objc
func (c_ Contour) PointCount() int {
rv := objc.Call[int](c_, objc.Sel("pointCount"))
return rv
}
// The contour object as a path in normalized coordinates. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/vision/vncontour/3548325-normalizedpath?language=objc
func (c_ Contour) NormalizedPath() unsafe.Pointer {
rv := objc.Call[unsafe.Pointer](c_, objc.Sel("normalizedPath"))
return rv
}
// The total number of detected child contours. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/vision/vncontour/3548322-childcontourcount?language=objc
func (c_ Contour) ChildContourCount() int {
rv := objc.Call[int](c_, objc.Sel("childContourCount"))
return rv
}