DISTRHO Plugin Framework
|
#include <ImageBase.hpp>
Public Member Functions | |
virtual | ~ImageBase () |
bool | isValid () const noexcept |
bool | isInvalid () const noexcept |
uint | getWidth () const noexcept |
uint | getHeight () const noexcept |
const Size< uint > & | getSize () const noexcept |
const char * | getRawData () const noexcept |
ImageFormat | getFormat () const noexcept |
void | loadFromMemory (const char *rawData, uint width, uint height, ImageFormat format=kImageFormatBGRA) noexcept |
virtual void | loadFromMemory (const char *rawData, const Size< uint > &size, ImageFormat format=kImageFormatBGRA) noexcept |
void | draw (const GraphicsContext &context) |
void | drawAt (const GraphicsContext &context, int x, int y) |
virtual void | drawAt (const GraphicsContext &context, const Point< int > &pos)=0 |
ImageBase & | operator= (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 *rawData, uint width, uint height, ImageFormat format) | |
ImageBase (const char *rawData, const Size< uint > &size, ImageFormat format) | |
ImageBase (const ImageBase &image) | |
Protected Attributes | |
const char * | rawData |
Size< uint > | size |
ImageFormat | format |
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.
|
protected |
Constructor for a null Image.
|
protected |
Constructor using raw image data.
|
protected |
Constructor using raw image data.
|
protected |
Constructor using another image data.
|
virtual |
Destructor.
|
noexcept |
Check if this image is valid.
|
noexcept |
Check if this image is not valid.
|
noexcept |
Get width.
|
noexcept |
Get height.
|
noexcept |
Get size.
|
noexcept |
Get the raw image data.
|
noexcept |
Get the image format.
|
noexcept |
Load image data from memory.
|
virtualnoexcept |
Load image data from memory.
Reimplemented in VulkanImage, OpenGLImage, and CairoImage.
void ImageBase::draw | ( | const GraphicsContext & | context | ) |
Draw this image at (0, 0) point using the current OpenGL context.
void ImageBase::drawAt | ( | const GraphicsContext & | context, |
int | x, | ||
int | y | ||
) |
Draw this image at (x, y) point using the current OpenGL context.
|
pure virtual |
Draw this image at position pos using the current OpenGL context.
Implemented in VulkanImage, OpenGLImage, and CairoImage.