Tizen 2.0 Release
[profile/ivi/libscl-ui.git] / scl / gwes / gtk / sclgraphics-cairo.h
1 /*
2  * Copyright 2012-2013 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Flora License, Version 1.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
7  *
8  * http://floralicense.org/license/
9  *
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.
15  *
16  */
17
18 #include "sclgraphics.h"
19 #include <gtk/gtk.h>
20
21 #ifndef __SCL_GRAPHICS_CAIRO_H__
22 #define __SCL_GRAPHICS_CAIRO_H__
23
24 namespace scl
25 {
26 class CSCLGraphicsImplCairo : public CSCLGraphicsImpl
27 {
28 public :
29     CSCLGraphicsImplCairo();
30     ~CSCLGraphicsImplCairo();
31
32     void draw_image(sclwindow window, const scldrawctx drawCtx, sclchar* imgPath, sclint destX, sclint destY,
33                                   sclint destWidth, sclint destHeight, sclint srcX, sclint srcY, sclint srcWidth, sclint srcHeight);
34     void draw_text(sclwindow window, const scldrawctx drawCtx, const SclFontInfo& fontinfo, const SclColor& color,
35                    const sclchar *str, sclint posx, sclint posy, sclint width, sclint height,
36                    SCLLabelAlignment align, sclbyte padding);
37     sclimage load_image(const sclchar* imgPath);
38     void unload_image(sclimage imgData);
39     scldrawctx begin_paint(const sclwindow window, const sclboolean forcedraw = FALSE);
40     void end_paint(const sclwindow window, scldrawctx drawCtx);
41     sclfont create_font(const SclFontInfo& info);
42     void destroy_font(sclfont font);
43     void draw_rectangle(sclwindow window, const scldrawctx drawCtx, scldouble posx, scldouble posy,
44                         scldouble width, scldouble height, const scldouble lineWidth, const SclColor& lineColor, sclboolean fill, const SclColor& fillColor, scldouble radius, sclfloat alpha);
45     SclSize get_image_size(sclchar* imgPath);
46 private:
47 };
48 } /* End of scl namespace */
49 #endif __SCL_GRAPHICS_CAIRO_H__