Skip to content

Commit

Permalink
Add angle and isMirrored
Browse files Browse the repository at this point in the history
  • Loading branch information
yushulx committed Oct 29, 2024
1 parent 8d2ff3f commit 90936fa
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ export type BarcodeResult = {
y4: number
page: number
time: number

angle: number
isMirrored: number
}

export interface BarcodeReader {
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "barcode4nodejs",
"version": "10.0.0",
"version": "10.0.1",
"description": "Node.js bindings to Dynamsoft Barcode Reader C/C++ SDK.",
"keywords": [
"barcode",
Expand Down Expand Up @@ -60,4 +60,4 @@
"dependencies": {
"barcode4nodejs": "file:"
}
}
}
2 changes: 2 additions & 0 deletions src/dbr.cc
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,8 @@ void BarcodeReader::WrapResults(BarcodeWorker *worker, Napi::Env env, Napi::Obje
res.Set("y4", Napi::Number::New(env, points[3][1]));
res.Set("page", Napi::Number::New(env, fileTag->GetPageNumber()));
res.Set("time", Napi::Number::New(env, worker->elapsedTime));
res.Set("angle", Napi::Number::New(env, barcodeResultItem->GetAngle()));
res.Set("isMirrored", Napi::Number::New(env, barcodeResultItem->IsMirrored()));
barcodeResults.Set(i + j * count, res);
}

Expand Down

0 comments on commit 90936fa

Please sign in to comment.