Tizen 2.1 base
[framework/osp/uifw.git] / src / graphics / effect / FGrp_Effect.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Flora License, Version 1.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 //     http://floralicense.org/license/
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an AS IS BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17
18 /*
19  * @file        FGrp_Effect.h
20  * @brief       This is the header file for internal utility class.
21  *
22  */
23
24 #ifndef _FGRP_INTERNAL_EFFECT_H_
25 #define _FGRP_INTERNAL_EFFECT_H_
26
27
28 #include <FBaseDataType.h>
29
30 #include "../util/FGrp_UtilTemplate.h"
31 #include "../util/FGrp_UtilScratchpad.h"
32 #include "../util/FGrp_UtilPixmap.h"
33
34
35 namespace Tizen { namespace Graphics
36 {
37
38 namespace _Effect
39 {
40
41 enum Flip
42 {
43         FLIP_VERTICAL,
44         FLIP_HORIZONTAL
45 };
46
47 enum Rop
48 {
49         ROP_COPY,
50         ROP_ALPHABLEND
51 };
52
53 enum DefaultFilter
54 {
55         DEFAULT_FILTER_GOOD,
56         DEFAULT_FILTER_BEST
57 };
58
59 struct RotateDesc
60 {
61         int angle;
62         int xOffset;
63         int yOffset;
64 };
65
66 bool ScaleImage(Tizen::Graphics::_Util::Pixmap& dstImage, long xDest, long yDest, long wDest, long hDest, const Tizen::Graphics::_Util::Pixmap& srcImage, Rop rop = ROP_ALPHABLEND);
67 bool ScaleImageInterpolation(Tizen::Graphics::_Util::Pixmap& dstImage, long xDest, long yDest, long wDest, long hDest, const Tizen::Graphics::_Util::Pixmap& srcImage, DefaultFilter defaultFilter);
68
69 bool RotateImage(Tizen::Graphics::_Util::Pixmap& dstImage, long xDest, long yDest, const Tizen::Graphics::_Util::Pixmap& srcImage, const RotateDesc& rotateDesc, long constantAlpha);
70
71 bool DrawImageWithAlpha(Tizen::Graphics::_Util::Pixmap& dstImage, long xDest, long yDest, const Tizen::Graphics::_Util::Pixmap& srcImage, long constantAlpha);
72
73 bool IsNinePatchedBitmap(const Tizen::Graphics::_Util::Pixmap& dstImage);
74
75 bool IsOpaqueAllOver(const Tizen::Graphics::_Util::Pixmap& dstImage);
76
77 Tizen::Graphics::_Util::Pixmap* GetFlippedImage(const Tizen::Graphics::_Util::Pixmap& srcImage, Flip flip);
78
79 } // _Effect
80
81 }} // Tizen::Graphics
82
83 #endif // #ifndef _FGRP_INTERNAL_EFFECT_H_