| 
    Tizen Native API
    5.5
    
   
   | 
  
  
  
 
Used for displaying native images. More...
  
 Public Types | |
| enum | ColorDepth | 
| Enumeration for the instance when creating a native image, the color depth has to be specified.  More... | |
Public Member Functions | |
| Any | GetNativeImageSource () | 
| Retrieves the internal native image.   | |
| bool | GetPixels (std::vector< unsigned char > &pixbuf, unsigned int &width, unsigned int &height, Pixel::Format &pixelFormat) const | 
| Gets a copy of the pixels used by NativeImageSource.   | |
| bool | EncodeToFile (const std::string &filename) const | 
| Converts the current pixel contents to either a JPEG or PNG format and write that to the filesystem.   | |
| void | SetSource (Any source) | 
| Sets an existing source.   | |
| bool | IsColorDepthSupported (ColorDepth colorDepth) | 
| Checks if the specified color depth is supported.   | |
Static Public Member Functions | |
| static NativeImageSourcePtr | New (unsigned int width, unsigned int height, ColorDepth depth) | 
| Creates a new NativeImageSource.   | |
| static NativeImageSourcePtr | New (Any nativeImageSource) | 
| Creates a new NativeImageSource from an existing native image source.   | |
Used for displaying native images.
NativeImageSource can be created internally or externally by native image source. NativeImage is a platform specific way of providing pixel data to the GPU for rendering, for example via an EGL image.
Enumeration for the instance when creating a native image, the color depth has to be specified.
| bool Dali::NativeImageSource::EncodeToFile | ( | const std::string & | filename | ) | const | 
Converts the current pixel contents to either a JPEG or PNG format and write that to the filesystem.
| [in] | filename | Identify the filesystem location at which to write the encoded image. The extension determines the encoding used. The two valid encoding are (".jpeg"|".jpg") and ".png". | 
true if the pixels were written, and false otherwise Retrieves the internal native image.
| bool Dali::NativeImageSource::GetPixels | ( | std::vector< unsigned char > & | pixbuf, | 
| unsigned int & | width, | ||
| unsigned int & | height, | ||
| Pixel::Format & | pixelFormat | ||
| ) | const | 
Gets 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).
| [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 | 
true if the pixels were gotten, and false otherwise | bool Dali::NativeImageSource::IsColorDepthSupported | ( | ColorDepth | colorDepth | ) | 
Checks if the specified color depth is supported.
| [in] | colorDepth | The color depth to check | 
true if colorDepth is supported, false otherwise | static NativeImageSourcePtr Dali::NativeImageSource::New | ( | unsigned int | width, | 
| unsigned int | height, | ||
| ColorDepth | depth | ||
| ) |  [static] | 
        
Creates a new NativeImageSource.
Depending on hardware, the width and height may have to be a power of two.
| [in] | width | The width of the image | 
| [in] | height | The height of the image | 
| [in] | depth | color depth of the image | 
| static NativeImageSourcePtr Dali::NativeImageSource::New | ( | Any | nativeImageSource | ) |  [static] | 
        
Creates a new NativeImageSource from an existing native image source.
| [in] | nativeImageSource | NativeImageSource must be a any handle with native image source | 
| void Dali::NativeImageSource::SetSource | ( | Any | source | ) | 
Sets an existing source.
| [in] | source | Any handle with the source |