2010-10-27 12:30:13 +01:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-07-11 09:51:50 +01:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2014-05-15 12:06:32 +02:00
|
|
|
#ifndef INCLUDED_TOOLS_INC_POLY_H
|
|
|
|
#define INCLUDED_TOOLS_INC_POLY_H
|
2003-03-27 16:05:12 +00:00
|
|
|
|
2012-12-25 15:18:26 +01:00
|
|
|
#include <sal/types.h>
|
|
|
|
|
|
|
|
class Point;
|
2003-03-27 16:05:12 +00:00
|
|
|
|
2012-10-27 20:24:49 +01:00
|
|
|
class SAL_WARN_UNUSED ImplPolygonData
|
2003-03-27 16:05:12 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
Point* mpPointAry;
|
2010-07-29 10:56:19 +08:00
|
|
|
sal_uInt8* mpFlagAry;
|
|
|
|
sal_uInt16 mnPoints;
|
|
|
|
sal_uIntPtr mnRefCount;
|
2003-03-27 16:05:12 +00:00
|
|
|
};
|
|
|
|
|
2012-10-27 20:24:49 +01:00
|
|
|
class SAL_WARN_UNUSED ImplPolygon : public ImplPolygonData
|
2003-03-27 16:05:12 +00:00
|
|
|
{
|
|
|
|
public:
|
2013-06-29 23:57:38 -05:00
|
|
|
ImplPolygon( sal_uInt16 nInitSize, bool bFlags = false );
|
2010-07-29 10:56:19 +08:00
|
|
|
ImplPolygon( sal_uInt16 nPoints, const Point* pPtAry, const sal_uInt8* pInitFlags = NULL );
|
2003-03-27 16:05:12 +00:00
|
|
|
ImplPolygon( const ImplPolygon& rImplPoly );
|
|
|
|
~ImplPolygon();
|
|
|
|
|
2013-06-29 23:57:38 -05:00
|
|
|
void ImplSetSize( sal_uInt16 nSize, bool bResize = true );
|
2003-03-27 16:05:12 +00:00
|
|
|
void ImplCreateFlagArray();
|
2010-07-29 10:56:19 +08:00
|
|
|
void ImplSplit( sal_uInt16 nPos, sal_uInt16 nSpace, ImplPolygon* pInitPoly = NULL );
|
2003-03-27 16:05:12 +00:00
|
|
|
};
|
|
|
|
|
2010-07-29 10:56:19 +08:00
|
|
|
#define MAX_POLYGONS ((sal_uInt16)0x3FF0)
|
2003-03-27 16:05:12 +00:00
|
|
|
|
|
|
|
class Polygon;
|
|
|
|
typedef Polygon* SVPPOLYGON;
|
|
|
|
|
2012-10-27 20:24:49 +01:00
|
|
|
class SAL_WARN_UNUSED ImplPolyPolygon
|
2003-03-27 16:05:12 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
SVPPOLYGON* mpPolyAry;
|
2010-07-29 10:56:19 +08:00
|
|
|
sal_uIntPtr mnRefCount;
|
|
|
|
sal_uInt16 mnCount;
|
|
|
|
sal_uInt16 mnSize;
|
|
|
|
sal_uInt16 mnResize;
|
2003-03-27 16:05:12 +00:00
|
|
|
|
2010-07-29 10:56:19 +08:00
|
|
|
ImplPolyPolygon( sal_uInt16 nInitSize, sal_uInt16 nResize )
|
2003-03-27 16:05:12 +00:00
|
|
|
{ mpPolyAry = NULL; mnCount = 0; mnRefCount = 1;
|
|
|
|
mnSize = nInitSize; mnResize = nResize; }
|
2010-07-29 10:56:19 +08:00
|
|
|
ImplPolyPolygon( sal_uInt16 nInitSize );
|
2003-03-27 16:05:12 +00:00
|
|
|
ImplPolyPolygon( const ImplPolyPolygon& rImplPolyPoly );
|
|
|
|
~ImplPolyPolygon();
|
|
|
|
};
|
|
|
|
|
2012-08-13 23:14:08 +02:00
|
|
|
#endif
|
2010-10-27 12:30:13 +01:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|