|
1 /* |
|
2 * Copyright (c) 2010 Ixonos Plc. |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the "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 * Ixonos Plc |
|
14 * |
|
15 * Description: |
|
16 * Container for draw path. |
|
17 * |
|
18 */ |
|
19 |
|
20 #include "drawpath.h" |
|
21 |
|
22 // ======== MEMBER FUNCTIONS ======== |
|
23 |
|
24 |
|
25 // --------------------------------------------------------------------------- |
|
26 // NewL |
|
27 // --------------------------------------------------------------------------- |
|
28 // |
|
29 CDrawPath* CDrawPath::NewL() |
|
30 { |
|
31 CDrawPath* self = new( ELeave ) CDrawPath; |
|
32 TInt arrayGranularity(8); |
|
33 CleanupStack::PushL( self ); |
|
34 self->iItemArray = new( ELeave ) |
|
35 CArrayFixFlat<TPoint> ( arrayGranularity ); |
|
36 CleanupStack::Pop( self ); |
|
37 return self; |
|
38 } |
|
39 |
|
40 // --------------------------------------------------------------------------- |
|
41 // ~CDrawPath |
|
42 // --------------------------------------------------------------------------- |
|
43 // |
|
44 CDrawPath::~CDrawPath() |
|
45 { |
|
46 delete iItemArray; |
|
47 } |
|
48 |
|
49 // --------------------------------------------------------------------------- |
|
50 // AddItemL |
|
51 // --------------------------------------------------------------------------- |
|
52 // |
|
53 void CDrawPath::AddItemL(TPoint aItem) |
|
54 { |
|
55 ASSERT( iItemArray ); |
|
56 iItemArray->AppendL( aItem ); |
|
57 } |
|
58 |
|
59 // --------------------------------------------------------------------------- |
|
60 // CDrawPath |
|
61 // --------------------------------------------------------------------------- |
|
62 // |
|
63 CDrawPath::CDrawPath():iColor(KRgbWhite) |
|
64 { |
|
65 } |
|
66 |