1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 #ifndef _SV_IMPANMVW_HXX 25 #define _SV_IMPANMVW_HXX 26 27 #include <vcl/animate.hxx> 28 29 // ---------------- 30 // - ImplAnimView - 31 // ---------------- 32 33 class Animation; 34 class OutputDevice; 35 class VirtualDevice; 36 struct AnimationBitmap; 37 38 class ImplAnimView 39 { 40 private: 41 42 Animation* mpParent; 43 OutputDevice* mpOut; 44 long mnExtraData; 45 Point maPt; 46 Point maDispPt; 47 Point maRestPt; 48 Size maSz; 49 Size maSzPix; 50 Size maDispSz; 51 Size maRestSz; 52 MapMode maMap; 53 Region maClip; 54 VirtualDevice* mpBackground; 55 VirtualDevice* mpRestore; 56 sal_uLong mnActPos; 57 Disposal meLastDisposal; 58 sal_Bool mbPause; 59 sal_Bool mbFirst; 60 sal_Bool mbMarked; 61 sal_Bool mbHMirr; 62 sal_Bool mbVMirr; 63 64 void ImplGetPosSize( const AnimationBitmap& rAnm, Point& rPosPix, Size& rSizePix ); 65 void ImplDraw( sal_uLong nPos, VirtualDevice* pVDev ); 66 67 public: 68 69 ImplAnimView( Animation* pParent, OutputDevice* pOut, 70 const Point& rPt, const Size& rSz, sal_uLong nExtraData, 71 OutputDevice* pFirstFrameOutDev = NULL ); 72 ~ImplAnimView(); 73 74 sal_Bool ImplMatches( OutputDevice* pOut, long nExtraData ) const; 75 void ImplDrawToPos( sal_uLong nPos ); 76 void ImplDraw( sal_uLong nPos ); 77 void ImplRepaint(); 78 AInfo* ImplCreateAInfo() const; 79 ImplGetOutPos() const80 const Point& ImplGetOutPos() const { return maPt; } 81 ImplGetOutSize() const82 const Size& ImplGetOutSize() const { return maSz; } ImplGetOutSizePix() const83 const Size& ImplGetOutSizePix() const { return maSzPix; } 84 ImplPause(sal_Bool bPause)85 void ImplPause( sal_Bool bPause ) { mbPause = bPause; } ImplIsPause() const86 sal_Bool ImplIsPause() const { return mbPause; } 87 ImplSetMarked(sal_Bool bMarked)88 void ImplSetMarked( sal_Bool bMarked ) { mbMarked = bMarked; } ImplIsMarked() const89 sal_Bool ImplIsMarked() const { return mbMarked; } 90 }; 91 92 #endif 93