summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--goodies/inc/grfmgr.hxx6
-rw-r--r--goodies/source/graphic/grfmgr.cxx18
2 files changed, 18 insertions, 6 deletions
diff --git a/goodies/inc/grfmgr.hxx b/goodies/inc/grfmgr.hxx
index e3a517386163..14466c4a93f8 100644
--- a/goodies/inc/grfmgr.hxx
+++ b/goodies/inc/grfmgr.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: grfmgr.hxx,v $
*
- * $Revision: 1.9 $
+ * $Revision: 1.10 $
*
- * last change: $Author: ka $ $Date: 2001-05-08 09:07:25 $
+ * last change: $Author: ka $ $Date: 2001-05-11 12:52:37 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -240,7 +240,7 @@ private:
String* mpUserData;
Timer* mpSwapOutTimer;
GrfSimpleCacheObj* mpSimpleCache;
- void* mpDummy2;
+ ULONG mnAnimationLoopCount;
BOOL mbAutoSwapped : 1;
BOOL mbTransparent : 1;
BOOL mbAnimated : 1;
diff --git a/goodies/source/graphic/grfmgr.cxx b/goodies/source/graphic/grfmgr.cxx
index c66ed19c4a35..becaa94a0fde 100644
--- a/goodies/source/graphic/grfmgr.cxx
+++ b/goodies/source/graphic/grfmgr.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: grfmgr.cxx,v $
*
- * $Revision: 1.12 $
+ * $Revision: 1.13 $
*
- * last change: $Author: ka $ $Date: 2001-05-08 09:09:18 $
+ * last change: $Author: ka $ $Date: 2001-05-11 12:53:23 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -197,6 +197,7 @@ void GraphicObject::ImplConstruct()
mpSwapStreamHdl = NULL;
mpSwapOutTimer = NULL;
mpSimpleCache = NULL;
+ mnAnimationLoopCount = 0;
mbAutoSwapped = FALSE;
mbIsInSwapIn = FALSE;
mbIsInSwapOut = FALSE;
@@ -212,6 +213,7 @@ void GraphicObject::ImplAssignGraphicData()
meType = maGraphic.GetType();
mbTransparent = maGraphic.IsTransparent();
mbAnimated = maGraphic.IsAnimated();
+ mnAnimationLoopCount = ( mbAnimated ? maGraphic.GetAnimationLoopCount() : 0 );
if( maGraphic.GetType() == GRAPHIC_GDIMETAFILE )
{
@@ -841,6 +843,7 @@ Graphic GraphicObject::GetTransformedGraphic( const GraphicAttr* pAttr ) const
{
Animation aAnimation( maGraphic.GetAnimation() );
GraphicManager::ImplAdjust( aAnimation, aActAttr, ADJUSTMENT_ALL );
+ aAnimation.SetLoopCount( mnAnimationLoopCount );
aGraphic = aAnimation;
}
else
@@ -858,7 +861,16 @@ Graphic GraphicObject::GetTransformedGraphic( const GraphicAttr* pAttr ) const
}
}
else
- aGraphic = maGraphic;
+ {
+ if( ( GetType() == GRAPHIC_BITMAP ) && IsAnimated() )
+ {
+ Animation aAnimation( maGraphic.GetAnimation() );
+ aAnimation.SetLoopCount( mnAnimationLoopCount );
+ aGraphic = aAnimation;
+ }
+ else
+ aGraphic = maGraphic;
+ }
}
return aGraphic;