projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Made all bitmaps 16x16
[wxWidgets.git]
/
src
/
mgl
/
brush.cpp
diff --git
a/src/mgl/brush.cpp
b/src/mgl/brush.cpp
index cf45da2f9a81cceafea69327a9336785cd905e9d..cb542c34f8c1b2d98b5b93803b40eab8eb8f93c9 100644
(file)
--- a/
src/mgl/brush.cpp
+++ b/
src/mgl/brush.cpp
@@
-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());
}