bump product version to 5.0.4.1
[LibreOffice.git] / tools / inc / poly.h
blobd677bcd8b0acf9f69c9052a2b243cf5f03ef4fd6
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef INCLUDED_TOOLS_INC_POLY_H
20 #define INCLUDED_TOOLS_INC_POLY_H
22 #include <sal/types.h>
24 class Point;
26 class SAL_WARN_UNUSED ImplPolygonData
28 public:
29 Point* mpPointAry;
30 sal_uInt8* mpFlagAry;
31 sal_uInt16 mnPoints;
32 sal_uIntPtr mnRefCount;
35 class SAL_WARN_UNUSED ImplPolygon : public ImplPolygonData
37 public:
38 ImplPolygon( sal_uInt16 nInitSize, bool bFlags = false );
39 ImplPolygon( sal_uInt16 nPoints, const Point* pPtAry, const sal_uInt8* pInitFlags = NULL );
40 ImplPolygon( const ImplPolygon& rImplPoly );
41 ~ImplPolygon();
43 void ImplSetSize( sal_uInt16 nSize, bool bResize = true );
44 void ImplCreateFlagArray();
45 void ImplSplit( sal_uInt16 nPos, sal_uInt16 nSpace, ImplPolygon* pInitPoly = NULL );
48 #define MAX_POLYGONS ((sal_uInt16)0x3FF0)
50 class Polygon;
51 typedef Polygon* SVPPOLYGON;
53 class SAL_WARN_UNUSED ImplPolyPolygon
55 public:
56 SVPPOLYGON* mpPolyAry;
57 sal_uIntPtr mnRefCount;
58 sal_uInt16 mnCount;
59 sal_uInt16 mnSize;
60 sal_uInt16 mnResize;
62 ImplPolyPolygon( sal_uInt16 nInitSize, sal_uInt16 nResize )
63 { mpPolyAry = NULL; mnCount = 0; mnRefCount = 1;
64 mnSize = nInitSize; mnResize = nResize; }
65 ImplPolyPolygon( sal_uInt16 nInitSize );
66 ImplPolyPolygon( const ImplPolyPolygon& rImplPolyPoly );
67 ~ImplPolyPolygon();
70 #endif
72 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */