/************************************************************************* * * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: EnhancedCustomShape3d.hxx,v $ * * $Revision: 1.4 $ * * last change: $Author: rt $ $Date: 2005-09-08 20:25:05 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. * * * GNU Lesser General Public License Version 2.1 * ============================================= * Copyright 2005 by Sun Microsystems, Inc. * 901 San Antonio Road, Palo Alto, CA 94303, USA * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License version 2.1, as published by the Free Software Foundation. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * MA 02111-1307 USA * ************************************************************************/ #ifndef _ENHANCEDCUSTOMSHAPE3D_HXX #define _ENHANCEDCUSTOMSHAPE3D_HXX #ifndef _MSDFFIMP_HXX #include #endif #include #include #include #ifndef _COM_SUN_STAR_DRAWING_PROJECTIONMODE_HPP_ #include #endif class EnhancedCustomShape3d { class Transformation2D { Point aCenter; com::sun::star::drawing::ProjectionMode eProjectionMode; // parallel projection double fSkewAngle; double fSkew; // in percent // perspective projection double fZScreen; Point3D fViewPoint; double fOriginX; double fOriginY; const double* pMap; public : Transformation2D( const SdrObject* pCustomShape, const Rectangle& rBoundRect, const double* pMap ); void ApplySkewSettings( Polygon3D& rPolyPoly3D ) const; Point Transform2D( const Vector3D& rPoint ) const; sal_Bool IsParallel() const; }; friend class Transformation2D; protected : static void Rotate( Vector3D& rPoint, const double x, const double y, const double z ); static void Rotate( PolyPolygon3D&, const Point3D& rRotateCenter, const double x, const double y, const double z ); static Rectangle CalculateNewSnapRect( const SdrObject* pCustomShape, const Rectangle& rBoundRect, const double* pMap ); public : static SdrObject* Create3DObject( const SdrObject* pShape2d, const SdrObject* pCustomShape ); }; #endif