1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 #ifndef _XPOLYIMP_HXX 25 #define _XPOLYIMP_HXX 26 27 #include <tools/gen.hxx> 28 #include <svx/xpoly.hxx> 29 30 /************************************************************************* 31 |* 32 |* class ImpXPolygon 33 |* 34 |* Beschreibung 35 |* Ersterstellung 08.11.94 36 |* Letzte Aenderung Joe 26.09.95 37 |* 38 *************************************************************************/ 39 class ImpXPolygon 40 { 41 public: 42 Point* pPointAry; 43 sal_uInt8* pFlagAry; 44 Point* pOldPointAry; 45 sal_Bool bDeleteOldPoints; 46 sal_uInt16 nSize; 47 sal_uInt16 nResize; 48 sal_uInt16 nPoints; 49 sal_uInt16 nRefCount; 50 51 ImpXPolygon( sal_uInt16 nInitSize = 16, sal_uInt16 nResize=16 ); 52 ImpXPolygon( const ImpXPolygon& rImpXPoly ); 53 ~ImpXPolygon(); 54 55 bool operator==(const ImpXPolygon& rImpXPoly) const; operator !=(const ImpXPolygon & rImpXPoly) const56 bool operator!=(const ImpXPolygon& rImpXPoly) const { return !operator==(rImpXPoly); } 57 CheckPointDelete()58 void CheckPointDelete() 59 { 60 if ( bDeleteOldPoints ) 61 { 62 delete[] (char*)pOldPointAry; 63 bDeleteOldPoints = sal_False; 64 } 65 } 66 67 void Resize( sal_uInt16 nNewSize, sal_Bool bDeletePoints = sal_True ); 68 void InsertSpace( sal_uInt16 nPos, sal_uInt16 nCount ); 69 void Remove( sal_uInt16 nPos, sal_uInt16 nCount ); 70 }; 71 72 73 /************************************************************************* 74 |* 75 |* class ImpXPolyPolygon 76 |* 77 |* Beschreibung 78 |* Ersterstellung 08.11.94 79 |* Letzte Aenderung Joe 26-09-1995 80 |* 81 *************************************************************************/ 82 DECLARE_LIST( XPolygonList, XPolygon* ) 83 84 class ImpXPolyPolygon 85 { 86 public: 87 XPolygonList aXPolyList; 88 sal_uInt16 nRefCount; 89 ImpXPolyPolygon(sal_uInt16 nInitSize=16,sal_uInt16 nResize=16)90 ImpXPolyPolygon( sal_uInt16 nInitSize = 16, sal_uInt16 nResize = 16 ) : 91 aXPolyList( 1024, nInitSize, nResize ) 92 { nRefCount = 1; } 93 ImpXPolyPolygon( const ImpXPolyPolygon& rImpXPolyPoly ); 94 ~ImpXPolyPolygon(); 95 96 bool operator==(const ImpXPolyPolygon& rImpXPolyPoly) const; operator !=(const ImpXPolyPolygon & rImpXPolyPoly) const97 bool operator!=(const ImpXPolyPolygon& rImpXPolyPoly) const { return !operator==(rImpXPolyPoly); } 98 }; 99 100 101 102 #endif // _XPOLYIMP_HXX 103