QGIS API Documentation  master-6164ace
QgsSingleBandColorDataRenderer Class Reference

Raster renderer pipe for single band color. More...

#include <qgssinglebandcolordatarenderer.h>

+ Inheritance diagram for QgsSingleBandColorDataRenderer:
+ Collaboration diagram for QgsSingleBandColorDataRenderer:

List of all members.

Public Member Functions

 QgsSingleBandColorDataRenderer (QgsRasterInterface *input, int band)
 ~QgsSingleBandColorDataRenderer ()
QgsRasterBlockblock (int bandNo, QgsRectangle const &extent, int width, int height)
 Read block of data using given extent and size.
QgsRasterInterfaceclone () const
 Clone itself, create deep copy.
bool setInput (QgsRasterInterface *input)
 Set input.
QList< int > usesBands () const
 Returns a list of band numbers used by the renderer.
void writeXML (QDomDocument &doc, QDomElement &parentElem) const
 Write base class members to xml.

Static Public Member Functions

static QgsRasterRenderercreate (const QDomElement &elem, QgsRasterInterface *input)

Private Attributes

int mBand

Detailed Description

Raster renderer pipe for single band color.

Definition at line 28 of file qgssinglebandcolordatarenderer.h.


Constructor & Destructor Documentation


Member Function Documentation

QgsRasterBlock * QgsSingleBandColorDataRenderer::block ( int  bandNo,
QgsRectangle const &  extent,
int  width,
int  height 
) [virtual]

Read block of data using given extent and size.

Returns pointer to data. Caller is responsible to free the memory returned.

Parameters:
bandNoband number
extentextent of block
widthpixel width of block
heightpixel height of block

Implements QgsRasterRenderer.

Definition at line 56 of file qgssinglebandcolordatarenderer.cpp.

References QGis::ARGB32_Premultiplied, QgsRasterInterface::block(), QgsRasterBlock::color(), QgsRasterBlock::convert(), QgsRasterBlock::isEmpty(), mBand, QgsRasterInterface::mInput, QgsRasterRenderer::mOpacity, QgsDebugMsg, QgsRasterBlock::reset(), QgsRasterBlock::setColor(), and QgsRasterRenderer::usesTransparency().

Set input.

Returns true if set correctly, false if cannot use that input

Reimplemented from QgsRasterRenderer.

Definition at line 126 of file qgssinglebandcolordatarenderer.cpp.

References QGis::ARGB32, QGis::ARGB32_Premultiplied, QgsRasterInterface::dataType(), QgsRasterInterface::input(), QgsRasterInterface::mInput, and QgsRasterInterface::mOn.

QList< int > QgsSingleBandColorDataRenderer::usesBands ( ) const [virtual]

Returns a list of band numbers used by the renderer.

Reimplemented from QgsRasterRenderer.

Definition at line 116 of file qgssinglebandcolordatarenderer.cpp.

References mBand.

void QgsSingleBandColorDataRenderer::writeXML ( QDomDocument &  doc,
QDomElement &  parentElem 
) const [virtual]

Write base class members to xml.

Reimplemented from QgsRasterInterface.

Definition at line 103 of file qgssinglebandcolordatarenderer.cpp.

References QgsRasterRenderer::_writeXML(), and mBand.


Member Data Documentation

Definition at line 46 of file qgssinglebandcolordatarenderer.h.

Referenced by block(), clone(), usesBands(), and writeXML().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines