Tizen Native API
|
Dali::NativeImageSource Class Reference
Used for displaying native images. More...
Inheritance diagram for Dali::NativeImageSource:
Public Types | |
enum | ColorDepth |
When creating a native image the color depth has to be specified. More... | |
Public Member Functions | |
Any | GetNativeImageSource () |
Retrieve the internal native image. | |
bool | GetPixels (std::vector< unsigned char > &pixbuf, unsigned int &width, unsigned int &height, Pixel::Format &pixelFormat) const |
Get a copy of the pixels used by NativeImageSource. | |
bool | EncodeToFile (const std::string &filename) const |
Convert the current pixel contents to either a JPEG or PNG format and write that to the filesytem. | |
Static Public Member Functions | |
static NativeImageSourcePtr | New (unsigned int width, unsigned int height, ColorDepth depth) |
Create a new NativeImageSource. | |
static NativeImageSourcePtr | New (Any nativeImageSource) |
Create a new NativeImageSource from an existing native image. |
Detailed Description
Used for displaying native images.
The native image source can be created internally or externally by X11 or ECORE-X11.
- Since :
- 2.4
Member Enumeration Documentation
When creating a native image the color depth has to be specified.
- Since :
- 2.4
Member Function Documentation
bool Dali::NativeImageSource::EncodeToFile | ( | const std::string & | filename | ) | const |
Convert the current pixel contents to either a JPEG or PNG format and write that to the filesytem.
- Since :
- 2.4
- Parameters:
-
[in] filename Identify the filesytem location at which to write the encoded image. The extension determines the encoding used. The two valid encoding are (".jpeg"|".jpg") and ".png".
- Returns:
- True if the pixels were written, and false otherwise.
Retrieve the internal native image.
- Since :
- 2.4
- Returns:
- Any object containing the internal native image
bool Dali::NativeImageSource::GetPixels | ( | std::vector< unsigned char > & | pixbuf, |
unsigned int & | width, | ||
unsigned int & | height, | ||
Pixel::Format & | pixelFormat | ||
) | const |
Get a copy of the pixels used by NativeImageSource.
This is only supported for 24 bit RGB and 32 bit RGBA internal formats (COLOR_DEPTH_24 and COLOR_DEPTH_32).
- Since :
- 2.4
- Parameters:
-
[out] pixbuf a vector to store the pixels in [out] width The width of image [out] height The height of image [out] pixelFormat pixel format used by image
- Returns:
- True if the pixels were gotten, and false otherwise.
static NativeImageSourcePtr Dali::NativeImageSource::New | ( | unsigned int | width, |
unsigned int | height, | ||
ColorDepth | depth | ||
) | [static] |
Create a new NativeImageSource.
Depending on hardware the width and height may have to be a power of two.
- Since :
- 2.4
- Parameters:
-
[in] width The width of the image [in] height The height of the image [in] depth color depth of the image
- Returns:
- A smart-pointer to a newly allocated image
static NativeImageSourcePtr Dali::NativeImageSource::New | ( | Any | nativeImageSource | ) | [static] |
Create a new NativeImageSource from an existing native image.
- Since :
- 2.4
- Parameters:
-
[in] nativeImageSource must be a X11 pixmap or a Ecore_X_Pixmap now.
- Returns:
- A smart-pointer to a newly allocated image