DISTRHO Plugin Framework
 All Classes Functions Variables Enumerations Enumerator Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ImageBase Class Referenceabstract

#include <ImageBase.hpp>

Inheritance diagram for ImageBase:
Image

Public Member Functions

virtual ~ImageBase ()
 
bool isValid () const noexcept
 
uint getWidth () const noexcept
 
uint getHeight () const noexcept
 
const Size< uint > & getSize () const noexcept
 
const char * getRawData () const noexcept
 
void draw ()
 
void drawAt (const int x, const int y)
 
void drawAt (const Point< int > &pos)
 
ImageBaseoperator= (const ImageBase &image) noexcept
 
bool operator== (const ImageBase &image) const noexcept
 
bool operator!= (const ImageBase &image) const noexcept
 

Protected Member Functions

 ImageBase ()
 
 ImageBase (const char *const rawData, const uint width, const uint height)
 
 ImageBase (const char *const rawData, const Size< uint > &size)
 
 ImageBase (const ImageBase &image)
 
virtual void _drawAt (const Point< int > &pos)=0
 

Protected Attributes

const char * fRawData
 
Size< uint > fSize
 

Detailed Description

Base DGL Image class.

This is an Image class that handles raw image data in pixels. It is an abstract class that provides the common methods to build on top. Cairo and OpenGL Image classes are based upon this one.

See Also
Image

Constructor & Destructor Documentation

ImageBase::ImageBase ( )
protected

Constructor for a null Image.

ImageBase::ImageBase ( const char *const  rawData,
const uint  width,
const uint  height 
)
protected

Constructor using raw image data.

Note
rawData must remain valid for the lifetime of this Image.
ImageBase::ImageBase ( const char *const  rawData,
const Size< uint > &  size 
)
protected

Constructor using raw image data.

Note
rawData must remain valid for the lifetime of this Image.
ImageBase::ImageBase ( const ImageBase image)
protected

Constructor using another image data.

virtual ImageBase::~ImageBase ( )
virtual

Destructor.

Member Function Documentation

bool ImageBase::isValid ( ) const
noexcept

Check if this image is valid.

uint ImageBase::getWidth ( ) const
noexcept

Get width.

uint ImageBase::getHeight ( ) const
noexcept

Get height.

const Size<uint>& ImageBase::getSize ( ) const
noexcept

Get size.

const char* ImageBase::getRawData ( ) const
noexcept

Get the raw image data.

void ImageBase::draw ( )

Draw this image at (0, 0) point.

void ImageBase::drawAt ( const int  x,
const int  y 
)

Draw this image at (x, y) point.

void ImageBase::drawAt ( const Point< int > &  pos)

Draw this image at position pos.

ImageBase& ImageBase::operator= ( const ImageBase image)
noexcept

TODO document this.


The documentation for this class was generated from the following file: