Tizen Native API
6.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. |
Detailed Description
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.
- Since:
- 3.0, DALi version 1.1.4
- See also:
- NativeImage
Member Enumeration Documentation
Enumeration for the instance when creating a native image, the color depth has to be specified.
- Since:
- 3.0, DALi version 1.0.0
- Enumerator:
Member Function Documentation
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.
- Since:
- 3.0, DALi version 1.0.0
- Parameters:
-
[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".
- Returns:
true
if the pixels were written, andfalse
otherwise
Retrieves the internal native image.
- Since:
- 3.0, DALi version 1.0.0
- Returns:
- Any object containing the internal native image source
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).
- Since:
- 3.0, DALi version 1.0.0
- 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, andfalse
otherwise
bool Dali::NativeImageSource::IsColorDepthSupported | ( | ColorDepth | colorDepth | ) |
Checks if the specified color depth is supported.
- Since:
- 3.0, DALi version 1.1.34
- Parameters:
-
[in] colorDepth The color depth to check
- Returns:
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.
- Since:
- 3.0, DALi version 1.0.0
- 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] |
Creates a new NativeImageSource from an existing native image source.
- Since:
- 3.0, DALi version 1.0.0
- Parameters:
-
[in] nativeImageSource NativeImageSource must be a any handle with native image source
- Returns:
- A smart-pointer to a newly allocated image
- See also:
- NativeImageInterface
void Dali::NativeImageSource::SetSource | ( | Any | source | ) |
Sets an existing source.
- Since:
- 3.0, DALi version 1.1.19
- Parameters:
-
[in] source Any handle with the source