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 .
|
|
|
|
*/
|
2003-03-27 16:05:12 +00:00
|
|
|
|
|
|
|
#ifndef _POLY_H
|
|
|
|
#define _POLY_H
|
|
|
|
|
2007-06-27 21:08:40 +00:00
|
|
|
#include <tools/gen.hxx>
|
2003-03-27 16:05:12 +00:00
|
|
|
|
|
|
|
class ImplPolygonData
|
|
|
|
{
|
|
|
|
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
|
|
|
};
|
|
|
|
|
|
|
|
class ImplPolygon : public ImplPolygonData
|
|
|
|
{
|
|
|
|
public:
|
2010-07-29 10:56:19 +08:00
|
|
|
ImplPolygon( sal_uInt16 nInitSize, sal_Bool bFlags = sal_False );
|
|
|
|
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();
|
|
|
|
|
2010-07-29 10:56:19 +08:00
|
|
|
void ImplSetSize( sal_uInt16 nSize, sal_Bool bResize = sal_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;
|
|
|
|
|
|
|
|
class ImplPolyPolygon
|
|
|
|
{
|
|
|
|
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();
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // _SV_POLY_H
|
2010-10-27 12:30:13 +01:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|