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 2bc868f commit 29574d4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ export type BarcodeResult = {
y4: number
page: number
time: number

angle: number
isMirrored: number
}

export interface BarcodeReader {
Expand Down
2 changes: 2 additions & 0 deletions src/dbr.cc
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ void BarcodeReader::WrapResults(BarcodeWorker *worker, Napi::Env env, Napi::Obje
res.Set("y4", Napi::Number::New(env, pResults->results[i]->localizationResult->y4));
res.Set("page", Napi::Number::New(env, pResults->results[i]->localizationResult->pageNumber));
res.Set("time", Napi::Number::New(env, worker->elapsedTime));
res.Set("angle", Napi::Number::New(env, pResults->results[i]->localizationResult->angle));
res.Set("isMirrored", Napi::Number::New(env, pResults->results[i]->isMirrored));
barcodeResults.Set(i, res);
}

Expand Down

0 comments on commit 29574d4

Please sign in to comment.