46
|
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: Graphics Extension Library header file
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
#ifndef GFXSHAPE_H
|
|
20 |
#define GFXSHAPE_H
|
|
21 |
|
|
22 |
#include <e32std.h>
|
|
23 |
|
|
24 |
#include "GfxFloatFixPt.h"
|
|
25 |
#include "GfxPoint2D.h"
|
|
26 |
|
|
27 |
|
|
28 |
class CGfxPathIterator;
|
|
29 |
class TGfxRectangle2D;
|
|
30 |
class TGfxAffineTransform;
|
|
31 |
|
|
32 |
|
|
33 |
/**
|
|
34 |
* This interface defines the methods that must be implement to be a 'Shape'.
|
|
35 |
*
|
|
36 |
* @lib Gfx2D.lib
|
|
37 |
* @since 1.0
|
|
38 |
*/
|
|
39 |
class MGfxShape
|
|
40 |
{
|
|
41 |
public:
|
|
42 |
/**
|
|
43 |
* Get the bounding box
|
|
44 |
*
|
|
45 |
* @since 1.0
|
|
46 |
* @param aAt : transform to apply.
|
|
47 |
* @param aRect : rectangle to store bounding box info.
|
|
48 |
* @return
|
|
49 |
*/ virtual void GetBounds( const TGfxAffineTransform& aAt,
|
|
50 |
TGfxRectangle2D& aRect ) = 0;
|
|
51 |
|
|
52 |
/**
|
|
53 |
* Get the path iterator for this rectangle.
|
|
54 |
*
|
|
55 |
* @since 1.0
|
|
56 |
* @param aAt : transform to apply.
|
|
57 |
* @param aPitr : path iterator holder.
|
|
58 |
* @return
|
|
59 |
*/
|
|
60 |
virtual void GetPathIteratorL( TGfxAffineTransform* aAt,
|
|
61 |
CGfxPathIterator*& aPitr ) = 0;
|
|
62 |
|
|
63 |
/**
|
|
64 |
* Get the path iterator for this rectangle.
|
|
65 |
*
|
|
66 |
* @since 1.0
|
|
67 |
* @param aAt : transform to apply.
|
|
68 |
* @param aLimit : maximum of points to define the iterator.
|
|
69 |
* @param aPitr : path iterator holder.
|
|
70 |
* @return
|
|
71 |
*/
|
|
72 |
virtual void GetPathIteratorL( TGfxAffineTransform* aAt,
|
|
73 |
TInt aLimit,
|
|
74 |
CGfxPathIterator*& aPitr ) = 0;
|
|
75 |
|
|
76 |
/**
|
|
77 |
* Get the area of this shape.
|
|
78 |
*
|
|
79 |
* @since 1.0
|
|
80 |
* @return area of shape.
|
|
81 |
*/
|
|
82 |
virtual TFloatFixPt AreaSize() = 0;
|
|
83 |
|
|
84 |
|
|
85 |
/* Return shape type */
|
|
86 |
virtual TInt ShapeType () = 0;
|
|
87 |
|
|
88 |
enum HYB_SHAPE_TYPE
|
|
89 |
{
|
|
90 |
ELine, ERect, ERoundRect, EEllipse, EPath
|
|
91 |
};
|
|
92 |
|
|
93 |
};
|
|
94 |
|
|
95 |
#endif // GFXSHAPE_H
|