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(Canvas& canvas)
99 // Sets the background color of the canvas and then clears it
100 canvas.SetBackgroundColor(Color(0xFF, 0xFF, 0xFF));
103 // Sets the foreground color of this canvas
104 canvas.SetForegroundColor(Color::GetColor(COLOR_ID_GREEN));
107 canvas.DrawEllipse(Rectangle(50, 50, 50, 80));
108 canvas.DrawLine(Point(100, 100), Point(150, 150));
109 canvas.DrawArc(Rectangle(10, 200, 50, 50), 30, 60, ARC_STYLE_PIE);
112 // Creates an instance of Font
114 r = font.Construct(FONT_STYLE_PLAIN, 32);
120 // Sets the canvas font
121 canvas.SetFont(font);
124 // Draws text at the specified location
125 canvas.DrawText(Point(50, 50), String(L"Hello World"));
127 // Shows the drawing as a result on the device screen
139 namespace Tizen { namespace Graphics
142 } } // Tizen::Graphics
144 #endif // _FGRAPHICS_H_