mirror of
https://github.com/starovoid/rxing.git
synced 2026-07-28 05:12:34 +00:00
pending
This commit is contained in:
@@ -40,11 +40,12 @@ impl Reader for AztecReader {
|
|||||||
* @throws NotFoundException if a Data Matrix code cannot be found
|
* @throws NotFoundException if a Data Matrix code cannot be found
|
||||||
* @throws FormatException if a Data Matrix code cannot be decoded
|
* @throws FormatException if a Data Matrix code cannot be decoded
|
||||||
*/
|
*/
|
||||||
fn decode(image: &BinaryBitmap) -> Result<RXingResult, Exceptions> {
|
fn decode(&self,image: &BinaryBitmap) -> Result<RXingResult, Exceptions> {
|
||||||
Self::decode_with_hints(image, &HashMap::new())
|
self.decode_with_hints(image, &HashMap::new())
|
||||||
}
|
}
|
||||||
|
|
||||||
fn decode_with_hints(
|
fn decode_with_hints(
|
||||||
|
&self,
|
||||||
image: &BinaryBitmap,
|
image: &BinaryBitmap,
|
||||||
hints: &HashMap<DecodeHintType, DecodeHintValue>,
|
hints: &HashMap<DecodeHintType, DecodeHintValue>,
|
||||||
) -> Result<RXingResult, Exceptions> {
|
) -> Result<RXingResult, Exceptions> {
|
||||||
@@ -54,6 +55,7 @@ impl Reader for AztecReader {
|
|||||||
let mut points;
|
let mut points;
|
||||||
let mut decoderRXingResult: DecoderRXingResult;
|
let mut decoderRXingResult: DecoderRXingResult;
|
||||||
// try {
|
// try {
|
||||||
|
|
||||||
let detectorRXingResult = detector.detect(false)?;
|
let detectorRXingResult = detector.detect(false)?;
|
||||||
|
|
||||||
points = detectorRXingResult.getPoints();
|
points = detectorRXingResult.getPoints();
|
||||||
@@ -117,7 +119,7 @@ impl Reader for AztecReader {
|
|||||||
Ok(result)
|
Ok(result)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn reset() {
|
fn reset(&self) {
|
||||||
// do nothing
|
// do nothing
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,15 +32,17 @@ pub struct AztecWriter;
|
|||||||
|
|
||||||
impl Writer for AztecWriter {
|
impl Writer for AztecWriter {
|
||||||
fn encode(
|
fn encode(
|
||||||
|
&self,
|
||||||
contents: &str,
|
contents: &str,
|
||||||
format: &crate::BarcodeFormat,
|
format: &crate::BarcodeFormat,
|
||||||
width: i32,
|
width: i32,
|
||||||
height: i32,
|
height: i32,
|
||||||
) -> Result<crate::common::BitMatrix, crate::exceptions::Exceptions> {
|
) -> Result<crate::common::BitMatrix, crate::exceptions::Exceptions> {
|
||||||
Self::encode_with_hints(contents, format, width, height, &HashMap::new())
|
self.encode_with_hints(contents, format, width, height, &HashMap::new())
|
||||||
}
|
}
|
||||||
|
|
||||||
fn encode_with_hints(
|
fn encode_with_hints(
|
||||||
|
&self,
|
||||||
contents: &str,
|
contents: &str,
|
||||||
format: &crate::BarcodeFormat,
|
format: &crate::BarcodeFormat,
|
||||||
width: i32,
|
width: i32,
|
||||||
|
|||||||
Reference in New Issue
Block a user