update dev300-m58
[ooovba.git] / svx / source / customshapes / EnhancedCustomShape3d.hxx
blob45d98d9e4c1b0838f8198e53327f58431ecae5f1
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: EnhancedCustomShape3d.hxx,v $
10 * $Revision: 1.7.226.1 $
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 _ENHANCEDCUSTOMSHAPE3D_HXX
32 #define _ENHANCEDCUSTOMSHAPE3D_HXX
34 #include <vector>
35 #include <com/sun/star/drawing/ProjectionMode.hpp>
36 #include <basegfx/point/b3dpoint.hxx>
37 #include <basegfx/polygon/b3dpolygon.hxx>
39 #include <tools/gen.hxx>
41 class SdrObject;
43 class EnhancedCustomShape3d
45 class Transformation2D
47 Point aCenter;
48 com::sun::star::drawing::ProjectionMode eProjectionMode;
50 // parallel projection
51 double fSkewAngle;
52 double fSkew; // in percent
54 // perspective projection
55 double fZScreen;
56 basegfx::B3DPoint fViewPoint;
57 double fOriginX;
58 double fOriginY;
60 const double* pMap;
62 public :
64 Transformation2D( const SdrObject* pCustomShape, const Rectangle& rBoundRect, const double* pMap );
66 basegfx::B3DPolygon ApplySkewSettings( const basegfx::B3DPolygon& rPolygon3D ) const;
67 Point Transform2D( const basegfx::B3DPoint& rPoint ) const;
68 sal_Bool IsParallel() const;
71 friend class Transformation2D;
73 protected :
74 static Rectangle CalculateNewSnapRect( const SdrObject* pCustomShape, const Rectangle& rSnapRect, const Rectangle& rBoundRect, const double* pMap );
76 public :
77 static SdrObject* Create3DObject( const SdrObject* pShape2d, const SdrObject* pCustomShape );
80 #endif