2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
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
9 // http://floralicense.org/license/
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.
19 * @file FGrp_CanvasCairo.h
20 * @brief This is the header file for the cairo solution.
24 #ifndef _FGRP_INTERNAL_CANVASCAIRO_H_
25 #define _FGRP_INTERNAL_CANVASCAIRO_H_
29 #include "../util/FGrp_UtilType.h"
30 #include "../util/FGrp_UtilPixmap.h"
33 namespace Tizen { namespace Graphics
60 void SetColor(cairo_t* pCairo, unsigned long composedColor);
63 void SetClip(cairo_t* pCairo, T x, T y, T width, T height);
65 void ResetClip(cairo_t* pCairo);
67 void SetDash(cairo_t* pCairo, double* pDashes, int dashCount, double offset);
69 void ResetDash(cairo_t* pCairo);
72 void DrawRoundRectangle(cairo_t* pCairo, T lineWidth, unsigned long composedColor, const _Util::Rectangle<double>& rect, const _Util::Dimension<double>& arcDim);
74 void FillRoundRectangle(cairo_t* pCairo, unsigned long composedColor, const _Util::Rectangle<double>& rect, const _Util::Dimension<double>& arcDim);
77 void Drawline(cairo_t* pCairo, T lineWidth, unsigned long composedColor, const _Util::Point<double> point[], int numPoint);
80 void DrawRectangle(cairo_t* pCairo, T lineWidth, unsigned long composedColor, const _Util::Rectangle<double>& rect);
82 void FillRectangle(cairo_t* pCairo, unsigned long composedColor, const _Util::Rectangle<double>& rect);
85 void DrawPolyline(cairo_t* pCairo, T lineWidth, unsigned long composedColor, const _Util::Point<double> point[], int numPoint);
88 void DrawPolygon(cairo_t* pCairo, T lineWidth, unsigned long composedColor, const _Util::Point<double> point[], int numPoint);
90 void FillPolygon(cairo_t* pCairo, unsigned long composedColor, const _Util::Point<double> point[], int numPoint);
93 void DrawEllipse(cairo_t* pCairo, T lineWidth, unsigned long composedColor, const _Util::Rectangle<double>& bounds);
95 void FillEllipse(cairo_t* pCairo, unsigned long composedColor, const _Util::Rectangle<double>& bounds);
98 void DrawArc(cairo_t* pCairo, T lineWidth, unsigned long composedColor, const _Util::Rectangle<double>& bounds, double startAngle, double endAngle, DrawArcStyle arcType);
100 void FillArc(cairo_t* pCairo, unsigned long composedColor, const _Util::Rectangle<double>& bounds, double startAngle, double endAngle, FillArcStyle arcType);
102 bool ScalePixmap(_Util::Pixmap& dstImage, const _Util::Pixmap& srcImage, PatternFilter patternFilter);
104 } // Tizen::Graphics::_Cairo
106 }} // Tizen::Graphics
108 #endif // _FGRP_INTERNAL_CANVASCAIRO_H_