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.
20 * @brief This is the header file for the %Graphics namespace.
22 * This header file contains the declarations of the %Graphics namespace.
29 #include "FGrpPoint.h"
30 #include "FGrpFloatPoint.h"
32 #include "FGrpDimension.h"
33 #include "FGrpFloatDimension.h"
35 #include "FGrpRectangle.h"
36 #include "FGrpFloatRectangle.h"
38 #include "FGrpFloatMatrix4.h"
39 #include "FGrpFloatVector4.h"
40 #include "FGrpFloatPoint3.h"
42 #include "FGrpColor.h"
44 #include "FGrpPixelFormat.h"
46 #include "FGrpBufferInfo.h"
48 #include "FGrpBitmapCommon.h"
49 #include "FGrpBitmap.h"
51 #include "FGrpCanvasCommon.h"
52 #include "FGrpCanvas.h"
54 #include "FGrpFontCommon.h"
57 #include "FGrpTextElement.h"
58 #include "FGrpEnrichedText.h"
60 #include "FGrpCoordinateSystem.h"
63 * @namespace Tizen::Graphics
64 * @brief This namespace contains classes for drawing-related functionalities.
68 * @remarks @b Header @b %file: @b \#include @b <FGraphics.h> @n
69 * @b Library : @b osp-uifw
71 * The %Graphics namespace provides enhanced two-dimensional graphics,
72 * text, and imaging capabilities.
73 * It supports comprehensive features for rendering geometric primitives, text, and images
74 * in a flexible framework for developing rich user
75 * interfaces, sophisticated drawing applications, and image editors.
76 * This namespace provides additional features such as Bitmap, Font, and Color to enhance the rendered graphics.
77 * The user can also use basic data types, Point, Rectangle, and Dimension to construct 2D graphic objects, such as
80 * For more information on the %Graphics namespace features, see <a href="../org.tizen.native.appprogramming/html/guide/graphics/graphics_namespace.htm">Graphics Guide</a>.
82 * The following diagram illustrates the relationships between the classes belonging to the %Graphics namespace.
83 * @image html graphics_namespace_class_relationship.png
85 * The following example demonstrates how to use the %Graphics namespace.
89 #include <FGraphics.h>
91 using namespace Tizen::Base;
92 using namespace Tizen::Graphics;
95 MyClass::GraphicsSample(void)
99 // Creates a canvas instance.
100 Canvas* pCanvas = new Canvas();
101 r = pCanvas->Construct();
108 pCanvas->SetBackgroundColor(Color(0xFF, 0xFF, 0xFF));
109 r = pCanvas->Clear();
115 // Sets the foreground color of this canvas.
116 pCanvas->SetForegroundColor(Color::GetColor(COLOR_ID_GREEN));
119 r = pCanvas->DrawEllipse(Rectangle(50, 50, 50, 80));
125 r = pCanvas->DrawLine(Point(100, 100), Point(150, 150));
131 // Draws a circular arc.
132 r = pCanvas->DrawArc(Rectangle(10, 200, 50, 50), 30, 60, ARC_STYLE_PIE);
139 // Creates a font instance.
141 r = font.Construct(FONT_STYLE_PLAIN, 32);
147 // Sets the font to canvas.
148 r = pCanvas->SetFont(font);
155 // Draws text at the specified location.
156 r = pCanvas->DrawText(Point(50, 50), String(L"Hello World"));
162 // Shows the drawing result on the device screen.
185 namespace Tizen { namespace Graphics
188 } } // Tizen::Graphics
190 #endif // _FGRAPHICS_H_