projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix DrawLine() and DrawPolygon() which were totally broken for GTK1 since rev 36998
[wxWidgets.git]
/
src
/
mgl
/
brush.cpp
diff --git
a/src/mgl/brush.cpp
b/src/mgl/brush.cpp
index 039d7ef4f52357f69635dcf2903b3e5e0efdd3b0..b151db8a0a5b0d9663daf021a058aa0c6f347b96 100644
(file)
--- a/
src/mgl/brush.cpp
+++ b/
src/mgl/brush.cpp
@@
-16,7
+16,7
@@
#include "wx/brush.h"
#include "wx/mgl/private.h"
#include "wx/brush.h"
#include "wx/mgl/private.h"
-#include "wx/
mgl/
dcmemory.h"
+#include "wx/dcmemory.h"
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
@@
-35,7
+35,7
@@
void wxBitmapToPixPattern(const wxBitmap& bitmap,
if ( pix != NULL )
{
if ( pix != NULL )
{
- mem.SelectObject(bitmap);
+ mem.SelectObject
AsSource
(bitmap);
dc = mem.GetMGLDC();
wxCurrentDCSwitcher curDC(dc);
dc->beginPixel();
dc = mem.GetMGLDC();
wxCurrentDCSwitcher curDC(dc);
dc->beginPixel();
@@
-50,7
+50,7
@@
void wxBitmapToPixPattern(const wxBitmap& bitmap,
if ( mask && bitmap.GetMask() )
{
if ( mask && bitmap.GetMask() )
{
- mem.SelectObject
(*
bitmap.GetMask()->GetBitmap());
+ mem.SelectObject
AsSource(
bitmap.GetMask()->GetBitmap());
dc = mem.GetMGLDC();
wxCurrentDCSwitcher curDC(dc);
dc->beginPixel();
dc = mem.GetMGLDC();
wxCurrentDCSwitcher curDC(dc);
dc->beginPixel();
@@
-76,6
+76,13
@@
public:
wxBrushRefData();
wxBrushRefData(const wxBrushRefData& data);
wxBrushRefData();
wxBrushRefData(const wxBrushRefData& data);
+ bool operator == (const wxBrushRefData& data) const
+ {
+ return (m_style == data.m_style &&
+ m_stipple.IsSameAs(data.m_stipple) &&
+ m_colour == data.m_colour);
+ }
+
int m_style;
wxColour m_colour;
wxBitmap m_stipple;
int m_style;
wxColour m_colour;
wxBitmap m_stipple;
@@
-145,7
+152,11
@@
wxBrush::wxBrush(const wxBitmap &stippleBitmap)
bool wxBrush::operator == (const wxBrush& brush) const
{
bool wxBrush::operator == (const wxBrush& brush) const
{
- return m_refData == brush.m_refData;
+ if (m_refData == brush.m_refData) return true;
+
+ if (!m_refData || !brush.m_refData) return false;
+
+ return *(wxBrushRefData*)m_refData == *(wxBrushRefData*)brush.m_refData;
}
bool wxBrush::operator != (const wxBrush& brush) const
}
bool wxBrush::operator != (const wxBrush& brush) const
@@
-153,7
+164,7
@@
bool wxBrush::operator != (const wxBrush& brush) const
return m_refData != brush.m_refData;
}
return m_refData != brush.m_refData;
}
-bool wxBrush::Ok() const
+bool wxBrush::
Is
Ok() const
{
return ((m_refData) && M_BRUSHDATA->m_colour.Ok());
}
{
return ((m_refData) && M_BRUSHDATA->m_colour.Ok());
}