JUCE
Public Member Functions | List of all members
ImageType Class Referenceabstract

This base class is for handlers that control a type of image manipulation format, e.g. More...

+ Inheritance diagram for ImageType:

Public Member Functions

 ImageType ()
 
virtual ~ImageType ()
 
virtual ImagePixelData::Ptr create (Image::PixelFormat format, int width, int height, bool shouldClearImage) const =0
 Creates a new image of this type, and the specified parameters. More...
 
virtual int getTypeID () const =0
 Must return a unique number to identify this type. More...
 
virtual Image convert (const Image &source) const
 Returns an image which is a copy of the source image, but using this type of storage mechanism. More...
 

Detailed Description

This base class is for handlers that control a type of image manipulation format, e.g.

an in-memory bitmap, an OpenGL image, CoreGraphics image, etc.

See also
SoftwareImageType, NativeImageType, OpenGLImageType

Constructor & Destructor Documentation

ImageType::ImageType ( )
virtual ImageType::~ImageType ( )
virtual

Member Function Documentation

virtual ImagePixelData::Ptr ImageType::create ( Image::PixelFormat  format,
int  width,
int  height,
bool  shouldClearImage 
) const
pure virtual

Creates a new image of this type, and the specified parameters.

Implemented in NativeImageType, SoftwareImageType, and OpenGLImageType.

virtual int ImageType::getTypeID ( ) const
pure virtual

Must return a unique number to identify this type.

Implemented in NativeImageType, SoftwareImageType, and OpenGLImageType.

virtual Image ImageType::convert ( const Image source) const
virtual

Returns an image which is a copy of the source image, but using this type of storage mechanism.

For example, to make sure that an image is stored in-memory, you could use:

myImage = SoftwareImageType().convert (myImage);

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