Permalink
Browse files

first commit

  • Loading branch information...
0 parents commit 8d15f7bb9d96df73a61713269cbe0b8a3cb27538 @psenough committed May 6, 2012
Showing with 16,769 additions and 0 deletions.
  1. +12 −0 .gitignore
  2. +106 −0 src/Result.cpp
  3. +38 −0 src/Result.h
  4. +36 −0 src/include/zxing/BarcodeFormat.cpp
  5. +42 −0 src/include/zxing/BarcodeFormat.h
  6. +37 −0 src/include/zxing/Binarizer.cpp
  7. +46 −0 src/include/zxing/Binarizer.h
  8. +67 −0 src/include/zxing/BinaryBitmap.cpp
  9. +57 −0 src/include/zxing/BinaryBitmap.h
  10. +112 −0 src/include/zxing/DecodeHints.cpp
  11. +70 −0 src/include/zxing/DecodeHints.h
  12. +40 −0 src/include/zxing/Exception.cpp
  13. +40 −0 src/include/zxing/Exception.h
  14. +35 −0 src/include/zxing/FormatException.cpp
  15. +35 −0 src/include/zxing/FormatException.h
  16. +80 −0 src/include/zxing/LuminanceSource.cpp
  17. +52 −0 src/include/zxing/LuminanceSource.h
  18. +102 −0 src/include/zxing/MultiFormatReader.cpp
  19. +49 −0 src/include/zxing/MultiFormatReader.h
  20. +28 −0 src/include/zxing/NotFoundException.cpp
  21. +33 −0 src/include/zxing/NotFoundException.h
  22. +31 −0 src/include/zxing/Reader.cpp
  23. +40 −0 src/include/zxing/Reader.h
  24. +35 −0 src/include/zxing/ReaderException.cpp
  25. +35 −0 src/include/zxing/ReaderException.h
  26. +64 −0 src/include/zxing/Result.cpp
  27. +54 −0 src/include/zxing/Result.h
  28. +100 −0 src/include/zxing/ResultPoint.cpp
  29. +54 −0 src/include/zxing/ResultPoint.h
  30. +26 −0 src/include/zxing/ResultPointCallback.cpp
  31. +39 −0 src/include/zxing/ResultPointCallback.h
  32. +22 −0 src/include/zxing/common/Array.cpp
  33. +208 −0 src/include/zxing/common/Array.h
  34. +127 −0 src/include/zxing/common/BitArray.cpp
  35. +70 −0 src/include/zxing/common/BitArray.h
  36. +157 −0 src/include/zxing/common/BitMatrix.cpp
  37. +87 −0 src/include/zxing/common/BitMatrix.h
  38. +74 −0 src/include/zxing/common/BitSource.cpp
  39. +70 −0 src/include/zxing/common/BitSource.h
  40. +90 −0 src/include/zxing/common/CharacterSetECI.cpp
  41. +53 −0 src/include/zxing/common/CharacterSetECI.h
  42. +32 −0 src/include/zxing/common/Counted.cpp
  43. +202 −0 src/include/zxing/common/Counted.h
  44. +46 −0 src/include/zxing/common/DecoderResult.cpp
  45. +51 −0 src/include/zxing/common/DecoderResult.h
  46. +42 −0 src/include/zxing/common/DetectorResult.cpp
  47. +46 −0 src/include/zxing/common/DetectorResult.h
  48. +42 −0 src/include/zxing/common/ECI.cpp
  49. +40 −0 src/include/zxing/common/ECI.h
  50. +191 −0 src/include/zxing/common/EdgeDetector.cpp
  51. +38 −0 src/include/zxing/common/EdgeDetector.h
  52. +209 −0 src/include/zxing/common/GlobalHistogramBinarizer.cpp
  53. +47 −0 src/include/zxing/common/GlobalHistogramBinarizer.h
  54. +70 −0 src/include/zxing/common/GreyscaleLuminanceSource.cpp
  55. +62 −0 src/include/zxing/common/GreyscaleLuminanceSource.h
  56. +65 −0 src/include/zxing/common/GreyscaleRotatedLuminanceSource.cpp
  57. +60 −0 src/include/zxing/common/GreyscaleRotatedLuminanceSource.h
  58. +122 −0 src/include/zxing/common/GridSampler.cpp
  59. +45 −0 src/include/zxing/common/GridSampler.h
  60. +207 −0 src/include/zxing/common/HybridBinarizer.cpp
  61. +68 −0 src/include/zxing/common/HybridBinarizer.h
  62. +31 −0 src/include/zxing/common/IllegalArgumentException.cpp
  63. +33 −0 src/include/zxing/common/IllegalArgumentException.h
  64. +107 −0 src/include/zxing/common/PerspectiveTransform.cpp
  65. +49 −0 src/include/zxing/common/PerspectiveTransform.h
  66. +47 −0 src/include/zxing/common/Point.h
  67. +38 −0 src/include/zxing/common/Str.cpp
  68. +40 −0 src/include/zxing/common/Str.h
  69. +175 −0 src/include/zxing/common/StringUtils.cpp
  70. +52 −0 src/include/zxing/common/StringUtils.h
  71. +171 −0 src/include/zxing/common/detector/MonochromeRectangleDetector.cpp
  72. +60 −0 src/include/zxing/common/detector/MonochromeRectangleDetector.h
  73. +315 −0 src/include/zxing/common/detector/WhiteRectangleDetector.cpp
  74. +56 −0 src/include/zxing/common/detector/WhiteRectangleDetector.h
  75. +136 −0 src/include/zxing/common/reedsolomon/GF256.cpp
  76. +68 −0 src/include/zxing/common/reedsolomon/GF256.h
  77. +198 −0 src/include/zxing/common/reedsolomon/GF256Poly.cpp
  78. +53 −0 src/include/zxing/common/reedsolomon/GF256Poly.h
  79. +198 −0 src/include/zxing/common/reedsolomon/ReedSolomonDecoder.cpp
  80. +46 −0 src/include/zxing/common/reedsolomon/ReedSolomonDecoder.h
  81. +30 −0 src/include/zxing/common/reedsolomon/ReedSolomonException.cpp
  82. +33 −0 src/include/zxing/common/reedsolomon/ReedSolomonException.h
  83. +84 −0 src/include/zxing/datamatrix/DataMatrixReader.cpp
  84. +45 −0 src/include/zxing/datamatrix/DataMatrixReader.h
  85. +199 −0 src/include/zxing/datamatrix/Version.cpp
  86. +87 −0 src/include/zxing/datamatrix/Version.h
  87. +361 −0 src/include/zxing/datamatrix/decoder/BitMatrixParser.cpp
  88. +59 −0 src/include/zxing/datamatrix/decoder/BitMatrixParser.h
  89. +113 −0 src/include/zxing/datamatrix/decoder/DataBlock.cpp
  90. +49 −0 src/include/zxing/datamatrix/decoder/DataBlock.h
  91. +417 −0 src/include/zxing/datamatrix/decoder/DecodedBitStreamParser.cpp
  92. +104 −0 src/include/zxing/datamatrix/decoder/DecodedBitStreamParser.h
  93. +94 −0 src/include/zxing/datamatrix/decoder/Decoder.cpp
  94. +50 −0 src/include/zxing/datamatrix/decoder/Decoder.h
  95. +46 −0 src/include/zxing/datamatrix/detector/CornerPoint.cpp
  96. +43 −0 src/include/zxing/datamatrix/detector/CornerPoint.h
  97. +434 −0 src/include/zxing/datamatrix/detector/Detector.cpp
  98. +94 −0 src/include/zxing/datamatrix/detector/Detector.h
  99. +23 −0 src/include/zxing/datamatrix/detector/DetectorException.cpp
  100. +23 −0 src/include/zxing/datamatrix/detector/DetectorException.h
  101. +172 −0 src/include/zxing/datamatrix/detector/MonochromeRectangleDetector.cpp
  102. +61 −0 src/include/zxing/datamatrix/detector/MonochromeRectangleDetector.h
  103. +71 −0 src/include/zxing/multi/ByQuadrantReader.cpp
  104. +40 −0 src/include/zxing/multi/ByQuadrantReader.h
  105. +128 −0 src/include/zxing/multi/GenericMultipleBarcodeReader.cpp
  106. +47 −0 src/include/zxing/multi/GenericMultipleBarcodeReader.h
  107. +29 −0 src/include/zxing/multi/MultipleBarcodeReader.cpp
  108. +39 −0 src/include/zxing/multi/MultipleBarcodeReader.h
  109. +57 −0 src/include/zxing/multi/qrcode/QRCodeMultiReader.cpp
  110. +34 −0 src/include/zxing/multi/qrcode/QRCodeMultiReader.h
  111. +46 −0 src/include/zxing/multi/qrcode/detector/MultiDetector.cpp
  112. +35 −0 src/include/zxing/multi/qrcode/detector/MultiDetector.h
  113. +230 −0 src/include/zxing/multi/qrcode/detector/MultiFinderPatternFinder.cpp
  114. +45 −0 src/include/zxing/multi/qrcode/detector/MultiFinderPatternFinder.h
  115. +490 −0 src/include/zxing/oned/Code128Reader.cpp
  116. +60 −0 src/include/zxing/oned/Code128Reader.h
  117. +348 −0 src/include/zxing/oned/Code39Reader.cpp
  118. +58 −0 src/include/zxing/oned/Code39Reader.h
  119. +94 −0 src/include/zxing/oned/EAN13Reader.cpp
  120. +44 −0 src/include/zxing/oned/EAN13Reader.h
  121. +72 −0 src/include/zxing/oned/EAN8Reader.cpp
  122. +41 −0 src/include/zxing/oned/EAN8Reader.h
  123. +367 −0 src/include/zxing/oned/ITFReader.cpp
  124. +53 −0 src/include/zxing/oned/ITFReader.h
  125. +66 −0 src/include/zxing/oned/MultiFormatOneDReader.cpp
  126. +38 −0 src/include/zxing/oned/MultiFormatOneDReader.h
  127. +87 −0 src/include/zxing/oned/MultiFormatUPCEANReader.cpp
  128. +38 −0 src/include/zxing/oned/MultiFormatUPCEANReader.h
  129. +207 −0 src/include/zxing/oned/OneDReader.cpp
  130. +50 −0 src/include/zxing/oned/OneDReader.h
  131. +28 −0 src/include/zxing/oned/OneDResultPoint.cpp
  132. +35 −0 src/include/zxing/oned/OneDResultPoint.h
  133. +65 −0 src/include/zxing/oned/UPCAReader.cpp
  134. +49 −0 src/include/zxing/oned/UPCAReader.h
  135. +311 −0 src/include/zxing/oned/UPCEANReader.cpp
  136. +75 −0 src/include/zxing/oned/UPCEANReader.h
  137. +142 −0 src/include/zxing/oned/UPCEReader.cpp
  138. +44 −0 src/include/zxing/oned/UPCEReader.h
  139. +65 −0 src/include/zxing/qrcode/ErrorCorrectionLevel.cpp
  140. +52 −0 src/include/zxing/qrcode/ErrorCorrectionLevel.h
  141. +118 −0 src/include/zxing/qrcode/FormatInformation.cpp
  142. +54 −0 src/include/zxing/qrcode/FormatInformation.h
  143. +86 −0 src/include/zxing/qrcode/QRCodeReader.cpp
  144. +47 −0 src/include/zxing/qrcode/QRCodeReader.h
  145. +557 −0 src/include/zxing/qrcode/Version.cpp
  146. +85 −0 src/include/zxing/qrcode/Version.h
  147. +186 −0 src/include/zxing/qrcode/decoder/BitMatrixParser.cpp
  148. +56 −0 src/include/zxing/qrcode/decoder/BitMatrixParser.h
  149. +118 −0 src/include/zxing/qrcode/decoder/DataBlock.cpp
  150. +50 −0 src/include/zxing/qrcode/decoder/DataBlock.h
  151. +159 −0 src/include/zxing/qrcode/decoder/DataMask.cpp
  152. +50 −0 src/include/zxing/qrcode/decoder/DataMask.h
  153. +403 −0 src/include/zxing/qrcode/decoder/DecodedBitStreamParser.cpp
  154. +72 −0 src/include/zxing/qrcode/decoder/DecodedBitStreamParser.h
  155. +102 −0 src/include/zxing/qrcode/decoder/Decoder.cpp
  156. +47 −0 src/include/zxing/qrcode/decoder/Decoder.h
  157. +86 −0 src/include/zxing/qrcode/decoder/Mode.cpp
  158. +58 −0 src/include/zxing/qrcode/decoder/Mode.h
  159. +51 −0 src/include/zxing/qrcode/detector/AlignmentPattern.cpp
  160. +45 −0 src/include/zxing/qrcode/detector/AlignmentPattern.h
  161. +209 −0 src/include/zxing/qrcode/detector/AlignmentPatternFinder.cpp
  162. +68 −0 src/include/zxing/qrcode/detector/AlignmentPatternFinder.h
  163. +298 −0 src/include/zxing/qrcode/detector/Detector.cpp
  164. +66 −0 src/include/zxing/qrcode/detector/Detector.h
  165. +71 −0 src/include/zxing/qrcode/detector/FinderPattern.cpp
  166. +47 −0 src/include/zxing/qrcode/detector/FinderPattern.h
  167. +541 −0 src/include/zxing/qrcode/detector/FinderPatternFinder.cpp
  168. +71 −0 src/include/zxing/qrcode/detector/FinderPatternFinder.h
  169. +41 −0 src/include/zxing/qrcode/detector/FinderPatternInfo.cpp
  170. +47 −0 src/include/zxing/qrcode/detector/FinderPatternInfo.h
  171. +168 −0 src/include/zxing/qrcode/detector/QREdgeDetector.cpp
  172. +48 −0 src/include/zxing/qrcode/detector/QREdgeDetector.h
  173. +65 −0 src/ofPixelsBitmapSource.cpp
  174. +29 −0 src/ofPixelsBitmapSource.h
  175. +48 −0 src/ofxZxing.cpp
  176. +10 −0 src/ofxZxing.h
@@ -0,0 +1,12 @@
+*.depend
+*.layout
+*.mode*v3
+*.pbxuser
+*.app*
+*.DS_*
+
+.svn/
+obj/
+bin/
+build/
+!data/
@@ -0,0 +1,106 @@
+#include "Result.h"
+
+namespace ofxZxing {
+
+Result::Result() :
+ found(false) {
+}
+
+Result::Result(string text, vector<ofVec2f> points) :
+ found(true), text(text), points(points) {
+ if(points.size() > 1) {
+ screenNormal = points[1] - points[0];
+ }
+ if(points.size() > 2) {
+ center = (points[0] + points[2]) / 2;
+ }
+ screenSize = screenNormal.length();
+}
+
+void drawTextBox(string text, ofVec2f position, ofColor fgColor = ofColor::white, ofColor bgColor = ofColor::black) {
+ ofPushStyle();
+
+ int border = 4;
+ ofSetColor(bgColor);
+ ofRect(
+ (int) position.x - border,
+ (int) position.y - 4 - border,
+ text.length() * 8 + (border * 2),
+ 8 + (border * 2));
+
+ ofSetColor(fgColor);
+ ofDrawBitmapString(text, position);
+
+ ofPopStyle();
+}
+
+void Result::draw() {
+ ofPushStyle();
+
+ ofSetColor(ofColor::red);
+ ofSetLineWidth(3);
+
+#ifdef OF_IPHONE
+
+ GLfloat triVertices[points.size()*2];
+
+ for(int i = 0; i < points.size(); i++) {
+ triVertices[i] = points[i].x;
+ triVertices[i+1] = points[i].y;
+ }
+
+ glEnableClientState(GL_VERTEX_ARRAY);
+
+ glVertexPointer(3, GL_FLOAT, 0, triVertices);
+ glDrawArrays(GL_TRIANGLES, 0, 3);
+
+ glDisableClientState(GL_VERTEX_ARRAY);
+
+#elseif
+
+
+ glBegin(GL_LINE_LOOP);
+ for(int i = 0; i < points.size(); i++) {
+ glVertex2f(points[i].x, points[i].y);
+ }
+ glEnd();
+
+#endif
+ for(int i = 0; i < points.size(); i++) {
+ drawTextBox(ofToString(i), points[i]);
+ }
+
+ drawTextBox(text, center);
+
+ ofPopStyle();
+}
+
+bool Result::getFound() const {
+ return found;
+}
+
+string Result::getText() const {
+ return text;
+}
+
+vector<ofVec2f>& Result::getPoints() {
+ return points;
+}
+
+ofVec2f Result::getScreenPosition() const {
+ return center;
+}
+
+ofVec2f Result::getScreenNormal() const {
+ return screenNormal;
+}
+
+float Result::getScreenSize() const {
+ return screenSize;
+}
+
+float Result::getRotation(ofVec2f relativeTo) const {
+ return relativeTo.angle(screenNormal);
+}
+
+}
@@ -0,0 +1,38 @@
+#pragma once
+
+#include "ofMain.h"
+
+namespace ofxZxing {
+
+class Result {
+public:
+ Result();
+ Result(string text, vector<ofVec2f> points);
+
+ void draw();
+
+ bool getFound() const;
+ string getText() const;
+ vector<ofVec2f>& getPoints();
+
+ ofVec2f getScreenPosition() const;
+ ofVec2f getScreenNormal() const;
+ float getScreenSize() const;
+ float getRotation(ofVec2f relativeTo = ofVec2f(0, -1)) const;
+
+ /*
+ // these would be nice:
+ ofVec3f getRealPosition(float physicalSize) const;
+ ofVec3f getRealNormal(float physicalSize) const;
+ */
+
+protected:
+ bool found;
+ string text;
+ vector<ofVec2f> points;
+ ofVec2f center;
+ ofVec2f screenNormal;
+ float screenSize;
+};
+
+}
@@ -0,0 +1,36 @@
+// -*- mode:c++; tab-width:2; indent-tabs-mode:nil; c-basic-offset:2 -*-
+/*
+ * Created by Christian Brunschen on 13/05/2008.
+ * Copyright 2008 ZXing authors All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <zxing/BarcodeFormat.h>
+
+namespace zxing {
+
+const char *barcodeFormatNames[] = {
+ "None",
+ "QR_CODE",
+ "DATA_MATRIX",
+ "UPC_E",
+ "UPC_A",
+ "EAN_8",
+ "EAN_13",
+ "CODE_128",
+ "CODE_39",
+ "ITF"
+};
+
+}
@@ -0,0 +1,42 @@
+#ifndef __BARCODE_FORMAT_H__
+#define __BARCODE_FORMAT_H__
+
+/*
+ * BarcodeFormat.h
+ * zxing
+ *
+ * Copyright 2010 ZXing authors All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+namespace zxing {
+
+ typedef enum BarcodeFormat {
+ BarcodeFormat_None = 0,
+ BarcodeFormat_QR_CODE,
+ BarcodeFormat_DATA_MATRIX,
+ BarcodeFormat_UPC_E,
+ BarcodeFormat_UPC_A,
+ BarcodeFormat_EAN_8,
+ BarcodeFormat_EAN_13,
+ BarcodeFormat_CODE_128,
+ BarcodeFormat_CODE_39,
+ BarcodeFormat_ITF
+ } BarcodeFormat;
+
+ /* if you update the enum, please update the name in BarcodeFormat.cpp */
+ extern const char *barcodeFormatNames[];
+}
+
+#endif // __BARCODE_FORMAT_H__
@@ -0,0 +1,37 @@
+// -*- mode:c++; tab-width:2; indent-tabs-mode:nil; c-basic-offset:2 -*-
+/*
+ * Binarizer.cpp
+ * zxing
+ *
+ * Created by Ralf Kistner on 16/10/2009.
+ * Copyright 2008 ZXing authors All rights reserved.
+ * Modified by Lukasz Warchol on 02/02/2010.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <zxing/Binarizer.h>
+
+namespace zxing {
+
+ Binarizer::Binarizer(Ref<LuminanceSource> source) : source_(source) {
+ }
+
+ Binarizer::~Binarizer() {
+ }
+
+ Ref<LuminanceSource> Binarizer::getLuminanceSource() const {
+ return source_;
+ }
+
+}
@@ -0,0 +1,46 @@
+#ifndef BINARIZER_H_
+#define BINARIZER_H_
+
+/*
+ * Binarizer.h
+ * zxing
+ *
+ * Copyright 2010 ZXing authors All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <zxing/LuminanceSource.h>
+#include <zxing/common/BitArray.h>
+#include <zxing/common/BitMatrix.h>
+#include <zxing/common/Counted.h>
+
+namespace zxing {
+
+class Binarizer : public Counted {
+ private:
+ Ref<LuminanceSource> source_;
+
+ public:
+ Binarizer(Ref<LuminanceSource> source);
+ virtual ~Binarizer();
+
+ virtual Ref<BitArray> getBlackRow(int y, Ref<BitArray> row) = 0;
+ virtual Ref<BitMatrix> getBlackMatrix() = 0;
+
+ Ref<LuminanceSource> getLuminanceSource() const ;
+ virtual Ref<Binarizer> createBinarizer(Ref<LuminanceSource> source) = 0;
+};
+
+}
+#endif /* BINARIZER_H_ */
@@ -0,0 +1,67 @@
+/*
+ * BinaryBitmap.cpp
+ * zxing
+ *
+ * Copyright 2010 ZXing authors All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <zxing/BinaryBitmap.h>
+
+namespace zxing {
+
+ BinaryBitmap::BinaryBitmap(Ref<Binarizer> binarizer) : binarizer_(binarizer) {
+
+ }
+
+ BinaryBitmap::~BinaryBitmap() {
+ }
+
+ Ref<BitArray> BinaryBitmap::getBlackRow(int y, Ref<BitArray> row) {
+ return binarizer_->getBlackRow(y, row);
+ }
+
+ Ref<BitMatrix> BinaryBitmap::getBlackMatrix() {
+ return binarizer_->getBlackMatrix();
+ }
+
+ int BinaryBitmap::getWidth() const {
+ return getLuminanceSource()->getWidth();
+ }
+
+ int BinaryBitmap::getHeight() const {
+ return getLuminanceSource()->getHeight();
+ }
+
+ Ref<LuminanceSource> BinaryBitmap::getLuminanceSource() const {
+ return binarizer_->getLuminanceSource();
+ }
+
+
+ bool BinaryBitmap::isCropSupported() const {
+ return getLuminanceSource()->isCropSupported();
+ }
+
+ Ref<BinaryBitmap> BinaryBitmap::crop(int left, int top, int width, int height) {
+ return Ref<BinaryBitmap> (new BinaryBitmap(binarizer_->createBinarizer(getLuminanceSource()->crop(left, top, width, height))));
+ }
+
+ bool BinaryBitmap::isRotateSupported() const {
+ return getLuminanceSource()->isRotateSupported();
+ }
+
+ Ref<BinaryBitmap> BinaryBitmap::rotateCounterClockwise() {
+ return Ref<BinaryBitmap> (new BinaryBitmap(binarizer_->createBinarizer(getLuminanceSource()->rotateCounterClockwise())));
+ }
+}
Oops, something went wrong. Retry.

0 comments on commit 8d15f7b

Please sign in to comment.