Removed GetStretchBorders from NinePatchImage plugin API. 53/48453/4
authorChu Hoang <c.hoang@samsung.com>
Mon, 21 Sep 2015 14:12:53 +0000 (15:12 +0100)
committerChu Hoang <c.hoang@samsung.com>
Wed, 23 Sep 2015 08:20:56 +0000 (09:20 +0100)
Change-Id: Ie10bafad00b6fa6b3ad5a2fcd226122aed98a3ac

plugins/dali-script-v8/src/image/image-wrapper.cpp
plugins/dali-script-v8/src/image/nine-patch-image-api.cpp
plugins/dali-script-v8/src/image/nine-patch-image-api.h

index f4da93e..6206fe4 100644 (file)
@@ -149,7 +149,6 @@ const ImageFunctions ImageFunctionTable[]=
     { "Reload",                  ResourceImageApi::Reload,              RESOURCE_IMAGE_API },
 
     // nine-patch API
-    { "GetStretchBorders",       NinePatchImageApi::GetStretchBorders,        NINE_PATCH_IMAGE_API },
     { "GetChildRectangle",       NinePatchImageApi::GetChildRectangle,        NINE_PATCH_IMAGE_API },
     { "CreateCroppedBufferImage",NinePatchImageApi::CreateCroppedBufferImage, NINE_PATCH_IMAGE_API },
 
index ddef365..ad4a51b 100644 (file)
@@ -99,34 +99,6 @@ Image NinePatchImageApi::New( const v8::FunctionCallbackInfo< v8::Value >& args
   return NinePatchImage::New( url );
 }
 
-
-/**
- * Get the Stretch Borders
- *
- * @method getStretchBorders
- * @for NinePatchImage
- * @return object containing x,y,w,h properties
- */
-void NinePatchImageApi::GetStretchBorders( const v8::FunctionCallbackInfo< v8::Value >& args )
-{
-  v8::Isolate* isolate = args.GetIsolate();
-  v8::HandleScope handleScope( isolate );
-
-  NinePatchImage image = GetNinePatchImage( isolate, args );
-
-  v8::Local<v8::Object> rectObject = v8::Object::New( isolate );
-
-  Vector4 borders = image.GetStretchBorders();
-  // Set the direction
-
-  rectObject->Set( v8::String::NewFromUtf8( isolate, "x" ), v8::Integer::New( isolate,borders.x ) );
-  rectObject->Set( v8::String::NewFromUtf8( isolate, "y" ), v8::Integer::New( isolate,borders.y ) );
-  rectObject->Set( v8::String::NewFromUtf8( isolate, "w" ), v8::Integer::New( isolate,borders.z ) );
-  rectObject->Set( v8::String::NewFromUtf8( isolate, "h" ), v8::Integer::New( isolate,borders.w ) );
-
-  args.GetReturnValue().Set( rectObject );
-}
-
 /**
  * Get the child rectangle
  * @method getChildRectangle
index 3f1cf40..1a51d8c 100644 (file)
@@ -45,7 +45,6 @@ namespace NinePatchImageApi
   /**
    * Ninepatch Image API see nine-patch-image.h for a description
    */
-  void GetStretchBorders( const v8::FunctionCallbackInfo< v8::Value >& args );
   void GetChildRectangle( const v8::FunctionCallbackInfo< v8::Value >& args );
   void CreateCroppedBufferImage( const v8::FunctionCallbackInfo< v8::Value >& args );