: OPAQUE);
// flag which telsl us to undo changes in the dtor
- m_changed = TRUE;
+ m_changed = true;
}
else
{
// nothing done, nothing to undo
- m_changed = FALSE;
+ m_changed = false;
}
}
m_oldPalette = 0;
#endif // wxUSE_PALETTE
- m_bOwnsDC = FALSE;
+ m_bOwnsDC = false;
m_hDC = 0;
}
}
#endif // Win16/32
- m_clipping = TRUE;
+ m_clipping = true;
UpdateClipBox();
}
::DeleteObject(rgn);
}
- m_clipping = FALSE;
+ m_clipping = false;
}
// ---------------------------------------------------------------------------
bool wxDC::CanDrawBitmap() const
{
- return TRUE;
+ return true;
}
bool wxDC::CanGetTextExtent() const
{
#ifdef __WXMICROWIN__
// TODO Extend MicroWindows' GetDeviceCaps function
- return TRUE;
+ return true;
#else
// What sort of display is it?
int technology = ::GetDeviceCaps(GetHdc(), TECHNOLOGY);
bool wxDC::DoFloodFill(wxCoord x, wxCoord y, const wxColour& col, int style)
{
#ifdef __WXWINCE__
- return FALSE;
+ return false;
#else
- WXMICROWIN_CHECK_HDC_RET(FALSE)
+ WXMICROWIN_CHECK_HDC_RET(false)
bool success = (0 != ::ExtFloodFill(GetHdc(), XLOG2DEV(x), YLOG2DEV(y),
col.GetPixel(),
bool wxDC::DoGetPixel(wxCoord x, wxCoord y, wxColour *col) const
{
- WXMICROWIN_CHECK_HDC_RET(FALSE)
+ WXMICROWIN_CHECK_HDC_RET(false)
- wxCHECK_MSG( col, FALSE, _T("NULL colour parameter in wxDC::GetPixel") );
+ wxCHECK_MSG( col, false, _T("NULL colour parameter in wxDC::GetPixel") );
// get the color of the pixel
COLORREF pixelcolor = ::GetPixel(GetHdc(), XLOG2DEV(x), YLOG2DEV(y));
wxRGBToColour(*col, pixelcolor);
- return TRUE;
+ return true;
}
void wxDC::DoCrossHair(wxCoord x, wxCoord y)
{
// don't give assert here because this would break existing
// programs - just silently ignore useMask parameter
- useMask = FALSE;
+ useMask = false;
}
}
if ( useMask )
// On some systems, MaskBlt succeeds yet is much much slower
// than the wxWindows fall-back implementation. So we need
// to be able to switch this on and off at runtime.
- bool ok = FALSE;
+ bool ok = false;
#if wxUSE_SYSTEM_OPTIONS
if (wxSystemOptions::GetOptionInt(wxT("no-maskblt")) == 0)
#endif
{
HPALETTE oldPal = ::SelectPalette(GetHdc(),
GetHpaletteOf(m_palette),
- FALSE);
+ false);
if (!m_oldPalette)
m_oldPalette = (WXHPALETTE) oldPal;
if ( palette.Ok() )
{
m_palette = palette;
- DoSelectPalette(TRUE);
+ DoSelectPalette(true);
}
}
wxLogLastError(_T("SelectObject(old font)"));
}
- m_oldFont = NULL;
+ m_oldFont = 0;
}
m_font = wxNullFont;
wxLogLastError(_T("SelectObject(old pen)"));
}
- m_oldPen = NULL;
+ m_oldPen = 0;
}
m_pen = wxNullPen;
wxLogLastError(_T("SelectObject(old brush)"));
}
- m_oldBrush = NULL;
+ m_oldBrush = 0;
}
m_brush = wxNullBrush;
bool wxDC::StartDoc(const wxString& WXUNUSED(message))
{
- // We might be previewing, so return TRUE to let it continue.
- return TRUE;
+ // We might be previewing, so return true to let it continue.
+ return true;
}
void wxDC::EndDoc()
int rop, bool useMask,
wxCoord xsrcMask, wxCoord ysrcMask)
{
- wxCHECK_MSG( source, FALSE, _T("wxDC::Blit(): NULL wxDC pointer") );
+ wxCHECK_MSG( source, false, _T("wxDC::Blit(): NULL wxDC pointer") );
- WXMICROWIN_CHECK_HDC_RET(FALSE)
+ WXMICROWIN_CHECK_HDC_RET(false)
const wxBitmap& bmpSrc = source->m_selectedBitmap;
if ( bmpSrc.Ok() && bmpSrc.HasAlpha() )
{
if ( AlphaBlt(GetHdc(), xdest, ydest, width, height,
GetHdcOf(*source), bmpSrc) )
- return TRUE;
+ return true;
}
wxMask *mask = NULL;
{
// don't give assert here because this would break existing
// programs - just silently ignore useMask parameter
- useMask = FALSE;
+ useMask = false;
}
}
case wxNOR: dwRop = NOTSRCCOPY; break;
default:
wxFAIL_MSG( wxT("unsupported logical function") );
- return FALSE;
+ return false;
}
- bool success = FALSE;
+ bool success = false;
if (useMask)
{
}
else
{
- success = TRUE;
+ success = true;
}
}
}
}
else
{
- success = TRUE;
+ success = true;
}
}
}
else
{
- success = TRUE;
+ success = true;
}
}
}
class wxDCModule : public wxModule
{
public:
- virtual bool OnInit() { return TRUE; }
+ virtual bool OnInit() { return true; }
virtual void OnExit() { wxDC::ClearCache(); }
private:
// bitmaps can be drawn only from GUI thread so there is no need to
// protect this static variable from multiple threads
- static bool s_triedToLoad = FALSE;
+ static bool s_triedToLoad = false;
static AlphaBlend_t pfnAlphaBlend = NULL;
if ( !s_triedToLoad )
{
- s_triedToLoad = TRUE;
+ s_triedToLoad = true;
// don't give errors about the DLL being unavailable, we're
// prepared to handle this
bf) )
{
// skip wxAlphaBlend() call below
- return TRUE;
+ return true;
}
wxLogLastError(_T("AlphaBlend"));
#ifdef wxHAVE_RAW_BITMAP
wxAlphaBlend(hdcDst, x, y, width, height, bmp);
- return TRUE;
+ return true;
#else // !wxHAVE_RAW_BITMAP
// no wxAlphaBlend() neither, fall back to using simple BitBlt() (we lose
// alpha but at least something will be shown like this)
- return FALSE;
+ return false;
#endif // wxHAVE_RAW_BITMAP
}