|
1 // Copyright (c) 2008-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 // The purpose of this program is to validate whether it is possible to |
|
15 // write a vg1.1 client program which detects the available implementation |
|
16 // at run time and then falls back onto vg1.0 calls if vg1.1 is not available. |
|
17 // |
|
18 // |
|
19 |
|
20 /** |
|
21 @file |
|
22 @internalTechnology |
|
23 @released |
|
24 */ |
|
25 |
|
26 #include <e32base.h> |
|
27 #include <e32debug.h> |
|
28 #include <string.h> |
|
29 |
|
30 |
|
31 /* |
|
32 * The program is compiled with the appropriate macro. |
|
33 */ |
|
34 #include <VG/openvg.h> |
|
35 #include <VG/vgu.h> |
|
36 |
|
37 GLDEF_C TInt E32Main() |
|
38 { |
|
39 RDebug::Printf("testing VG 1.0 function"); |
|
40 VGPath path0 = vgCreatePath(VG_PATH_FORMAT_STANDARD, VG_PATH_DATATYPE_F, 1.0f, 0.0f, 0, 0, VG_PATH_CAPABILITY_ALL); |
|
41 RDebug::Printf("finished testing VG 1.0 function"); |
|
42 |
|
43 #ifdef OPENVG_VERSION_1_1 |
|
44 if(strcmp((const char*)vgGetString(VG_VERSION), "1.1")==0) |
|
45 { |
|
46 RDebug::Printf("testing function introduced in 1.1"); |
|
47 VGFont font = vgCreateFont(245); |
|
48 vgDrawGlyph(font, 2, 256, VG_FALSE); |
|
49 RDebug::Printf("finished testing function introduced in 1.1"); |
|
50 } |
|
51 #endif |
|
52 |
|
53 return 0; |
|
54 } |