- v8::Local<v8::Value> fittingModeValue = optionsObject->Get( v8::String::NewFromUtf8( isolate, "fittingMode" ) );
- if( fittingModeValue->IsUint32() )
- {
- fittingMode = static_cast<FittingMode::Type>( fittingModeValue->ToUint32()->Value() );
- }
-
- v8::Local<v8::Value> samplingModeValue = optionsObject->Get( v8::String::NewFromUtf8( isolate, "samplingMode" ) );
- if( samplingModeValue->IsUint32() )
- {
- samplingMode = static_cast<SamplingMode::Type>( samplingModeValue->ToUint32()->Value() );
- }
-
- v8::Local<v8::Value> orientationCorrectionValue = optionsObject->Get( v8::String::NewFromUtf8( isolate, "orientationCorrection" ) );
- if( orientationCorrectionValue->IsBoolean() )
- {
- orientationCorrection = orientationCorrectionValue->ToBoolean()->Value();
- }
-
- v8::Local<v8::Value> releasePolicyValue = optionsObject->Get( v8::String::NewFromUtf8( isolate, "releasePolicy" ) );
- if( releasePolicyValue->IsUint32() )
- {
- releasePolicy = static_cast<Image::ReleasePolicy>( releasePolicyValue->ToUint32()->Value() );
- }
-
- v8::Local<v8::Value> loadPolicyValue = optionsObject->Get( v8::String::NewFromUtf8( isolate, "loadPolicy" ) );
- if( loadPolicyValue->IsUint32() )
- {
- loadPolicy = static_cast< ResourceImage::LoadPolicy >( loadPolicyValue->ToUint32()->Value());
- }
-
- return ResourceImage::New( url, loadPolicy, releasePolicy, dimensions, fittingMode, samplingMode, orientationCorrection );
-}
-
-/**
- * Get the load policy
- *
- * @method getLoadPolicy
- * @for ResourceImage
- * @return {Integer} load policy either dali.IMAGE_LOAD_POLICY_ON_DEMAND or dali.IMAGE_LOAD_POLICY_IMMEDIATE
- */
-void ResourceImageApi::GetLoadPolicy( const v8::FunctionCallbackInfo< v8::Value >& args )
-{
- v8::Isolate* isolate = args.GetIsolate();
- v8::HandleScope handleScope( isolate );
-
- ResourceImage image = GetResourceImage( isolate, args );
-
- args.GetReturnValue().Set( v8::Integer::New( isolate, image.GetLoadPolicy() ) );