- try {
- // Look for a barcode
- Ref<Result> result = decodeRow(rowNumber, row);
- // We found our barcode
- if (attempt == 1) {
- // // But it was upside down, so note that
- // result.putMetadata(ResultMetadataType.ORIENTATION, new Integer(180));
- // // And remember to flip the result points horizontally.
- std::vector<Ref<ResultPoint> > points(result->getResultPoints());
- // if there's exactly two points (which there should be), flip the x coordinate
- // if there's not exactly 2, I don't know what do do with it
- if (points.size() == 2) {
- Ref<ResultPoint> pointZero(new OneDResultPoint(width - points[0]->getX() - 1, points[0]->getY()));
- points[0] = pointZero;