Update ooo320-m1
[ooovba.git] / binfilter / inc / bf_svx / polypath.hxx
blobd0f8ee2ddf1de1c001adbd1a67ea7cdb0713a458
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: polypath.hxx,v $
10 * $Revision: 1.4 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _POLYPATH_HXX
32 #define _POLYPATH_HXX
34 ////////////////////////////////////////////////////////////////////////////////////////////////////
35 namespace binfilter {
37 class XPolygon; // Dummy zum Uebersetzen
39 enum PathKind {PATH_POLYGON,
40 PATH_POLYLINE,
41 PATH_BEZIER,
42 PATH_BEZIERLINE};
44 class PolyPath {
45 protected:
46 // ...
47 public:
48 PolyPath();
49 PolyPath(const PolyPath& rPath);
50 ~PolyPath();
51 void Clear();
53 USHORT GetPathCount() const;
54 PathKind GetPathKind(USHORT i) const;
55 const Polygon& GetPolygon (USHORT i) const;
56 const XPolygon& GetXPolygon(USHORT i) const;
57 Polygon& GetPolygon (USHORT i);
58 XPolygon& GetXPolygon(USHORT i);
59 const Polygon& operator[] (USHORT i); // eigentlich identisch mit Get
61 void InsertPolyPath (const PolyPath& , USHORT nPos=POLYPOLY_APPEND);
62 void InsertPolygon (const Polygon& , USHORT nPos=POLYPOLY_APPEND);
63 void InsertPolygon (const PolyPolygon&, USHORT nPos=POLYPOLY_APPEND);
64 void InsertPolyLine (const Polygon& , USHORT nPos=POLYPOLY_APPEND);
65 void InsertBezier (const XPolygon& , USHORT nPos=POLYPOLY_APPEND);
66 void InsertBezierLine(const XPolygon& , USHORT nPos=POLYPOLY_APPEND);
68 BOOL operator==(const PolyPath& rPath);
69 void operator!=(const PolyPath& rPath);
70 void operator= (const PolyPath& rPath);
71 void operator+=(const Point&);
72 void operator-=(const Point&);
74 Rectangle GetBoundRect() const;
75 BOOL IsInside(const Point&) const;
76 BOOL IsTouch(const Rectangle&) const;
79 // ExtOutputDevice::DrawPolyPath(const PolyPath&)
80 // Alle Polygone und Beziers werden zu einem einzigen PolyPolygon gemacht das
81 // dann mit DrawPolyPolygon() ausgegeben wird. Alle PolyLines und BezierLines
82 // werden dagegen mit DrawPolyLine() (oder DrawPolyPolyLine()?) gamalt.
84 ////////////////////////////////////////////////////////////////////////////////////////////////////
86 }//end of namespace binfilter
87 #endif //_POLYPATH_HXX