forked from progrium/darwinkit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtext_observation.gen.go
88 lines (71 loc) · 3.02 KB
/
text_observation.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
// Code generated by DarwinKit. DO NOT EDIT.
package vision
import (
"unsafe"
"github.com/progrium/macdriver/macos/coregraphics"
"github.com/progrium/macdriver/objc"
)
// The class instance for the [TextObservation] class.
var TextObservationClass = _TextObservationClass{objc.GetClass("VNTextObservation")}
type _TextObservationClass struct {
objc.Class
}
// An interface definition for the [TextObservation] class.
type ITextObservation interface {
IRectangleObservation
CharacterBoxes() []RectangleObservation
}
// Information about regions of text that an image analysis request detects. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/vision/vntextobservation?language=objc
type TextObservation struct {
RectangleObservation
}
func TextObservationFrom(ptr unsafe.Pointer) TextObservation {
return TextObservation{
RectangleObservation: RectangleObservationFrom(ptr),
}
}
func (tc _TextObservationClass) Alloc() TextObservation {
rv := objc.Call[TextObservation](tc, objc.Sel("alloc"))
return rv
}
func (tc _TextObservationClass) New() TextObservation {
rv := objc.Call[TextObservation](tc, objc.Sel("new"))
rv.Autorelease()
return rv
}
func NewTextObservation() TextObservation {
return TextObservationClass.New()
}
func (t_ TextObservation) Init() TextObservation {
rv := objc.Call[TextObservation](t_, objc.Sel("init"))
return rv
}
func (tc _TextObservationClass) ObservationWithBoundingBox(boundingBox coregraphics.Rect) TextObservation {
rv := objc.Call[TextObservation](tc, objc.Sel("observationWithBoundingBox:"), boundingBox)
return rv
}
// Creates an observation with a bounding box. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/vision/vndetectedobjectobservation/2879297-observationwithboundingbox?language=objc
func TextObservation_ObservationWithBoundingBox(boundingBox coregraphics.Rect) TextObservation {
return TextObservationClass.ObservationWithBoundingBox(boundingBox)
}
func (tc _TextObservationClass) ObservationWithRequestRevisionBoundingBox(requestRevision uint, boundingBox coregraphics.Rect) TextObservation {
rv := objc.Call[TextObservation](tc, objc.Sel("observationWithRequestRevision:boundingBox:"), requestRevision, boundingBox)
return rv
}
// Creates an observation with a revision number and bounding box. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/vision/vndetectedobjectobservation/2967105-observationwithrequestrevision?language=objc
func TextObservation_ObservationWithRequestRevisionBoundingBox(requestRevision uint, boundingBox coregraphics.Rect) TextObservation {
return TextObservationClass.ObservationWithRequestRevisionBoundingBox(requestRevision, boundingBox)
}
// An array of detected individual character bounding boxes. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/vision/vntextobservation/2867213-characterboxes?language=objc
func (t_ TextObservation) CharacterBoxes() []RectangleObservation {
rv := objc.Call[[]RectangleObservation](t_, objc.Sel("characterBoxes"))
return rv
}