1.Uncropped image area is dimmed 2.Crash in crop is fixed
authorchitta ranjan <chitta.rs@samsung.com>
Wed, 10 Apr 2013 02:50:05 +0000 (11:50 +0900)
committerchitta ranjan <chitta.rs@samsung.com>
Wed, 10 Apr 2013 02:50:05 +0000 (11:50 +0900)
Change-Id: I109ffda1286dd710310a063bbe788064fef96a20
Signed-off-by: chitta ranjan <chitta.rs@samsung.com>
inc/IvImageCropForm.h
src/IvImageCropForm.cpp
src/IvImageViewerForm.cpp
src/IvImageViewerPresentationModel.cpp

index c04217a..976bf8f 100644 (file)
@@ -85,8 +85,6 @@ public:
 
 private:
        static const int IDA_BUTTON_SAVE = 105;
-       static const int IDA_BUTTON_CW_ROTATION = 102;
-       static const int IDA_BUTTON_CCW_ROATTION = 103;
        static const int IDA_BUTTON_CANCEL = 104;
 
        Tizen::Graphics::Rectangle __cropBox;
index 17a0e07..103e710 100644 (file)
@@ -41,6 +41,7 @@ using namespace Tizen::Ui::Controls;
 using namespace Tizen::Ui::Scenes;
 
 static const unsigned int CROP_BOX_RECTANGLE_COLOR = Color32<199, 110, 6>::Value;
+static const unsigned int UNCROPPED_IMAGE_COLOR = Color32<139, 137, 137, 100>::Value;
 static const int CROP_BOX_LINE_WIDTH = 5;
 
 ImageCropForm::ImageCropForm(void)
@@ -90,8 +91,6 @@ ImageCropForm::OnInitializing(void)
        AppResource* pAppResource = null;
        Bitmap* pSaveButtonBitmap = null;
        Bitmap* pCancelButtonBitmap  = null;
-       Bitmap* pCWRotationButtonBitmap  = null;
-       Bitmap* pCCWRotationButtonBitmap  = null;
        Panel* pPanel = null;
        Button* pSaveButton = null;
        Button* pCancelButton = null;
@@ -100,8 +99,6 @@ ImageCropForm::OnInitializing(void)
        {
                pSaveButtonBitmap = pAppResource->GetBitmapN(IDB_IMAGE_CROP_FORM_SAVE_ICON);
                pCancelButtonBitmap = pAppResource->GetBitmapN(IDB_IMAGE_CROP_FORM_CANCEL_ICON);
-               pCWRotationButtonBitmap = pAppResource->GetBitmapN(IDB_IMAGE_CROP_FORM_CW_ROTATION_ICON);
-               pCCWRotationButtonBitmap = pAppResource->GetBitmapN(IDB_IMAGE_CROP_FORM_CCW_ROTATION_ICON);
                __pRectangleBitmap = pAppResource->GetBitmapN(IDB_IMAGE_CROP_RECTANGLE);
        }
 
@@ -140,8 +137,6 @@ ImageCropForm::OnInitializing(void)
        AddOrientationEventListener(*this);
        __pPresentationModel->AddFileUpdateListener(this);
 
-       delete pCWRotationButtonBitmap;
-       delete pCCWRotationButtonBitmap;
        return r;
 }
 
@@ -259,6 +254,10 @@ ImageCropForm::OnDraw(void)
                r = __pCanvas->DrawBitmap(Rectangle(__cropBox.x + __cropBox.width - (CROP_RECTANGLE_HEIGHT / 2), __cropBox.y - (CROP_RECTANGLE_HEIGHT / 2), CROP_RECTANGLE_HEIGHT, CROP_RECTANGLE_HEIGHT), *__pRectangleBitmap); // Top Right Rectangle
                r = __pCanvas->DrawBitmap(Rectangle(__cropBox.x + __cropBox.width - (CROP_RECTANGLE_HEIGHT / 2), (__cropBox.y + __cropBox.height - (CROP_RECTANGLE_HEIGHT / 2)), CROP_RECTANGLE_HEIGHT, CROP_RECTANGLE_HEIGHT), *__pRectangleBitmap); // Bottom Right Rectangle
                r = __pCanvas->DrawBitmap(Rectangle(__cropBox.x - (CROP_RECTANGLE_HEIGHT / 2), (__cropBox.y + __cropBox.height - (CROP_RECTANGLE_HEIGHT / 2)), CROP_RECTANGLE_HEIGHT, CROP_RECTANGLE_HEIGHT), *__pRectangleBitmap); // Bottom Left Rectangle
+               r = __pCanvas->FillRectangle(UNCROPPED_IMAGE_COLOR, Rectangle(__imageBox.x, __imageBox.y, __imageBox.width, (__cropBox.y - __imageBox.y)));
+               r = __pCanvas->FillRectangle(UNCROPPED_IMAGE_COLOR, Rectangle(__imageBox.x, (__cropBox.y + __cropBox.height), __imageBox.width, ((__imageBox.y + __imageBox.height) - (__cropBox.y + __cropBox.height))));
+               r = __pCanvas->FillRectangle(UNCROPPED_IMAGE_COLOR, Rectangle(__imageBox.x, __cropBox.y, (__cropBox.x - __imageBox.x), __cropBox.height));
+               r = __pCanvas->FillRectangle(UNCROPPED_IMAGE_COLOR, Rectangle((__cropBox.x + __cropBox.width), __cropBox.y, ((__imageBox.x + __imageBox.width) - (__cropBox.x + __cropBox.width)), __cropBox.height));
        }
        AppLogDebug("EXIT");
        return r;
index 3dcd141..1739984 100644 (file)
@@ -778,6 +778,8 @@ ImageViewerForm::InitializeContextMenuMore(void)
                __pContextMenuMore->AddItem(ResourceManager::GetString(L"IDS_IV_OPT_SET_AS"),
                                ACTION_ID_CONTEXTMENU_SET_AS);
                __pContextMenuMore->AddItem(ResourceManager::GetString(L"IDS_IV_BODY_CROP"), ACTION_ID_FOOTER_BUTTON_CROP);
+               __pContextMenuMore->AddItem(ResourceManager::GetString(L"IDS_IV_OPT_ROTATE_RIGHT"), ACTION_ID_FOOTER_BUTTON_ROTATE_RIGHT);
+               __pContextMenuMore->AddItem(ResourceManager::GetString(L"IDS_IV_OPT_ROTATE_LEFT"), ACTION_ID_FOOTER_BUTTON_ROTATE_LEFT);
        }
 
        if (__pGallery->GetItemCount() > 1)
index e2a9f22..d661967 100644 (file)
@@ -583,6 +583,7 @@ void ImageViewerPresentationModel::OnContentDirectoryScanCompleted(const Tizen::
        {
                __ivTriggeredEvent = false;
        }
+       __ivTriggeredDeleteEvent = false;
        AppLogDebug("Exit");
 }