mirror of
https://github.com/starovoid/rxing.git
synced 2026-07-26 04:12:34 +00:00
switch to using Point in one-d-derive macros
Also start updates to make point more generic, still not complete or fully implemented. Some code cleanup
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "rxing-one-d-proc-derive"
|
||||
repository = "https://github.com/rxing-core/rxing/tree/main/crates/one-d-proc-derive"
|
||||
version = "0.4.0"
|
||||
version = "0.5.0"
|
||||
edition = "2021"
|
||||
description = "proc macros to simplify the development of one-d barcode symbologies in rxing (https://github.com/rxing-core/rxing)"
|
||||
license = "Apache-2.0"
|
||||
|
||||
@@ -20,7 +20,7 @@ fn impl_one_d_reader_macro(ast: &syn::DeriveInput) -> TokenStream {
|
||||
use crate::DecodingHintDictionary;
|
||||
use crate::RXingResultMetadataType;
|
||||
use crate::RXingResultMetadataValue;
|
||||
use crate::RXingResultPoint;
|
||||
use crate::Point;
|
||||
use crate::Reader;
|
||||
use crate::Binarizer;
|
||||
|
||||
@@ -64,7 +64,7 @@ fn impl_one_d_reader_macro(ast: &syn::DeriveInput) -> TokenStream {
|
||||
let points = result.getRXingResultPointsMut();
|
||||
for i in 0..total_points{
|
||||
// for (int i = 0; i < points.length; i++) {
|
||||
points[i] = RXingResultPoint::new(height as f32- points[i].getY() - 1.0, points[i].getX());
|
||||
points[i] = Point::new(height as f32- points[i].getY() - 1.0, points[i].getX());
|
||||
}
|
||||
// }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user