void RequestImage(const Tizen::Base::String& filePath) const;
Tizen::Content::ContentId GetFileContentId(const Tizen::Base::String& filePath) const;
- int GetSetterIndex(void) const;
- void SetSetterIndex(const int index);
-
int GetDurationOfSlideShow(void) const;
SlideShowTransitionEffect GetTransitionEffectOfSlideShow(void) const;
Tizen::Base::Collection::ArrayList* __pImageCaches;
long long __contactId;
int __startIndex;
- int __setterIndex;
Tizen::Base::String __type;
int __durationOfSlideShow;
SlideShowTransitionEffect __transitionEffectOfSlideShow;
}
}
}
-// if (pArgs != null)
-// {
-// __sourceFilePath = *(static_cast<String*>(pArgs->GetAt(0)));
-// __cropMode = *(static_cast<String*>(pArgs->GetAt(1)));
-// delete pArgs;
-// }
-// else
-// {
-// __sourceFilePath = __pPresentationModel->GetFilePathAt(0);
-// }
-/* if (__sourceFilePath.IsEmpty() == false && __cropMode.IsEmpty() == false)
- {
- __cropMode.ToLowerCase();
- result r = __imageBuffer.Construct(__sourceFilePath.GetPointer());
- if (r == E_SUCCESS)
- {
- __imageWidth = __imageBuffer.GetWidth();
- __imageHeight = __imageBuffer.GetHeight();
- __pCurrentBitmap = __imageBuffer.GetBitmapN(BITMAP_PIXEL_FORMAT_RGB565, BUFFER_SCALING_AUTO);
- }
- Image img;
- __imageFormat = img.GetImageFormat(__sourceFilePath);
- }*/
- SetValue();
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
}
int curIndex = index;
- if(__shuffle == true && __pShuffledList != null)
+ if (__shuffle == true && __pShuffledList != null)
{
curIndex = __pShuffledList[index];
}
case ACTION_ID_FOOTER_BUTTON_CROP:
{
String filePath;
+ filePath = __pPresentationModel->GetFilePathAt(__pGallery->GetCurrentItemIndex());
+ ImageBuffer imagebuffer;
+ result r = imagebuffer.Construct(filePath);
+ if (r != E_SUCCESS)
+ {
+ return;
+ }
+ int imageWidth = imagebuffer.GetWidth();
+ int imageHeight = imagebuffer.GetHeight();
+ if (imageWidth <= (CROP_RECTANGLE_HEIGHT * 3) || imageHeight <= (CROP_RECTANGLE_HEIGHT * 3))
+ {
+ MessageBox messageBox;
+ String messageText = ResourceManager::GetString(L"IDS_IMGE_POP_IMAGE_IS_TOO_SMALL");
+ messageBox.Construct(L"", messageText, MSGBOX_STYLE_OK, 3000);
+ int modalResult = 0;
+ messageBox.ShowAndWait(modalResult);
+ return;
+ }
String cropMode = L"auto";
ArrayList* pList = new (std::nothrow) ArrayList(SingleObjectDeleter);
- filePath = __pPresentationModel->GetFilePathAt(__pGallery->GetCurrentItemIndex());
pList->Add(new (std::nothrow) String(filePath));
pList->Add(new (std::nothrow) String(cropMode));
pSceneManager->GoForward(ForwardSceneTransition(IDSCN_IMAGE_CROP), pList);
{
Canvas mainCanvas;
mainCanvas.Construct(DUMMY_IMAGE_RECTANGLE);
- mainCanvas.FillRectangle(Color::GetColor(COLOR_ID_WHITE), DUMMY_IMAGE_RECTANGLE);
+ mainCanvas.FillRectangle(Color::GetColor(COLOR_ID_BLACK), DUMMY_IMAGE_RECTANGLE);
pBitmap = new (std::nothrow) Bitmap();
pBitmap->Construct(mainCanvas, DUMMY_IMAGE_RECTANGLE);
}
: __pImageCaches(null)
, __contactId(0)
, __startIndex(0)
- , __setterIndex(0)
, __durationOfSlideShow(0)
, __transitionEffectOfSlideShow(SLIDE_SHOW_TRANSITION_EFFECT_PAGE)
, __pSettingPresentationModel(null)
}
int
-ImageViewerPresentationModel::GetSetterIndex(void) const
-{
- return __setterIndex;
-}
-
-void
-ImageViewerPresentationModel::SetSetterIndex(const int index)
-{
- __setterIndex = index;
-}
-
-int
ImageViewerPresentationModel::GetDurationOfSlideShow(void) const
{
return __durationOfSlideShow;