// Purpose: wxDFBDCImpl class
// Author: Vaclav Slavik
// Created: 2006-08-07
-// RCS-ID: $Id$
// Copyright: (c) 2006 REA Elektronik GmbH
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// FIXME_DFB: implement special cases for common formats (RGB24,RGBA/RGB32)
}
-void wxDFBDCImpl::DoDrawPolygon(int WXUNUSED(n), wxPoint WXUNUSED(points)[],
+void wxDFBDCImpl::DoDrawPolygon(int WXUNUSED(n), const wxPoint WXUNUSED(points)[],
wxCoord WXUNUSED(xoffset), wxCoord WXUNUSED(yoffset),
wxPolygonFillMode WXUNUSED(fillStyle))
{
wxFAIL_MSG( "DrawPolygon not implemented" );
}
-void wxDFBDCImpl::DoDrawLines(int WXUNUSED(n), wxPoint WXUNUSED(points)[],
+void wxDFBDCImpl::DoDrawLines(int WXUNUSED(n), const wxPoint WXUNUSED(points)[],
wxCoord WXUNUSED(xoffset), wxCoord WXUNUSED(yoffset))
{
wxCHECK_RET( IsOk(), wxT("invalid dc") );
// if background mode is solid, DrawText must paint text's background:
if ( m_backgroundMode == wxSOLID )
{
- wxCHECK_RET( m_textBackgroundColour.Ok(),
+ wxCHECK_RET( m_textBackgroundColour.IsOk(),
wxT("invalid background color") );
SelectColour(m_textBackgroundColour);
}
// finally draw the text itself:
- wxCHECK_RET( m_textForegroundColour.Ok(),
+ wxCHECK_RET( m_textForegroundColour.IsOk(),
wxT("invalid foreground color") );
SelectColour(m_textForegroundColour);
m_surface->DrawString(text.utf8_str(), -1, xx, yy, DSTF_LEFT | DSTF_TOP);
void wxDFBDCImpl::SetPen(const wxPen& pen)
{
- m_pen = pen.Ok() ? pen : DEFAULT_PEN;
+ m_pen = pen.IsOk() ? pen : DEFAULT_PEN;
SelectColour(m_pen.GetColour());
}
void wxDFBDCImpl::SetBrush(const wxBrush& brush)
{
- m_brush = brush.Ok() ? brush : DEFAULT_BRUSH;
+ m_brush = brush.IsOk() ? brush : DEFAULT_BRUSH;
}
void wxDFBDCImpl::SelectColour(const wxColour& clr)
{
wxCHECK_RET( IsOk(), wxT("invalid dc") );
- wxFont f(font.Ok() ? font : DEFAULT_FONT);
+ wxFont f(font.IsOk() ? font : DEFAULT_FONT);
wxFont oldfont(m_font);
{
wxCHECK_RET( IsOk(), wxT("invalid dc") );
- if (!brush.Ok()) return;
+ if (!brush.IsOk()) return;
m_backgroundBrush = brush;
}
wxCoord wxDFBDCImpl::GetCharHeight() const
{
wxCHECK_MSG( IsOk(), -1, wxT("invalid dc") );
- wxCHECK_MSG( m_font.Ok(), -1, wxT("no font selected") );
+ wxCHECK_MSG( m_font.IsOk(), -1, wxT("no font selected") );
int h = -1;
GetCurrentFont()->GetHeight(&h);
wxCoord wxDFBDCImpl::GetCharWidth() const
{
wxCHECK_MSG( IsOk(), -1, wxT("invalid dc") );
- wxCHECK_MSG( m_font.Ok(), -1, wxT("no font selected") );
+ wxCHECK_MSG( m_font.IsOk(), -1, wxT("no font selected") );
int w = -1;
GetCurrentFont()->GetStringWidth("H", 1, &w);
const wxFont *theFont) const
{
wxCHECK_RET( IsOk(), wxT("invalid dc") );
- wxCHECK_RET( m_font.Ok(), wxT("no font selected") );
- wxCHECK_RET( !theFont || theFont->Ok(), wxT("invalid font") );
+ wxCHECK_RET( m_font.IsOk(), wxT("no font selected") );
+ wxCHECK_RET( !theFont || theFont->IsOk(), wxT("invalid font") );
wxFont oldFont;
if ( theFont != NULL )
void wxDFBDCImpl::DoDrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y, bool useMask)
{
wxCHECK_RET( IsOk(), wxT("invalid dc") );
- wxCHECK_RET( bmp.Ok(), wxT("invalid bitmap") );
+ wxCHECK_RET( bmp.IsOk(), wxT("invalid bitmap") );
DoDrawSubBitmap(bmp,
0, 0, bmp.GetWidth(), bmp.GetHeight(),
wxCoord destx, wxCoord desty, int rop, bool useMask)
{
wxCHECK_RET( IsOk(), wxT("invalid dc") );
- wxCHECK_RET( bmp.Ok(), wxT("invalid bitmap") );
+ wxCHECK_RET( bmp.IsOk(), wxT("invalid bitmap") );
// NB: we could also support XOR here (via DSBLIT_XOR)
// and possibly others via SetSrc/DstBlendFunction()
if ( useMask && bmp.GetMask() )
{
- // FIXME_DFB: see MGL sources for a way to do it, but it's not directly
- // applicable because DirectFB doesn't implement ROPs; OTOH,
- // it has blitting modes that can be useful; finally, see
+ // FIXME_DFB: Could use blitting modes for this; also see
// DFB's SetSrcBlendFunction() and SetSrcColorKey()
wxFAIL_MSG( "drawing bitmaps with masks not implemented" );
return;