Tizen Native API
5.5
|
BufferImage represents an image resource as a pixel data buffer. More...
Public Member Functions | |
BufferImage () DALI_DEPRECATED_API | |
Constructor which creates an uninitialized BufferImage object. | |
~BufferImage () DALI_DEPRECATED_API | |
Destructor. | |
BufferImage (const BufferImage &handle) DALI_DEPRECATED_API | |
This copy constructor is required for (smart) pointer semantics. | |
BufferImage & | operator= (const BufferImage &rhs) DALI_DEPRECATED_API |
This assignment operator is required for (smart) pointer semantics. | |
PixelBuffer * | GetBuffer () DALI_DEPRECATED_API |
Returns the pixel buffer of the Image. | |
uint32_t | GetBufferSize () const DALI_DEPRECATED_API |
Returns buffer size in bytes. | |
uint32_t | GetBufferStride () const DALI_DEPRECATED_API |
Returns buffer stride (in bytes). | |
Pixel::Format | GetPixelFormat () const DALI_DEPRECATED_API |
Returns the pixel format of the contained buffer. | |
void | Update () DALI_DEPRECATED_API |
Inform Dali that the contents of the buffer have changed. | |
void | Update (RectArea updateArea) DALI_DEPRECATED_API |
bool | IsDataExternal () const DALI_DEPRECATED_API |
Returns whether BufferImage uses external data source or not. | |
Static Public Member Functions | |
static BufferImage | New (uint32_t width, uint32_t height, Pixel::Format pixelformat=Pixel::RGBA8888) DALI_DEPRECATED_API |
Creates a new BufferImage. | |
static BufferImage | New (PixelBuffer *pixelBuffer, uint32_t width, uint32_t height, Pixel::Format pixelFormat=Pixel::RGBA8888, uint32_t stride=0) DALI_DEPRECATED_API |
Creates a new BufferImage, which uses an external data source. | |
static BufferImage | DownCast (BaseHandle handle) DALI_DEPRECATED_API |
Downcasts a handle to BufferImage handle. | |
static const BufferImage | WHITE () DALI_DEPRECATED_API |
White pixel as image data. |
BufferImage represents an image resource as a pixel data buffer.
Its pixel buffer data is provided by the application developer.
If the pixel format of the pixel buffer contains an alpha channel, then the image is considered to be have transparent pixels without regard for the actual content of the channel, and will be blended.
Constructor which creates an uninitialized BufferImage object.
Use BufferImage::New(...) to create an initialized object.
Destructor.
This is non-virtual since derived Handle types must not contain data or virtual methods.
Dali::BufferImage::BufferImage | ( | const BufferImage & | handle | ) |
This copy constructor is required for (smart) pointer semantics.
[in] | handle | A reference to the copied handle |
static BufferImage Dali::BufferImage::DownCast | ( | BaseHandle | handle | ) | [static] |
Downcasts a handle to BufferImage handle.
If the handle points to a BufferImage, the downcast produces valid handle. If not, the returned handle is left uninitialized.
[in] | handle | Handle to an object |
Reimplemented from Dali::Image.
Returns the pixel buffer of the Image.
The application can write to the buffer to modify its contents.
Whilst the image is on stage, after writing to the buffer the application should call Update() and wait for the Image::UploadedSignal() method before writing again.
uint32_t Dali::BufferImage::GetBufferSize | ( | ) | const |
Returns buffer size in bytes.
uint32_t Dali::BufferImage::GetBufferStride | ( | ) | const |
Returns buffer stride (in bytes).
Returns the pixel format of the contained buffer.
bool Dali::BufferImage::IsDataExternal | ( | ) | const |
Returns whether BufferImage uses external data source or not.
If not, dali holds ownership of the PixelBuffer, otherwise the application is responsible for freeing it.
The application must not destroy an external PixelBuffer on a staged image if it has called Update() and hasn't received a Image::UploadedSignal.
true
if application owns data, false
otherwise static BufferImage Dali::BufferImage::New | ( | uint32_t | width, |
uint32_t | height, | ||
Pixel::Format | pixelformat = Pixel::RGBA8888 |
||
) | [static] |
Creates a new BufferImage.
Also a pixel buffer for image data is allocated. Dali has ownership of the buffer. For better performance and portability use power of two dimensions. The maximum size of the image is limited by GL_MAX_TEXTURE_SIZE.
[in] | width | Image width in pixels |
[in] | height | Image height in pixels |
[in] | pixelformat | The pixel format (rgba 32 bit by default) |
static BufferImage Dali::BufferImage::New | ( | PixelBuffer * | pixelBuffer, |
uint32_t | width, | ||
uint32_t | height, | ||
Pixel::Format | pixelFormat = Pixel::RGBA8888 , |
||
uint32_t | stride = 0 |
||
) | [static] |
Creates a new BufferImage, which uses an external data source.
The PixelBuffer has to be allocated by application.
The application holds ownership of the buffer. It must not destroy the PixelBuffer on a staged image if it has called Update() and hasn't received a Image::UploadedSignal, or if it has just added it to the stage and has not received a Image::UploadedSignal.
For better performance and portability use power of two dimensions. The maximum size of the image is limited by GL_MAX_TEXTURE_SIZE.
[in] | pixelBuffer | Pixel buffer has to be allocated by application |
[in] | width | Image width in pixels |
[in] | height | Image height in pixels |
[in] | pixelFormat | The pixel format (rgba 32 bit by default) |
[in] | stride | The internal stride of the pixelbuffer in pixels |
BufferImage& Dali::BufferImage::operator= | ( | const BufferImage & | rhs | ) |
This assignment operator is required for (smart) pointer semantics.
[in] | rhs | A reference to the copied handle |
void Dali::BufferImage::Update | ( | ) |
Inform Dali that the contents of the buffer have changed.
Image::UploadedSignal will be sent in response if the image is on stage and the image data has been successfully copied to graphics memory. To avoid visual tearing, the application should wait for the Image::UploadedSignal before modifying the data.
The application must not destroy an external PixelBuffer on a staged image after calling this method until the Image::UploadedSignal has been successfully received.
void Dali::BufferImage::Update | ( | RectArea | updateArea | ) |
Inform Dali that the contents of the buffer have changed.
Image::UploadedSignal will be sent in response if the image is on stage and the image data has been successfully copied to graphics memory. To avoid visual tearing, the application should wait for the Image::UploadedSignal before modifying the data.
The application must not destroy an external PixelBuffer on a staged image after calling this method until the Image::UploadedSignal has been successfully received.
[in] | updateArea | Area that has changed in buffer |
static const BufferImage Dali::BufferImage::WHITE | ( | ) | [static] |
White pixel as image data.
Can be used to create solid color actors.