2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 // Licensed under the Flora License, Version 1.1 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
8 // http://floralicense.org/license/
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an AS IS BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
18 * @file MpThumbnailInfo.cpp
19 * @brief This is the implementation file for ThumbnailInfo class.
22 #include <FGraphics.h>
23 #include "MpThumbnailInfo.h"
25 using namespace Tizen::Base;
26 using namespace Tizen::Content;
27 using namespace Tizen::Graphics;
29 ThumbnailInfo::ThumbnailInfo(void)
37 ThumbnailInfo::~ThumbnailInfo(void)
48 ThumbnailInfo::Construct(const Tizen::Content::ContentId& contentId,
49 const Tizen::Graphics::Bitmap& bitmap, Tizen::Base::Object* pParam)
52 __contentId = contentId;
59 ThumbnailInfo::GetContentId(void) const
67 ThumbnailInfo::GetBitmapN(void) const
71 return CloneBitmapN(*__pBitmap);
75 ThumbnailInfo::GetUserParamN(void) const
78 Object* pUserParam = __pParam;
85 ThumbnailInfo::CloneBitmapN(const Bitmap& bitmap) const
88 Bitmap* pResultBitmap = null;
91 Rectangle mainRect(0, 0, bitmap.GetWidth(), bitmap.GetHeight());
93 mainCanvas.Construct(mainRect);
94 mainCanvas.DrawBitmap(mainRect, bitmap);
95 pResultBitmap = new (std::nothrow) Bitmap();
96 pResultBitmap->Construct(mainCanvas, mainRect);