forked from progrium/darwinkit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrecognized_text_observation.gen.go
88 lines (71 loc) · 3.43 KB
/
recognized_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 [RecognizedTextObservation] class.
var RecognizedTextObservationClass = _RecognizedTextObservationClass{objc.GetClass("VNRecognizedTextObservation")}
type _RecognizedTextObservationClass struct {
objc.Class
}
// An interface definition for the [RecognizedTextObservation] class.
type IRecognizedTextObservation interface {
IRectangleObservation
TopCandidates(maxCandidateCount uint) []RecognizedText
}
// A request that detects and recognizes regions of text in an image. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/vision/vnrecognizedtextobservation?language=objc
type RecognizedTextObservation struct {
RectangleObservation
}
func RecognizedTextObservationFrom(ptr unsafe.Pointer) RecognizedTextObservation {
return RecognizedTextObservation{
RectangleObservation: RectangleObservationFrom(ptr),
}
}
func (rc _RecognizedTextObservationClass) Alloc() RecognizedTextObservation {
rv := objc.Call[RecognizedTextObservation](rc, objc.Sel("alloc"))
return rv
}
func (rc _RecognizedTextObservationClass) New() RecognizedTextObservation {
rv := objc.Call[RecognizedTextObservation](rc, objc.Sel("new"))
rv.Autorelease()
return rv
}
func NewRecognizedTextObservation() RecognizedTextObservation {
return RecognizedTextObservationClass.New()
}
func (r_ RecognizedTextObservation) Init() RecognizedTextObservation {
rv := objc.Call[RecognizedTextObservation](r_, objc.Sel("init"))
return rv
}
func (rc _RecognizedTextObservationClass) ObservationWithBoundingBox(boundingBox coregraphics.Rect) RecognizedTextObservation {
rv := objc.Call[RecognizedTextObservation](rc, 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 RecognizedTextObservation_ObservationWithBoundingBox(boundingBox coregraphics.Rect) RecognizedTextObservation {
return RecognizedTextObservationClass.ObservationWithBoundingBox(boundingBox)
}
func (rc _RecognizedTextObservationClass) ObservationWithRequestRevisionBoundingBox(requestRevision uint, boundingBox coregraphics.Rect) RecognizedTextObservation {
rv := objc.Call[RecognizedTextObservation](rc, 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 RecognizedTextObservation_ObservationWithRequestRevisionBoundingBox(requestRevision uint, boundingBox coregraphics.Rect) RecognizedTextObservation {
return RecognizedTextObservationClass.ObservationWithRequestRevisionBoundingBox(requestRevision, boundingBox)
}
// Requests the n top candidates for a recognized text string. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/vision/vnrecognizedtextobservation/3152637-topcandidates?language=objc
func (r_ RecognizedTextObservation) TopCandidates(maxCandidateCount uint) []RecognizedText {
rv := objc.Call[[]RecognizedText](r_, objc.Sel("topCandidates:"), maxCandidateCount)
return rv
}