svgtopt/gfx2d/inc/Gfx2dDevice.h
changeset 46 88edb906c587
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/svgtopt/gfx2d/inc/Gfx2dDevice.h	Wed Nov 03 18:56:10 2010 +0200
@@ -0,0 +1,106 @@
+/*
+* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Graphics Extension Library header file
+*
+*/
+
+
+#ifndef GFX2DDEVICE_H
+#define GFX2DDEVICE_H
+
+#include <e32std.h>
+#include <fbs.h>
+#include <bitdev.h>
+
+#include "GfxFloatFixPt.h"
+
+
+
+/**
+ * This class provides the interface create a graphics device representation.
+ *
+ *  @lib Gfx2D.lib
+ *  @since 1.0
+ */
+class CGfx2dDevice : public CBase
+    {
+    public:
+
+        /**
+         * Two-phase constructor.
+         *
+         * @since 1.0
+         * @param : aBitmap -- offscreen bitmap.
+         * @return
+         */
+         static CGfx2dDevice*   NewL( CFbsBitmap* aBitmap );
+
+        /**
+         * Destructor
+         */
+         virtual                ~CGfx2dDevice();
+
+        /**
+         * Create a graphics context.
+         *
+         * @since 1.0
+         * @param : aGc -- reference to store the new context.
+         * @return error code if any
+         */
+         TInt                   CreateContext( CGfx2dGc*& aGc, TFontSpec& aFontSpec );
+
+        /**
+         * Get size of the of the graphics context.
+         *
+         * @since 1.0
+         * @param
+         * @return size of graphics context.
+         */
+         TSize                  SizeInPixels();
+
+
+    protected:
+
+        /**
+         * Two-phase constructor.
+         *
+         * @since 1.0
+         * @param : aBitmap -- offscreen bitmap.
+         * @return
+         */
+        void                            ConstructL( CFbsBitmap* aBitmap );
+
+    private:
+
+        /**
+         * Constructor.
+         *
+         * @since 1.0
+         * @param : aBitmap -- offscreen bitmap.
+         * @return
+         */
+                                        CGfx2dDevice();
+
+    protected:
+        CFbsDevice*                     iGdiDevice;
+        CFbsBitmap*                     iBitmap;
+
+
+
+    private:
+        friend class                    CGfx2dGc;
+        friend class                    CGfxFont;
+    };
+
+#endif      // GFX2DDEVICE_H