2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 // Licensed under the Apache License, Version 2.0 (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://www.apache.org/licenses/LICENSE-2.0
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.
17 #ifndef HERE_GRAPHIC_CANVAS_H
18 #define HERE_GRAPHIC_CANVAS_H
20 #include <cairo/cairo.h>
22 #include "common/HereMaps_global.h"
23 #include "base/BaseObject.h"
24 #include "graphic/Color.h"
25 #include "graphic/BufferInfo.h"
26 #include "graphic/FloatPoint.h"
28 TIZEN_MAPS_BEGIN_NAMESPACE
30 class Canvas : public Object
40 typedef std::vector<FloatPoint*> tPoint;
42 virtual ~Canvas(void);
43 result Construct(const BufferInfo& bufferInfo);
44 result FillPolygon(const Color& color, const tPoint& points);
45 result DrawPolyline(const tPoint& points);
46 result SetLineWidth(int width);
47 result SetLineStyle(LineStyleType lineStyle);
48 void SetForegroundColor(const Color& fgColor);
50 void* _pNativeGfxEngine;
52 unsigned long __ComposeColor(unsigned long color32, int opacity);
53 void __SetColor(cairo_t* pCairo, unsigned long composedColor);
54 void __SetLineStyle(cairo_t* pCairo, LineStyleType lineStyle);
56 unsigned long* __pBuffer;
57 unsigned long __fgColor;
59 cairo_operator_t __cairo_operator;
60 Color __fgColorNative;
62 LineStyleType __lineStyle;
65 TIZEN_MAPS_END_NAMESPACE
67 #endif /* HERE_GRAPHIC_CANVAS_H */