#include <bitmap.h>
Public Member Functions | |
virtual bool | init (utility::ErrorState &errorState) override |
![]() | |
virtual | ~Bitmap () |
virtual bool | initFromFile (const std::string &path, nap::utility::ErrorState &errorState) |
void | initFromDescriptor (const SurfaceDescriptor &surfaceDescriptor) |
bool | save (const std::string &path, utility::ErrorState &errorState) |
rtti::TypeInfo | getColorType () const |
bool | empty () const |
int | getWidth () const |
int | getHeight () const |
int | getNumberOfChannels () const |
void * | getData () |
const void * | getData () const |
size_t | getSizeInBytes () const |
std::unique_ptr< BaseColor > | makePixel () const |
void | getPixel (int x, int y, BaseColor &outPixel) const |
template<typename T > | |
T | getPixel (int x, int y) const |
void | setPixel (int x, int y, const BaseColor &color) |
template<typename T > | |
void | setPixelColor (int x, int y, const T &color) |
template<typename Type > | |
void | getRGBColor (int x, int y, RGBColor< Type > &outColor) const |
template<typename Type > | |
RGBColor< Type > | getRGBColor (int x, int y) const |
template<typename Type > | |
void | getRGBAColor (int x, int y, RGBAColor< Type > &outColor) const |
template<typename Type > | |
RGBAColor< Type > | getRGBAColor (int x, int y) const |
template<typename Type > | |
void | getColorValue (int x, int y, nap::EColorChannel channel, RColor< Type > &outValue) const |
template<typename Type > | |
RColor< Type > | getColorValue (int x, int y, nap::EColorChannel channel) const |
![]() | |
Resource () | |
![]() | |
Object () | |
virtual | ~Object () |
virtual void | onDestroy () |
Object (Object &)=delete | |
Object & | operator= (const Object &)=delete |
Object (Object &&)=delete | |
Object & | operator= (Object &&)=delete |
Public Attributes | |
std::string | mPath |
Property 'Path': the path to the image on disk. More... | |
![]() | |
SurfaceDescriptor | mSurfaceDescriptor |
Signal | mBitmapUpdated |
![]() | |
std::string | mID |
Property: 'mID' unique name of the object. Used as an identifier by the system. More... | |
Additional Inherited Members | |
![]() | |
static bool | isIDProperty (rtti::Instance &object, const rtti::Property &property) |
A bitmap resource that is loaded from file There is no GPU data associated with this object, only the pixel data extracted from the image on disk. After a successful load the bitmap properties will match that of the loaded image.
|
overridevirtual |
Loads the image pointed to by the path property Calls Bitmap::initFromFile(path, error)
errorState | contains the error when loading fails |
Reimplemented from Bitmap.
std::string mPath |
Property 'Path': the path to the image on disk.