|
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". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 /** |
|
17 @file |
|
18 @test |
|
19 @internalComponent - Internal Symbian test code |
|
20 */ |
|
21 |
|
22 #ifndef __TDRAWSHAPES_H__ |
|
23 #define __TDRAWSHAPES_H__ |
|
24 |
|
25 #include "tdirectgdi_test_step_base.h" |
|
26 #include <bitdev.h> |
|
27 |
|
28 enum TDrawShapeAPI |
|
29 { |
|
30 EDrawLine, |
|
31 EDrawLineTo, |
|
32 EDrawLineBy, |
|
33 EDrawRect, |
|
34 EDrawRoundRect, |
|
35 EDrawEllipse, |
|
36 EDrawPie, |
|
37 EDrawArc, |
|
38 EDrawPolyLine, |
|
39 EDrawPolyLineNoEndPoint, |
|
40 EDrawPolygon |
|
41 }; |
|
42 |
|
43 /** |
|
44 Class for testing the drawing of shapes in DirectGdi vs BitGdi. Shapes tested are |
|
45 rect, round rect, line, plot, arc, pie and ellipse. Clearing and various pen and |
|
46 brush styles are also tested in this class. |
|
47 */ |
|
48 class CTDrawShapes : public CTDirectGdiStepBase |
|
49 { |
|
50 public: |
|
51 CTDrawShapes(); |
|
52 ~CTDrawShapes(); |
|
53 |
|
54 private: |
|
55 // Main test methods |
|
56 void TestBasicDrawShapeL(); |
|
57 void TestDrawLineL(TDrawShapeAPI aApi); |
|
58 void TestDrawShapePositionAndSizeL(TDrawShapeAPI aApi, DirectGdi::TPenStyle, DirectGdi::TBrushStyle aBrushStyle); |
|
59 void TestDrawShapeInvalidParametersL(TDrawShapeAPI aApi); |
|
60 void TestDrawRoundRectL(DirectGdi::TBrushStyle aBrushStyle=DirectGdi::ENullBrush); |
|
61 void TestPlot(); |
|
62 void TestDrawArcL(); |
|
63 void TestDrawPieL(DirectGdi::TBrushStyle aBrushStyle=DirectGdi::ENullBrush); |
|
64 void TestDrawPolyLineL(TDrawShapeAPI aApi); |
|
65 void TestDrawPolygonL(TInt aWidth, TInt aHeight, |
|
66 DirectGdi::TBrushStyle aBrushStyle=DirectGdi::ENullBrush, |
|
67 DirectGdi::TFillRule aFillRule=DirectGdi::EAlternate); |
|
68 void TestDrawLargeArc(); |
|
69 void TestSetAttributesInvalidParametersL(); |
|
70 void TestDrawShapeTransparentOutlineL(); |
|
71 |
|
72 // From CStepStep |
|
73 virtual TVerdict doTestStepPreambleL(); |
|
74 virtual TVerdict doTestStepL(); |
|
75 |
|
76 // from CTDirectGdiStepBase |
|
77 void RunTestsL(); |
|
78 |
|
79 }; |
|
80 |
|
81 _LIT(KTDirectGdiDrawShapeStep,"TDirectGDIDrawShape"); |
|
82 |
|
83 #endif |