os/graphics/graphicsdeviceinterface/directgdiinterface/inc/directgdiimagetarget.h
First public contribution.
1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 #ifndef DIRECTGDIIMAGETARGET_H
17 #define DIRECTGDIIMAGETARGET_H
28 // Forward declarations.
30 class CDirectGdiDriver;
34 RDirectGdiImageTarget is a handle to a DirectGDI adaptation-specific resource which
35 abstracts the image-based rendering target. The main intention in creating this resource
36 is to allow a global sharable image resource (RSgImage) to be used as a target of
37 DirectGDI rendering. For example, in a DirectGDI adaptation where OpenVG is used to
38 implement DirectGDI functionality, the creation of RDirectGdiImageTarget may be associated
39 with the creation of an underlying EGL surface from the given RSgImage. This handle class
40 and its DirectGDI adaptation-specific resource are non-sharable and local within the
43 This class is part of a generic layer and will forward any request to the CDirectGdiDriver
44 singleton for the calling thread.
46 CDirectGdiContext is activated on an RDirectGdiImageTarget. This causes all subsequent
47 context drawing operations to to draw to the image resource referred to by the
48 RDirectGdiImageTarget.
50 @see CDirectGdiContext
52 NONSHARABLE_CLASS(RDirectGdiImageTarget)
54 friend class CDirectGdiDriver;
55 friend class CTPanicTests;
58 IMPORT_C RDirectGdiImageTarget();
59 IMPORT_C RDirectGdiImageTarget(CDirectGdiDriver& aDriver);
60 IMPORT_C TInt Create(const RSgImage& aImage);
61 IMPORT_C void Close();
62 inline TInt Handle() const;
65 CDirectGdiDriver* iDriver;
69 #include <graphics/directgdiimagetarget.inl>
71 #endif //DIRECTGDIIMAGETARGET_H