1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 #ifndef SD_SPRITE_HXX 29 #define SD_SPRITE_HXX 30 31 #include <vcl/virdev.hxx> 32 #include <vcl/region.hxx> 33 #include <vcl/mapmod.hxx> 34 #include <vcl/image.hxx> 35 #include <vcl/bitmapex.hxx> 36 37 // ---------- 38 // - Sprite - 39 // ---------- 40 41 42 namespace sd { 43 44 class Marker; 45 class MetaFile; 46 47 class Sprite 48 { 49 public: 50 Sprite( List* pListOfBmpEx ); 51 ~Sprite(); 52 53 sal_Bool StartMoving( OutputDevice* pOut, 54 OutputDevice* pBottomLayer = NULL, 55 BitmapEx* pTopLayer = NULL, 56 MetaFile** ppTopMtf = NULL, 57 Marker* pObjStartMarker = NULL, 58 Marker* pObjEndMarker = NULL ); 59 void MoveTo( OutputDevice* pOut, const Point& rPt, const Size* pSz = NULL ); 60 void MoveTo( OutputDevice* pOut, const Point& rPt, const double& rScaleX, const double& rScaleY ); 61 void EndMoving( OutputDevice* pOut ); 62 63 protected: 64 MapMode aOldMap; 65 Region aOldClip; 66 Rectangle aPaintRect; 67 Point aPt; 68 Size aSz; 69 Point aLayerOffsetPix; 70 VirtualDevice* pPaintDev; 71 VirtualDevice* pBottomLayer; 72 BitmapEx* pActBmpEx; 73 BitmapEx* pTopLayer; 74 MetaFile** ppTopMtf; 75 Marker* pObjStartMarker; 76 Marker* pObjEndMarker; 77 List* pListOfBmpEx; 78 sal_uLong nLastTime; 79 sal_Bool bClipRegion; 80 81 sal_Bool ImplPrepareMoveTo(); 82 void ImplDrawSprite( OutputDevice* pOut, const Point& rPt, const Size& rSz ); 83 84 }; 85 86 } 87 88 #endif 89