no message

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3997 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
David Webster
1999-10-14 22:36:24 +00:00
parent 4c0a2c5c3e
commit fb46a9a6c6
30 changed files with 1176 additions and 1398 deletions

View File

@@ -1,35 +1,72 @@
/////////////////////////////////////////////////////////////////////////////
// Name: dcmemory.cpp
// Purpose: wxMemoryDC class
// Author: AUTHOR
// Author: David Webster
// Modified by:
// Created: 01/02/97
// Created: 10/14/99
// RCS-ID: $Id$
// Copyright: (c) AUTHOR
// Licence: wxWindows licence
// Copyright: (c) David Webster
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#pragma implementation "dcmemory.h"
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#ifndef WX_PRECOMP
#include "wx/utils.h"
#endif
#include "wx/os2/private.h"
#include "wx/dcmemory.h"
//-----------------------------------------------------------------------------
// wxMemoryDC
//-----------------------------------------------------------------------------
#if !USE_SHARED_LIBRARY
IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC, wxDC)
#endif
IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC,wxPaintDC)
/*
* Memory DC
*
*/
wxMemoryDC::wxMemoryDC(void)
{
m_ok = FALSE;
};
// TODO:
/*
m_hDC = (WXHDC) ::CreateCompatibleDC((HDC) NULL);
m_ok = (m_hDC != 0);
m_bOwnsDC = TRUE;
wxMemoryDC::wxMemoryDC( wxDC *WXUNUSED(dc) )
SetBrush(*wxWHITE_BRUSH);
SetPen(*wxBLACK_PEN);
// the background mode is only used for text background
// and is set in DrawText() to OPAQUE as required, other-
// wise always TRANSPARENT, RR
::SetBkMode( GetHdc(), TRANSPARENT );
*/
}
wxMemoryDC::wxMemoryDC(wxDC *old_dc)
{
m_ok = FALSE;
};
// TODO:
/*
old_dc->BeginDrawing();
m_hDC = (WXHDC) ::CreateCompatibleDC((HDC) old_dc->GetHDC());
m_ok = (m_hDC != 0);
old_dc->EndDrawing();
SetBrush(*wxWHITE_BRUSH);
SetPen(*wxBLACK_PEN);
// the background mode is only used for text background
// and is set in DrawText() to OPAQUE as required, other-
// wise always TRANSPARENT, RR
::SetBkMode( GetHdc(), TRANSPARENT );
*/
}
wxMemoryDC::~wxMemoryDC(void)
{
@@ -37,28 +74,18 @@ wxMemoryDC::~wxMemoryDC(void)
void wxMemoryDC::SelectObject( const wxBitmap& bitmap )
{
m_selected = bitmap;
if (m_selected.Ok())
{
}
else
{
m_ok = FALSE;
};
// TODO:
};
void wxMemoryDC::GetSize( int *width, int *height ) const
void wxMemoryDC::DoGetSize( int *width, int *height ) const
{
if (m_selected.Ok())
if (!m_selectedBitmap.Ok())
{
if (width) (*width) = m_selected.GetWidth();
if (height) (*height) = m_selected.GetHeight();
*width = 0; *height = 0;
return;
}
else
{
if (width) (*width) = 0;
if (height) (*height) = 0;
};
*width = m_selectedBitmap.GetWidth();
*height = m_selectedBitmap.GetHeight();
};