removed virtual GetSelectedBitmap() from the base wxDC class, it only makes sense for wxMemoryDC
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45146 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -95,7 +95,6 @@ public:
|
|||||||
virtual void ComputeScaleAndOrigin();
|
virtual void ComputeScaleAndOrigin();
|
||||||
|
|
||||||
virtual GdkWindow* GetGDKWindow() const { return NULL; }
|
virtual GdkWindow* GetGDKWindow() const { return NULL; }
|
||||||
virtual wxBitmap GetSelectedBitmap() const { return wxNullBitmap; }
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// implementation
|
// implementation
|
||||||
|
@@ -35,14 +35,17 @@ public:
|
|||||||
virtual void SetTextBackground( const wxColour &col );
|
virtual void SetTextBackground( const wxColour &col );
|
||||||
|
|
||||||
// implementation
|
// implementation
|
||||||
virtual wxBitmap GetSelectedBitmap() const { return m_selected; }
|
wxBitmap GetSelectedBitmap() const { return m_selected; }
|
||||||
wxBitmap m_selected;
|
wxBitmap m_selected;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void DoGetSize( int *width, int *height ) const;
|
void DoGetSize( int *width, int *height ) const;
|
||||||
virtual void DoSelect(const wxBitmap& bitmap);
|
virtual void DoSelect(const wxBitmap& bitmap);
|
||||||
virtual wxBitmap DoGetAsBitmap(const wxRect *subrect) const
|
virtual wxBitmap DoGetAsBitmap(const wxRect *subrect) const
|
||||||
{ return subrect == NULL ? GetSelectedBitmap() : GetSelectedBitmap().GetSubBitmap(*subrect); }
|
{
|
||||||
|
wxBitmap bmp = GetSelectedBitmap();
|
||||||
|
return subrect ? bmp.GetSubBitmap(*subrect) : bmp;
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void Init();
|
void Init();
|
||||||
|
@@ -1217,8 +1217,14 @@ bool wxWindowDC::DoBlit( wxCoord xdest, wxCoord ydest,
|
|||||||
xsrc = source->LogicalToDeviceX(xsrc);
|
xsrc = source->LogicalToDeviceX(xsrc);
|
||||||
ysrc = source->LogicalToDeviceY(ysrc);
|
ysrc = source->LogicalToDeviceY(ysrc);
|
||||||
|
|
||||||
|
wxBitmap selected;
|
||||||
wxMemoryDC *memDC = wxDynamicCast(source, wxMemoryDC);
|
wxMemoryDC *memDC = wxDynamicCast(source, wxMemoryDC);
|
||||||
wxBitmap selected = source->GetSelectedBitmap();
|
if ( memDC )
|
||||||
|
{
|
||||||
|
selected = memDC->GetSelectedBitmap();
|
||||||
|
if ( !selected.IsOk() )
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
bool use_bitmap_method = false;
|
bool use_bitmap_method = false;
|
||||||
bool is_mono = false;
|
bool is_mono = false;
|
||||||
@@ -1229,8 +1235,6 @@ bool wxWindowDC::DoBlit( wxCoord xdest, wxCoord ydest,
|
|||||||
ysrcMask = ysrc;
|
ysrcMask = ysrc;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (memDC && !selected.Ok()) return false;
|
|
||||||
|
|
||||||
if (selected.Ok())
|
if (selected.Ok())
|
||||||
{
|
{
|
||||||
is_mono = (selected.GetDepth() == 1);
|
is_mono = (selected.GetDepth() == 1);
|
||||||
|
Reference in New Issue
Block a user