Image ret;
std::string filename;
- ResourceImage::LoadPolicy loadPolicy = Dali::Internal::IMAGE_LOAD_POLICY_DEFAULT;
- Image::ReleasePolicy releasePolicy = Dali::Internal::IMAGE_RELEASE_POLICY_DEFAULT;
Internal::ImageAttributes attributes = Internal::ImageAttributes::New();
const Property::Map* map = property.GetMap();
}
}
- value = map->Find( "loadPolicy" );
- if( value )
- {
- std::string policy;
- value->Get( policy );
- // keep default value on error
- GetEnumeration< ResourceImage::LoadPolicy >( policy.c_str(), IMAGE_LOAD_POLICY_TABLE, IMAGE_LOAD_POLICY_TABLE_COUNT, loadPolicy );
- }
-
- value = map->Find( "releasePolicy" );
- if( value )
- {
- std::string policy;
- value->Get( policy );
- // keep default value on error
- GetEnumeration< Image::ReleasePolicy >( policy.c_str(), IMAGE_RELEASE_POLICY_TABLE, IMAGE_RELEASE_POLICY_TABLE_COUNT, releasePolicy );
- }
-
// Width and height can be set individually. Dali derives the unspecified
// dimension from the aspect ratio of the raw image.
int width = 0, height = 0;
{
case RESOURCE_IMAGE :
{
- ret = ResourceImage::New( filename, loadPolicy, releasePolicy,
- ImageDimensions( attributes.GetSize().x, attributes.GetSize().y ),
+ ret = ResourceImage::New( filename, ImageDimensions( attributes.GetSize().x, attributes.GetSize().y ),
attributes.GetScalingMode(), attributes.GetFilterMode(), attributes.GetOrientationCorrection() );
break;
}
{
ret = BufferImage::New( attributes.GetWidth(),
attributes.GetHeight(),
- pixelFormat,
- releasePolicy );
+ pixelFormat );
break;
}
case FRAME_BUFFER_IMAGE :
{
ret = FrameBufferImage::New( attributes.GetWidth(),
attributes.GetHeight(),
- pixelFormat,
- releasePolicy );
+ pixelFormat );
break;
}
}