initial (not yet working) code for DirectFB port
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40865 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
61
src/dfb/dcmemory.cpp
Normal file
61
src/dfb/dcmemory.cpp
Normal file
@@ -0,0 +1,61 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: src/dfb/dcmemory.cpp
|
||||
// Purpose: wxMemoryDC implementation
|
||||
// Author: Vaclav Slavik
|
||||
// Created: 2006-08-16
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2006 REA Elektronik GmbH
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// ===========================================================================
|
||||
// declarations
|
||||
// ===========================================================================
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// headers
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
// For compilers that support precompilation, includes "wx.h".
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
#include "wx/dcmemory.h"
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/bitmap.h"
|
||||
#endif
|
||||
|
||||
#include "wx/dfb/private.h"
|
||||
|
||||
// ===========================================================================
|
||||
// implementation
|
||||
// ===========================================================================
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxMemoryDC
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#warning "FIXME: verify/fix that wxMemoryDC works correctly with mono bitmaps"
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC, wxDC)
|
||||
|
||||
wxMemoryDC::wxMemoryDC()
|
||||
{
|
||||
}
|
||||
|
||||
wxMemoryDC::wxMemoryDC(wxDC *WXUNUSED(dc))
|
||||
{
|
||||
}
|
||||
|
||||
void wxMemoryDC::SelectObject(const wxBitmap& bitmap)
|
||||
{
|
||||
if ( !bitmap.Ok() )
|
||||
{
|
||||
// select the bitmap out of the DC
|
||||
m_surface = NULL;
|
||||
return;
|
||||
}
|
||||
|
||||
// init the DC for drawing to this bitmap
|
||||
Init(bitmap.GetDirectFBSurface());
|
||||
}
|
Reference in New Issue
Block a user