X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9c592b6165744aef303720e21b709dd88ab3aa37..b2c13097deb7736a86a278c02d0b3f7cd9873750:/contrib/src/animate/animate.cpp diff --git a/contrib/src/animate/animate.cpp b/contrib/src/animate/animate.cpp index 2bca70edb8..5c687f927a 100644 --- a/contrib/src/animate/animate.cpp +++ b/contrib/src/animate/animate.cpp @@ -245,7 +245,7 @@ bool wxAnimationPlayer::PlayFrame(int frame, wxWindow& window, const wxPoint& WX // Draw all intermediate frames that haven't been removed from the // animation int i; - for (i = 0; i < (frame - 1); i++) + for (i = 0; i < frame; i++) { if ((GetDisposalMethod(i) == wxANIM_DONOTREMOVE) || (GetDisposalMethod(i) == wxANIM_UNSPECIFIED)) { @@ -416,7 +416,7 @@ wxImage* wxGIFAnimation::GetFrame(int i) const { wxASSERT_MSG( (m_decoder != (wxGIFDecoder*) NULL), _T("m_decoder must be non-NULL")); - m_decoder->GoFrame(i); + m_decoder->GoFrame(i + 1); wxImage* image = new wxImage; m_decoder->ConvertToImage(image); @@ -427,7 +427,7 @@ wxAnimationDisposal wxGIFAnimation::GetDisposalMethod(int i) const { wxASSERT_MSG( (m_decoder != (wxGIFDecoder*) NULL), _T("m_decoder must be non-NULL")); - m_decoder->GoFrame(i); + m_decoder->GoFrame(i + 1); int disposalMethod = m_decoder->GetDisposalMethod(); return (wxAnimationDisposal) disposalMethod; @@ -437,7 +437,7 @@ wxRect wxGIFAnimation::GetFrameRect(int i) const { wxASSERT_MSG( (m_decoder != (wxGIFDecoder*) NULL), _T("m_decoder must be non-NULL")); - m_decoder->GoFrame(i); + m_decoder->GoFrame(i + 1); wxRect rect(m_decoder->GetLeft(), m_decoder->GetTop(), m_decoder->GetWidth(), m_decoder->GetHeight()); return rect; @@ -447,7 +447,7 @@ int wxGIFAnimation::GetDelay(int i) const { wxASSERT_MSG( (m_decoder != (wxGIFDecoder*) NULL), _T("m_decoder must be non-NULL")); - m_decoder->GoFrame(i); + m_decoder->GoFrame(i + 1); return m_decoder->GetDelay(); }