Dali 3D User Interface Engine
List of all members | Public Types | Public Member Functions | Static Public Member Functions
Dali::Image Class Reference

An Image object represents an image resource that can be used for rendering. More...

#include <image.h>

Inheritance diagram for Dali::Image:
Inheritance graph
[legend]
Collaboration diagram for Dali::Image:
Collaboration graph
[legend]

Public Types

enum  ReleasePolicy { UNUSED, NEVER }
 .3. More...
 
typedef Signal< void(Image) > ImageSignalType
 Type of signal for Image Uploaded. More...
 
- Public Types inherited from Dali::BaseHandle
typedef void(BaseHandle::* BooleanType )() const
 Pointer-to-member type. More...
 

Public Member Functions

 Image ()
 Constructor which creates an empty Image handle. More...
 
 ~Image ()
 Destructor. More...
 
 Image (const Image &handle)
 This copy constructor is required for (smart) pointer semantics. More...
 
Imageoperator= (const Image &rhs)
 This assignment operator is required for (smart) pointer semantics. More...
 
ReleasePolicy GetReleasePolicy () const
 .3 More...
 
unsigned int GetWidth () const
 Returns the width of the image. More...
 
unsigned int GetHeight () const
 Returns the height of the image. More...
 
ImageSignalTypeUploadedSignal ()
 This signal is emitted when the image data gets uploaded to GL. More...
 
DALI_INTERNAL Image (Internal::Image *)
 
- Public Member Functions inherited from Dali::BaseHandle
 BaseHandle (Dali::BaseObject *handle)
 This constructor is used by Dali New() methods. More...
 
 BaseHandle ()
 This constructor provides an uninitialized Dali::BaseHandle. More...
 
 ~BaseHandle ()
 Dali::BaseHandle is intended as a base class. More...
 
 BaseHandle (const BaseHandle &handle)
 This copy constructor is required for (smart) pointer semantics. More...
 
BaseHandleoperator= (const BaseHandle &rhs)
 This assignment operator is required for (smart) pointer semantics. More...
 
template<class T >
bool ConnectSignal (ConnectionTrackerInterface *connectionTracker, const std::string &signalName, const T &functor)
 Connects a void() functor to a specified signal. More...
 
bool DoAction (const std::string &actionName, const Property::Map &attributes)
 Perform action on this object with the given action name and attributes. More...
 
const std::string & GetTypeName () const
 Returns the type name for the Handle. More...
 
bool GetTypeInfo (Dali::TypeInfo &info) const
 Returns the type info for the Handle. More...
 
BaseObjectGetBaseObject ()
 Retrieve the internal Dali resource. More...
 
const BaseObjectGetBaseObject () const
 Retrieve the internal Dali resource. More...
 
void Reset ()
 Resets the handle. More...
 
 operator BooleanType () const
 Converts an handle to a BooleanType. More...
 
bool operator== (const BaseHandle &rhs) const
 Equality operator overload. More...
 
bool operator!= (const BaseHandle &rhs) const
 Inequality operator overload. More...
 
Dali::RefObjectGetObjectPtr () const
 Get the reference counted object pointer. More...
 

Static Public Member Functions

static Image DownCast (BaseHandle handle)
 Downcast an Object handle to Image handle. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Dali::BaseHandle
void ThisIsSaferThanReturningVoidStar () const
 Used by the safe bool idiom. More...
 

Detailed Description

An Image object represents an image resource that can be used for rendering.

Image objects can be shared between Actors. This is practical if you have a visual element on screen which is repeatedly used.

Image objects are responsible for the underlying resource's lifetime. Note: if a resource was shared between Image objects it exists until its last reference is gone.

Signals

Signal Name Method
uploaded UploadedSignal()

.0

Definition at line 55 of file image.h.

Member Typedef Documentation

Type of signal for Image Uploaded.

.0

Definition at line 74 of file image.h.

Member Enumeration Documentation

.3.

Image resource is released as soon as last handle is released. ReleasePolicy controls the way images are deleted from memory. .0

Enumerator
UNUSED 

release resource once image is not in use anymore (eg. all actors using it become offstage). Reload when resource is required again. .0

NEVER 

keep image data for the lifetime of the object. (default) .0

Definition at line 64 of file image.h.

Constructor & Destructor Documentation

Dali::Image::Image ( )

Constructor which creates an empty Image handle.

Use Image::New(...) to create an initialised handle. .0

Definition at line 28 of file image.cpp.

Referenced by DownCast().

Here is the caller graph for this function:

Dali::Image::~Image ( )

Destructor.

This is non-virtual since derived Handle types must not contain data or virtual methods. .0

Definition at line 36 of file image.cpp.

Dali::Image::Image ( const Image handle)

This copy constructor is required for (smart) pointer semantics.

.0

Parameters
[in]handleA reference to the copied handle

Definition at line 40 of file image.cpp.

Dali::Image::Image ( Internal::Image internal)
explicit

Definition at line 32 of file image.cpp.

Member Function Documentation

Image Dali::Image::DownCast ( BaseHandle  handle)
static

Downcast an Object handle to Image handle.

If handle points to a Image object the downcast produces valid handle. If not the returned handle is left uninitialized. .0

Parameters
[in]handleto An object
Returns
handle to a Image object or an uninitialized handle

Definition at line 51 of file image.cpp.

References Dali::BaseHandle::GetObjectPtr(), and Image().

Referenced by UtcDaliImageDownCast().

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned int Dali::Image::GetHeight ( ) const

Returns the height of the image.

Returns either the requested height or the actual loaded height if no specific size was requested.

.0

Returns
height of the image in pixels.

Definition at line 66 of file image.cpp.

References Dali::GetImplementation().

Referenced by Dali::Toolkit::Internal::AtlasManager::Add(), Dali::Toolkit::Text::AtlasRenderer::Impl::AddGlyphs(), Dali::Internal::ImageActor::ClearPixelArea(), Dali::Scripting::CreatePropertyMap(), Dali::Toolkit::Internal::ImageRenderer::DoCreatePropertyMap(), Dali::Toolkit::Internal::NPatchRenderer::GetNaturalSize(), Dali::Toolkit::Internal::ImageRenderer::GetNaturalSize(), Dali::Toolkit::Internal::SuperBlurView::GetNaturalSize(), Dali::NinePatchImage::GetStretchBorders(), Dali::Internal::RenderTask::GetViewport(), Dali::Toolkit::Internal::NPatchRenderer::InitializeFromBrokenImage(), Dali::Toolkit::Internal::NPatchRenderer::InitializeFromImage(), Dali::Toolkit::Text::Decorator::Impl::SetHandleImage(), Dali::Toolkit::Internal::ImageView::SetImage(), Dali::Internal::ImageActor::SetImage(), anonymous_namespace{utc-Dali-ImageView.cpp}::TestImage(), Dali::Internal::ImageActor::UpdateTexureRect(), Dali::Toolkit::Internal::AtlasManager::UploadImage(), UtcDaliFrameBufferImageNew01(), UtcDaliImageActorNaturalPixelAreaSize01(), UtcDaliImageActorNaturalPixelAreaSize02(), UtcDaliImageGetWidthHeight(), UtcDaliScriptingNewImage04P(), UtcDaliScriptingNewImage05P(), UtcDaliScriptingNewImageNegative06(), UtcDaliScriptingNewImageNegative07(), and UtcDaliSuperBlurViewGetBlurredImage().

Here is the call graph for this function:

Here is the caller graph for this function:

Image::ReleasePolicy Dali::Image::GetReleasePolicy ( ) const

.3

Return resource release policy.

.0

Returns
resource release policy

Definition at line 56 of file image.cpp.

References Dali::GetImplementation().

Referenced by Dali::Scripting::CreatePropertyMap(), UtcDaliFrameBufferImageNew03(), UtcDaliImageGetReleasePolicy(), UtcDaliScriptingNewImage03P(), UtcDaliScriptingNewImageNegative04(), and UtcDaliScriptingNewImageNegative05().

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned int Dali::Image::GetWidth ( ) const

Returns the width of the image.

Returns either the requested width or the actual loaded width if no specific size was requested.

.0

Returns
width of the image in pixels.

Definition at line 61 of file image.cpp.

References Dali::GetImplementation().

Referenced by Dali::Toolkit::Internal::AtlasManager::Add(), Dali::Toolkit::Text::AtlasRenderer::Impl::AddGlyphs(), Dali::Internal::ImageActor::ClearPixelArea(), Dali::Scripting::CreatePropertyMap(), Dali::Toolkit::Internal::ImageRenderer::DoCreatePropertyMap(), Dali::Toolkit::Internal::NPatchRenderer::GetNaturalSize(), Dali::Toolkit::Internal::ImageRenderer::GetNaturalSize(), Dali::Toolkit::Internal::SuperBlurView::GetNaturalSize(), Dali::NinePatchImage::GetStretchBorders(), Dali::Internal::RenderTask::GetViewport(), Dali::Toolkit::Internal::NPatchRenderer::InitializeFromBrokenImage(), Dali::Toolkit::Internal::NPatchRenderer::InitializeFromImage(), Dali::Toolkit::Text::Decorator::Impl::SetHandleImage(), Dali::Toolkit::Internal::ImageView::SetImage(), Dali::Internal::ImageActor::SetImage(), anonymous_namespace{utc-Dali-ImageView.cpp}::TestImage(), Dali::Internal::ImageActor::UpdateTexureRect(), Dali::Toolkit::Internal::AtlasManager::UploadImage(), UtcDaliBufferImageGetBuffer(), UtcDaliBufferImageGetBufferSize(), UtcDaliBufferImageNew01(), UtcDaliBufferImageNew02(), UtcDaliBufferImageNewWithPolicy01(), UtcDaliBufferImageNewWithPolicy02(), UtcDaliBufferImageWHITE(), UtcDaliFrameBufferImageNew01(), UtcDaliImageActorNaturalPixelAreaSize01(), UtcDaliImageActorNaturalPixelAreaSize02(), UtcDaliImageGetWidthHeight(), UtcDaliScriptingNewImage04P(), UtcDaliScriptingNewImage05P(), UtcDaliScriptingNewImageNegative06(), UtcDaliScriptingNewImageNegative07(), and UtcDaliSuperBlurViewGetBlurredImage().

Here is the call graph for this function:

Here is the caller graph for this function:

Image & Dali::Image::operator= ( const Image rhs)

This assignment operator is required for (smart) pointer semantics.

.0

Parameters
[in]rhsA reference to the copied handle
Returns
A reference to this

Definition at line 45 of file image.cpp.

References Dali::BaseHandle::operator=().

Here is the call graph for this function:

Image::ImageSignalType & Dali::Image::UploadedSignal ( )

This signal is emitted when the image data gets uploaded to GL.

It Will be sent after an actor using the image is added to the stage, when such a staged image is reloaded, or when a staged BufferImage calls Update(). .0

Returns
A signal object to Connect() with.

Definition at line 71 of file image.cpp.

References Dali::GetImplementation().

Referenced by UtcDaliBufferImageUpdate01(), UtcDaliBufferImageUpdate02(), UtcDaliBufferImageUploadedSignal01(), UtcDaliBufferImageUploadedSignal02(), and UtcDaliImageSignalUploaded().

Here is the call graph for this function:

Here is the caller graph for this function:


The documentation for this class was generated from the following files:
Dali Docs Home
Read more about Dali