END_TEST;
}
+int UtcDaliBitmapImageGetPixelFormat(void)
+{
+ TestApplication application;
+
+ tet_infoline("UtcDaliBitmapImageGetPixelFormat");
+
+ // Set pixel format to a non-default
+ BitmapImage image = BitmapImage::New( 16, 16, Pixel::A8 );
+ application.SendNotification();
+ application.Render(16);
+ application.Render(16);
+ application.SendNotification();
+
+ DALI_TEST_CHECK( image.GetPixelFormat() == Pixel::A8 );
+ END_TEST;
+}
+
int UtcDaliBitmapImageIsDataExternal(void)
{
return bufferStride;
}
+Pixel::Format BitmapImage::GetPixelFormat() const
+{
+ Pixel::Format format( Pixel::RGBA8888 );
+
+ Integration::Bitmap* const bitmap = GetBitmap();
+
+ if( bitmap )
+ {
+ format = bitmap->GetPixelFormat();
+ }
+
+ return format;
+}
+
void BitmapImage::Connect()
{
++mConnectionCount;
*/
unsigned int GetBufferStride() const;
+ /**
+ * Get the pixel format
+ * @return The pixel format
+ */
+ Pixel::Format GetPixelFormat() const;
+
protected: // From Resource
/**
* @copydoc Dali::Internal::Image::Connect
return GetImplementation(*this).GetBufferStride();
}
+Pixel::Format BitmapImage::GetPixelFormat() const
+{
+ return GetImplementation(*this).GetPixelFormat();
+}
+
void BitmapImage::Update ()
{
RectArea area;
unsigned int GetBufferStride() const;
/**
+ * @brief Returns the pixel format of the contained bitmap
+ *
+ * @return the pixel format
+ */
+ Pixel::Format GetPixelFormat() const;
+
+ /**
* @brief Inform Dali that the contents of the buffer have changed.
*
* SignalUploaded will be sent in response if the image is on stage