/usr/include/GTLCore/BufferImage.h is in opengtl-dev 0.9.16-0ubuntu2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | /*
* Copyright (c) 2008 Cyrille Berger <cberger@cberger.net>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* either version 2, or (at your option) any later version of the License.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this library; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifndef _GTLCORE_BUFFER_IMAGE_H_
#define _GTLCORE_BUFFER_IMAGE_H_
#include <GTLCore/AbstractImage.h>
namespace GTLCore {
class Buffer;
/**
* This is an implementation of \ref AbstractImage which can be used with any \ref GTLCore::Buffer .
*
* @ingroup GTLCore
*/
class GTLCORE_EXPORT BufferImage : public AbstractImage {
public:
/**
* @param _width width of the image
* @param _height height of the image
* @param _buffer the buffer giving access to the image data (\ref BufferImage takes
* ownership of the \ref GTLCore::Buffer )
* @param _pixelDescription the description of the pixel stored in the buffer
*
* It is expected that (_width * _height * _pixelDescription.bitsSize() / 8) == _buffer->size()
*/
BufferImage( int _width, int _height, GTLCore::Buffer* _buffer, const GTLCore::PixelDescription& _pixelDescription, const AbstractColorConverter* _colorConverter = 0 );
~BufferImage();
public:
virtual char* rawData( int _x, int _y );
virtual const char* rawData( int _x, int _y ) const;
virtual RegionI boundingBox() const;
virtual AbstractImage::ConstIterator* createIterator() const;
virtual AbstractImage::Iterator* createIterator();
protected:
int lineWidth() const;
const GTLCore::Buffer* buffer() const;
private:
GTLCore::Buffer* buffer();
private:
struct Private;
Private* const d;
};
}
#endif
|