equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 2006 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 the License "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 #ifndef __PATHSYMBIAN_H__ |
|
20 #define __PATHSYMBIAN_H__ |
|
21 |
|
22 #include "wtf/Vector.h" |
|
23 #include "FloatRect.h" |
|
24 #include "Path.h" |
|
25 |
|
26 class PlatformPath |
|
27 { |
|
28 public: |
|
29 friend class WebCore::Path; |
|
30 |
|
31 enum PathType { |
|
32 Ellipse, |
|
33 Rectangle, |
|
34 Polygon, |
|
35 Line, |
|
36 Circle, |
|
37 Unknown |
|
38 }; |
|
39 |
|
40 PlatformPath() : m_points(0), m_type( Unknown ) {} |
|
41 ~PlatformPath(); |
|
42 |
|
43 // only implemented Rectangle |
|
44 void addRect( const WebCore::FloatRect& rect ); |
|
45 bool contains( const WebCore::FloatPoint& point, WebCore::WindRule ); |
|
46 void addEllipse( const WebCore::FloatRect& ); |
|
47 void addLineTo( const WebCore::FloatPoint& ); |
|
48 void closeSubPath(); |
|
49 void translate( const WebCore::FloatSize& ); |
|
50 |
|
51 private: |
|
52 WebCore::FloatRect m_boundingRect; |
|
53 WTF::Vector<WebCore::FloatPoint> m_points; |
|
54 PathType m_type; |
|
55 }; |
|
56 #endif |