equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 2002 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 |
|
19 |
|
20 #ifndef COLOR_H |
|
21 #define COLOR_H |
|
22 |
|
23 #include "RGB.H" |
|
24 |
|
25 class TColorScheme |
|
26 { |
|
27 public: |
|
28 enum |
|
29 { |
|
30 StandardGrayBase = 216, |
|
31 SchemeSpecificColorBase = 226 |
|
32 }; |
|
33 |
|
34 public: |
|
35 virtual TRgb Color(int aIndex) const = 0; |
|
36 }; |
|
37 |
|
38 |
|
39 class Color |
|
40 { |
|
41 public: |
|
42 enum TSchemeId |
|
43 { |
|
44 ENokiaBlue, |
|
45 ENokiaGreen, |
|
46 ENokiaPurple, |
|
47 ENokiaGrey, |
|
48 ESchemeRed, |
|
49 ESchemePink, |
|
50 ESchemeOrange, |
|
51 EPalette1, |
|
52 EPalette2, |
|
53 EPalette3, |
|
54 EPalette4, |
|
55 EPalette5, |
|
56 EPalette6, |
|
57 EPalette7, |
|
58 EPalette8, |
|
59 EPalette9, |
|
60 EPalette10, |
|
61 EPalette11, |
|
62 EPalette12, |
|
63 EPalette13 |
|
64 }; |
|
65 |
|
66 public: |
|
67 static TColorScheme* CreateColorSchemeL(TSchemeId aScheme); |
|
68 static void CreateBmConvPalette(TSchemeId aScheme, char* aFilename); |
|
69 static void CreatePaletteTable(TSchemeId aScheme, char* aPaletteName); |
|
70 static void EquivalenceTest(); |
|
71 private: |
|
72 typedef int TEquivalenceList[256]; |
|
73 static void MakeEqivalenceList(TSchemeId aScheme, TEquivalenceList& aList); |
|
74 }; |
|
75 |
|
76 |
|
77 #endif |
|
78 // End of File |