// Author: David Webster
// Modified by:
// Created: 08/08/99
-// RCS-ID: $Id$
// Copyright: (c) David Webster
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
{
UnRef();
- if (!rCursor.Ok())
+ if (!rCursor.IsOk())
return(false);
return(CopyFromIconOrCursor(rCursor));
} // end of wxBitmap::CopyFromCursor
{
UnRef();
- if (!rIcon.Ok())
+ if (!rIcon.IsOk())
return(false);
return CopyFromIconOrCursor(rIcon);
}
SetHBITMAP((WXHBITMAP)hBmp);
- return Ok();
+ return IsOk();
} // end of wxBitmap::Create
bool wxBitmap::LoadFile(const wxString& filename, wxBitmapType type)
else // no bitmap handler found
{
wxImage image;
- if ( image.LoadFile( filename, type ) && image.Ok() )
+ if ( image.LoadFile( filename, type ) && image.IsOk() )
{
*this = wxBitmap(image);
// FIXME what about palette? shouldn't we use it?
wxImage vImage = ConvertToImage();
- if (!vImage.Ok())
+ if (!vImage.IsOk())
return false;
return(vImage.SaveFile( rFilename
, int nDepth
)
{
- wxCHECK_MSG(rImage.Ok(), false, wxT("invalid image"));
+ wxCHECK_MSG(rImage.IsOk(), false, wxT("invalid image"));
m_refData = new wxBitmapRefData();
int nSizeLimit = 1024 * 768 * 3;
//
// Set bitmap parameters
//
- wxCHECK_MSG(rImage.Ok(), false, wxT("invalid image"));
+ wxCHECK_MSG(rImage.IsOk(), false, wxT("invalid image"));
SetWidth(nWidth);
SetHeight(nBmpHeight);
if (nDepth == 1)
);
#if wxUSE_PALETTE
HPAL hOldPalette = NULLHANDLE;
- if (rImage.GetPalette().Ok())
+ if (rImage.GetPalette().IsOk())
{
hOldPalette = ::GpiSelectPalette(hPS, (HPAL)rImage.GetPalette().GetHPALETTE());
}
wxImage vImage;
wxDC* pDC;
- wxCHECK_MSG( Ok(), wxNullImage, wxT("invalid bitmap") );
+ wxCHECK_MSG( IsOk(), wxNullImage, wxT("invalid bitmap") );
//
// Create an wxImage object
const wxRect& rRect
) const
{
- wxCHECK_MSG( Ok() &&
+ wxCHECK_MSG( IsOk() &&
(rRect.x >= 0) && (rRect.y >= 0) &&
(rRect.x + rRect.width <= GetWidth()) &&
(rRect.y + rRect.height <= GetHeight()),
,rRect.height
,GetDepth()
);
- wxASSERT_MSG( vRet.Ok(), wxT("GetSubBitmap error") );
+ wxASSERT_MSG( vRet.IsOk(), wxT("GetSubBitmap error") );
//
::GpiDeleteBitmap((HBITMAP) m_hMaskBitmap);
m_hMaskBitmap = 0;
}
- if (!rBitmap.Ok() || rBitmap.GetDepth() != 1)
+ if (!rBitmap.IsOk() || rBitmap.GetDepth() != 1)
{
return false;
}
::GpiDeleteBitmap((HBITMAP) m_hMaskBitmap);
m_hMaskBitmap = 0;
}
- if (rBitmap.Ok() && rBitmap.GetPalette()->Ok())
+ if (rBitmap.IsOk() && rBitmap.GetPalette()->IsOk())
{
unsigned char cRed;
unsigned char cGreen;
::GpiDeleteBitmap((HBITMAP) m_hMaskBitmap);
m_hMaskBitmap = 0;
}
- if (!rBitmap.Ok())
+ if (!rBitmap.IsOk())
{
return false;
}