@@ -89,14 +89,20 @@ PYBIND11_MODULE(zxing, m)
89
89
.value (" FORMAT_COUNT" , BarcodeFormat::FORMAT_COUNT)
90
90
.value (" NONE" , BarcodeFormat::NONE)
91
91
.export_values ();
92
- py::class_<ResultPoint>(m, " ResultPoint" )
93
- .def_property_readonly (" x" , &ResultPoint::x)
94
- .def_property_readonly (" y" , &ResultPoint::y);
92
+ py::class_<PointI>(m, " Point" )
93
+ .def_readonly (" x" , &PointI::x)
94
+ .def_readonly (" y" , &PointI::y);
95
+ py::class_<Position>(m, " Position" )
96
+ .def_property_readonly (" topLeft" , &Position::topLeft)
97
+ .def_property_readonly (" topRight" , &Position::topRight)
98
+ .def_property_readonly (" bottomLeft" , &Position::bottomLeft)
99
+ .def_property_readonly (" bottomRight" , &Position::bottomRight);
95
100
py::class_<Result>(m, " Result" )
96
101
.def_property_readonly (" valid" , &Result::isValid)
97
102
.def_property_readonly (" text" , &Result::text)
98
103
.def_property_readonly (" format" , &Result::format)
99
- .def_property_readonly (" points" , &Result::resultPoints);
104
+ .def_property_readonly (" position" , &Result::position)
105
+ .def_property_readonly (" orientation" , &Result::orientation);
100
106
m.def (" barcode_format_from_str" , &BarcodeFormatFromString, " Convert string to BarcodeFormat" , py::arg (" str" ));
101
107
m.def (" barcode_formats_from_str" , &barcode_formats_from_str, " Convert string to BarcodeFormats" , py::arg (" str" ));
102
108
m.def (" read_barcode" , &read_barcode, " Read (decode) a barcode from a numpy BGR or grayscale image array" ,
0 commit comments