replaced Ok() with IsOk(), no real changes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41844 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -68,7 +68,7 @@ bool wxANIDecoder::ConvertToImage(size_t frame, wxImage *image) const
|
|||||||
{
|
{
|
||||||
size_t idx = m_info[frame].m_imageIndex;
|
size_t idx = m_info[frame].m_imageIndex;
|
||||||
*image = m_images[idx]; // copy
|
*image = m_images[idx]; // copy
|
||||||
return image->Ok();
|
return image->IsOk();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -234,7 +234,7 @@ bool wxANIDecoder::Load( wxInputStream& stream )
|
|||||||
|
|
||||||
// save interesting info from the header
|
// save interesting info from the header
|
||||||
m_nFrames = header.cSteps; // NB: not cFrames!!
|
m_nFrames = header.cSteps; // NB: not cFrames!!
|
||||||
if (m_nFrames==0)
|
if ( m_nFrames == 0 )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
globaldelay = wxINT32_SWAP_ON_BE(header.JifRate) * 1000 / 60;
|
globaldelay = wxINT32_SWAP_ON_BE(header.JifRate) * 1000 / 60;
|
||||||
|
@@ -99,7 +99,7 @@ wxColour wxAnimation::GetBackgroundColour() const
|
|||||||
bool wxAnimation::LoadFile(const wxString& filename, wxAnimationType type)
|
bool wxAnimation::LoadFile(const wxString& filename, wxAnimationType type)
|
||||||
{
|
{
|
||||||
wxFileInputStream stream(filename);
|
wxFileInputStream stream(filename);
|
||||||
if (!stream.Ok())
|
if ( !stream.IsOk() )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return Load(stream, type);
|
return Load(stream, type);
|
||||||
@@ -389,7 +389,7 @@ void wxAnimationCtrl::RebuildBackingStoreUpToFrame(size_t frame)
|
|||||||
int w = wxMin(sz.GetWidth(), winsz.GetWidth());
|
int w = wxMin(sz.GetWidth(), winsz.GetWidth());
|
||||||
int h = wxMin(sz.GetHeight(), winsz.GetHeight());
|
int h = wxMin(sz.GetHeight(), winsz.GetHeight());
|
||||||
|
|
||||||
if ( !m_backingStore.Ok() ||
|
if ( !m_backingStore.IsOk() ||
|
||||||
m_backingStore.GetWidth() < w || m_backingStore.GetHeight() < h )
|
m_backingStore.GetWidth() < w || m_backingStore.GetHeight() < h )
|
||||||
{
|
{
|
||||||
m_backingStore.Create(w, h);
|
m_backingStore.Create(w, h);
|
||||||
@@ -481,7 +481,7 @@ void wxAnimationCtrl::DrawFrame(wxDC &dc, size_t frame)
|
|||||||
|
|
||||||
void wxAnimationCtrl::DrawCurrentFrame(wxDC& dc)
|
void wxAnimationCtrl::DrawCurrentFrame(wxDC& dc)
|
||||||
{
|
{
|
||||||
wxASSERT(m_backingStore.Ok());
|
wxASSERT( m_backingStore.IsOk() );
|
||||||
|
|
||||||
// m_backingStore always contains the current frame
|
// m_backingStore always contains the current frame
|
||||||
dc.DrawBitmap(m_backingStore, 0, 0);
|
dc.DrawBitmap(m_backingStore, 0, 0);
|
||||||
@@ -489,8 +489,9 @@ void wxAnimationCtrl::DrawCurrentFrame(wxDC& dc)
|
|||||||
|
|
||||||
void wxAnimationCtrl::DisposeToBackground(wxDC& dc)
|
void wxAnimationCtrl::DisposeToBackground(wxDC& dc)
|
||||||
{
|
{
|
||||||
wxBrush brush(IsUsingWindowBackgroundColour() ?
|
wxBrush brush(IsUsingWindowBackgroundColour()
|
||||||
this->GetBackgroundColour() : m_animation.GetBackgroundColour(), wxSOLID);
|
? GetBackgroundColour()
|
||||||
|
: m_animation.GetBackgroundColour());
|
||||||
dc.SetBackground(brush);
|
dc.SetBackground(brush);
|
||||||
dc.Clear();
|
dc.Clear();
|
||||||
}
|
}
|
||||||
@@ -505,7 +506,7 @@ void wxAnimationCtrl::OnPaint(wxPaintEvent& WXUNUSED(event))
|
|||||||
wxPaintDC dc(this);
|
wxPaintDC dc(this);
|
||||||
|
|
||||||
// both if we are playing or not, we need to refresh the current frame
|
// both if we are playing or not, we need to refresh the current frame
|
||||||
if (m_backingStore.Ok())
|
if ( m_backingStore.IsOk() )
|
||||||
DrawCurrentFrame(dc);
|
DrawCurrentFrame(dc);
|
||||||
//else: m_animation is not valid and thus we don't have a valid backing store...
|
//else: m_animation is not valid and thus we don't have a valid backing store...
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user