forked from progrium/darwinkit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrecognized_text.gen.go
82 lines (67 loc) · 2.42 KB
/
recognized_text.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
// 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 [RecognizedText] class.
var RecognizedTextClass = _RecognizedTextClass{objc.GetClass("VNRecognizedText")}
type _RecognizedTextClass struct {
objc.Class
}
// An interface definition for the [RecognizedText] class.
type IRecognizedText interface {
objc.IObject
BoundingBoxForRangeError(range_ foundation.Range, error foundation.IError) RectangleObservation
String() string
Confidence() Confidence
}
// Text recognized in an image through a text recognition request. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/vision/vnrecognizedtext?language=objc
type RecognizedText struct {
objc.Object
}
func RecognizedTextFrom(ptr unsafe.Pointer) RecognizedText {
return RecognizedText{
Object: objc.ObjectFrom(ptr),
}
}
func (rc _RecognizedTextClass) Alloc() RecognizedText {
rv := objc.Call[RecognizedText](rc, objc.Sel("alloc"))
return rv
}
func (rc _RecognizedTextClass) New() RecognizedText {
rv := objc.Call[RecognizedText](rc, objc.Sel("new"))
rv.Autorelease()
return rv
}
func NewRecognizedText() RecognizedText {
return RecognizedTextClass.New()
}
func (r_ RecognizedText) Init() RecognizedText {
rv := objc.Call[RecognizedText](r_, objc.Sel("init"))
return rv
}
// Calculates the bounding box around the characters in the range of a string. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/vision/vnrecognizedtext/3152634-boundingboxforrange?language=objc
func (r_ RecognizedText) BoundingBoxForRangeError(range_ foundation.Range, error foundation.IError) RectangleObservation {
rv := objc.Call[RectangleObservation](r_, objc.Sel("boundingBoxForRange:error:"), range_, objc.Ptr(error))
return rv
}
// The top candidate for recognized text. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/vision/vnrecognizedtext/3152636-string?language=objc
func (r_ RecognizedText) String() string {
rv := objc.Call[string](r_, objc.Sel("string"))
return rv
}
// A normalized confidence score for the text recognition result. [Full Topic]
//
// [Full Topic]: https://developer.apple.com/documentation/vision/vnrecognizedtext/3152635-confidence?language=objc
func (r_ RecognizedText) Confidence() Confidence {
rv := objc.Call[Confidence](r_, objc.Sel("confidence"))
return rv
}