Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
LuminanceSource.h
00001 // -*- mode:c++; tab-width:2; indent-tabs-mode:nil; c-basic-offset:2 -*- 00002 #ifndef __LUMINANCESOURCE_H__ 00003 #define __LUMINANCESOURCE_H__ 00004 /* 00005 * LuminanceSource.h 00006 * zxing 00007 * 00008 * Copyright 2010 ZXing authors All rights reserved. 00009 * 00010 * Licensed under the Apache License, Version 2.0 (the "License"); 00011 * you may not use this file except in compliance with the License. 00012 * You may obtain a copy of the License at 00013 * 00014 * http://www.apache.org/licenses/LICENSE-2.0 00015 * 00016 * Unless required by applicable law or agreed to in writing, software 00017 * distributed under the License is distributed on an "AS IS" BASIS, 00018 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00019 * See the License for the specific language governing permissions and 00020 * limitations under the License. 00021 */ 00022 00023 #include <zxing/common/Counted.h> 00024 #include <zxing/common/Array.h> 00025 #include <string.h> 00026 00027 namespace zxing { 00028 00029 class LuminanceSource : public Counted { 00030 private: 00031 const int width; 00032 const int height; 00033 00034 public: 00035 LuminanceSource(int width, int height); 00036 virtual ~LuminanceSource(); 00037 00038 int getWidth() const { return width; } 00039 int getHeight() const { return height; } 00040 00041 // Callers take ownership of the returned memory and must call delete [] on it themselves. 00042 virtual ArrayRef<char> getRow(int y, ArrayRef<char> row) const = 0; 00043 virtual ArrayRef<char> getMatrix() const = 0; 00044 00045 virtual bool isCropSupported() const; 00046 virtual Ref<LuminanceSource> crop(int left, int top, int width, int height) const; 00047 00048 virtual bool isRotateSupported() const; 00049 00050 virtual Ref<LuminanceSource> invert() const; 00051 00052 virtual Ref<LuminanceSource> rotateCounterClockwise() const; 00053 00054 operator std::string () const; 00055 }; 00056 00057 } 00058 00059 #endif /* LUMINANCESOURCE_H_ */
Generated on Wed Jul 13 2022 20:52:13 by
