projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix broken and missing DataView interface items for Phoenix
[wxWidgets.git]
/
src
/
msw
/
dcmemory.cpp
diff --git
a/src/msw/dcmemory.cpp
b/src/msw/dcmemory.cpp
index 7da1ce87c5b4a4b4b5ff0c52c199edb7203bfb60..b419feb7152296413b5d4c37c6bb805e5a365e6d 100644
(file)
--- a/
src/msw/dcmemory.cpp
+++ b/
src/msw/dcmemory.cpp
@@
-32,10
+32,6
@@
#include "wx/log.h"
#endif
#include "wx/log.h"
#endif
-#if wxUSE_GRAPHICS_CONTEXT
-#include "wx/graphics.h"
-#endif
-
#include "wx/msw/private.h"
// ----------------------------------------------------------------------------
#include "wx/msw/private.h"
// ----------------------------------------------------------------------------
@@
-44,25
+40,25
@@
IMPLEMENT_ABSTRACT_CLASS(wxMemoryDCImpl, wxMSWDCImpl)
IMPLEMENT_ABSTRACT_CLASS(wxMemoryDCImpl, wxMSWDCImpl)
-wxMemoryDCImpl::wxMemoryDCImpl( wxMemoryDC *owner )
+wxMemoryDCImpl::wxMemoryDCImpl( wxMemoryDC *owner )
: wxMSWDCImpl( owner )
{
: wxMSWDCImpl( owner )
{
- CreateCompatible(NULL);
- Init();
+ CreateCompatible(NULL);
+ Init();
}
}
-wxMemoryDCImpl::wxMemoryDCImpl( wxMemoryDC *owner, wxBitmap& bitmap )
- : wxMSWDCImpl( owner )
-{
- CreateCompatible(NULL);
- Init();
+wxMemoryDCImpl::wxMemoryDCImpl( wxMemoryDC *owner, wxBitmap& bitmap )
+ : wxMSWDCImpl( owner )
+{
+ CreateCompatible(NULL);
+ Init();
DoSelect(bitmap);
}
wxMemoryDCImpl::wxMemoryDCImpl( wxMemoryDC *owner, wxDC *dc )
DoSelect(bitmap);
}
wxMemoryDCImpl::wxMemoryDCImpl( wxMemoryDC *owner, wxDC *dc )
- : wxMSWDCImpl( owner )
+ : wxMSWDCImpl( owner )
{
{
- wxCHECK_RET( dc,
_
T("NULL dc in wxMemoryDC ctor") );
+ wxCHECK_RET( dc,
wx
T("NULL dc in wxMemoryDC ctor") );
CreateCompatible(dc);
CreateCompatible(dc);
@@
-82,14
+78,6
@@
void wxMemoryDCImpl::Init()
}
}
}
}
-#if wxUSE_GRAPHICS_CONTEXT
-wxGraphicsContext* wxMemoryDCImpl::CreateGraphicsContext()
-{
- wxMemoryDC *memdc = (wxMemoryDC*) GetOwner();
- return wxGraphicsRenderer::GetDefaultRenderer()->CreateContext( *memdc );
-}
-#endif
-
bool wxMemoryDCImpl::CreateCompatible(wxDC *dc)
{
wxDCImpl *impl = dc ? dc->GetImpl() : NULL ;
bool wxMemoryDCImpl::CreateCompatible(wxDC *dc)
{
wxDCImpl *impl = dc ? dc->GetImpl() : NULL ;
@@
-116,11
+104,9
@@
void wxMemoryDCImpl::DoSelect( const wxBitmap& bitmap )
if ( m_oldBitmap )
{
::SelectObject(GetHdc(), (HBITMAP) m_oldBitmap);
if ( m_oldBitmap )
{
::SelectObject(GetHdc(), (HBITMAP) m_oldBitmap);
- if ( m_selectedBitmap.Ok() )
+ if ( m_selectedBitmap.
Is
Ok() )
{
{
-#ifdef __WXDEBUG__
m_selectedBitmap.SetSelectedInto(NULL);
m_selectedBitmap.SetSelectedInto(NULL);
-#endif
m_selectedBitmap = wxNullBitmap;
}
}
m_selectedBitmap = wxNullBitmap;
}
}
@@
-135,9
+121,7
@@
void wxMemoryDCImpl::DoSelect( const wxBitmap& bitmap )
if ( !hBmp )
return;
if ( !hBmp )
return;
-#ifdef __WXDEBUG__
m_selectedBitmap.SetSelectedInto(GetOwner());
m_selectedBitmap.SetSelectedInto(GetOwner());
-#endif
hBmp = (WXHBITMAP)::SelectObject(GetHdc(), (HBITMAP)hBmp);
if ( !hBmp )
hBmp = (WXHBITMAP)::SelectObject(GetHdc(), (HBITMAP)hBmp);
if ( !hBmp )
@@
-154,7
+138,7
@@
void wxMemoryDCImpl::DoSelect( const wxBitmap& bitmap )
void wxMemoryDCImpl::DoGetSize(int *width, int *height) const
{
void wxMemoryDCImpl::DoGetSize(int *width, int *height) const
{
- if ( m_selectedBitmap.Ok() )
+ if ( m_selectedBitmap.
Is
Ok() )
{
*width = m_selectedBitmap.GetWidth();
*height = m_selectedBitmap.GetHeight();
{
*width = m_selectedBitmap.GetWidth();
*height = m_selectedBitmap.GetHeight();
@@
-179,7
+163,7
@@
static void wxDrawRectangle(wxDC& dc, wxCoord x, wxCoord y, wxCoord width, wxCoo
{
wxBrush brush(dc.GetBrush());
wxPen pen(dc.GetPen());
{
wxBrush brush(dc.GetBrush());
wxPen pen(dc.GetPen());
- if (brush.Ok() && brush.GetStyle() != wxTRANSPARENT)
+ if (brush.
Is
Ok() && brush.GetStyle() != wxTRANSPARENT)
{
HBRUSH hBrush = (HBRUSH) brush.GetResourceHandle() ;
if (hBrush)
{
HBRUSH hBrush = (HBRUSH) brush.GetResourceHandle() ;
if (hBrush)
@@
-192,7
+176,7
@@
static void wxDrawRectangle(wxDC& dc, wxCoord x, wxCoord y, wxCoord width, wxCoo
}
}
width --; height --;
}
}
width --; height --;
- if (pen.Ok() && pen.GetStyle() != wxTRANSPARENT)
+ if (pen.
Is
Ok() && pen.GetStyle() != wxTRANSPARENT)
{
dc.DrawLine(x, y, x + width, y);
dc.DrawLine(x, y, x, y + height);
{
dc.DrawLine(x, y, x + width, y);
dc.DrawLine(x, y, x, y + height);
@@
-208,7
+192,7
@@
void wxMemoryDCImpl::DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoor
// Set this to 1 to work around an apparent video driver bug
// (visible with e.g. 70x70 rectangle on a memory DC; see Drawing sample)
#if wxUSE_MEMORY_DC_DRAW_RECTANGLE
// Set this to 1 to work around an apparent video driver bug
// (visible with e.g. 70x70 rectangle on a memory DC; see Drawing sample)
#if wxUSE_MEMORY_DC_DRAW_RECTANGLE
- if (m_brush.
Ok() && m_pen.
Ok() &&
+ if (m_brush.
IsOk() && m_pen.Is
Ok() &&
(m_brush.GetStyle() == wxSOLID || m_brush.GetStyle() == wxTRANSPARENT) &&
(m_pen.GetStyle() == wxSOLID || m_pen.GetStyle() == wxTRANSPARENT) &&
(GetLogicalFunction() == wxCOPY))
(m_brush.GetStyle() == wxSOLID || m_brush.GetStyle() == wxTRANSPARENT) &&
(m_pen.GetStyle() == wxSOLID || m_pen.GetStyle() == wxTRANSPARENT) &&
(GetLogicalFunction() == wxCOPY))