libopenraw
|
00001 /* 00002 * libopenraw - bitmapdata.h 00003 * 00004 * Copyright (C) 2007 Hubert Figuiere 00005 * 00006 * This library is free software: you can redistribute it and/or 00007 * modify it under the terms of the GNU Lesser General Public License 00008 * as published by the Free Software Foundation, either version 3 of 00009 * the License, or (at your option) any later version. 00010 * 00011 * This library is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 * Lesser General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU Lesser General Public 00017 * License along with this library. If not, see 00018 * <http://www.gnu.org/licenses/>. 00019 */ 00020 00021 00022 #ifndef __OPENRAW_BITMAPDATA_H__ 00023 #define __OPENRAW_BITMAPDATA_H__ 00024 00025 00026 #include <libopenraw/libopenraw.h> 00027 00028 00029 namespace OpenRaw { 00030 00031 class BitmapData 00032 { 00033 public: 00034 typedef ::or_data_type DataType; 00035 00036 BitmapData(); 00037 virtual ~BitmapData(); 00038 00040 void swap(BitmapData & with); 00041 00043 DataType dataType() const; 00045 void setDataType(DataType _type); 00046 00047 virtual void *allocData(const size_t s); 00049 size_t size() const; 00050 void *data() const; 00051 00052 uint32_t x() const; 00053 uint32_t y() const; 00055 uint32_t bpc() const; 00057 void setBpc(uint32_t _bpc); 00058 00060 virtual void setDimensions(uint32_t x, uint32_t y); 00061 00062 private: 00063 class Private; 00064 BitmapData::Private *d; 00065 00067 BitmapData(const BitmapData& f); 00069 BitmapData & operator=(const BitmapData&); 00070 }; 00071 00072 } 00073 00074 00075 00076 #endif