|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef HGVGQUADRENDERER_H |
|
19 #define HGVGQUADRENDERER_H |
|
20 |
|
21 #include "hgquadrenderer.h" |
|
22 #include <qlist> |
|
23 #include <VG/openvg.h> |
|
24 #include <qimage> |
|
25 |
|
26 class QPoint; |
|
27 class QPainter; |
|
28 class QRectF; |
|
29 class QMatrix4x4; |
|
30 class HgVgQuad; |
|
31 class HgVgImage; |
|
32 class HgImageFader; |
|
33 class QSize; |
|
34 /** |
|
35 * OpenVG implementation of the HgQuadRenderer. |
|
36 */ |
|
37 class HgVgQuadRenderer: public HgQuadRenderer |
|
38 { |
|
39 public: |
|
40 HgVgQuadRenderer(int maxQuads); |
|
41 virtual ~HgVgQuadRenderer(); |
|
42 virtual HgQuad* getQuadAt(const QPointF& point) const; |
|
43 virtual void transformQuads(const QMatrix4x4& view, const QMatrix4x4& proj, |
|
44 const QRectF& rect); |
|
45 virtual void drawQuads(const QRectF& rect, QPainter* painter); |
|
46 virtual bool getQuadTranformedPoints(QPolygonF& points, int index) const; |
|
47 virtual HgImage* createNativeImage(); |
|
48 virtual QList<HgQuad*> getVisibleQuads(const QRectF& rect) const; |
|
49 |
|
50 // new functions |
|
51 HgVgImage* defaultImage(); |
|
52 QSize imageSize(bool mirror=false) const; |
|
53 HgImageFader* imageFader(); |
|
54 private: |
|
55 |
|
56 QList<HgVgQuad*> mTransformedQuads; |
|
57 |
|
58 QList<HgVgQuad*> mSortedQuads; |
|
59 |
|
60 HgVgImage* mDefaultVgImage; |
|
61 |
|
62 }; |
|
63 |
|
64 #endif |