Reversed the meaning of black and white in wxRegion::ConvertToBitmap

so it matches the menaning of black and white in wxMask


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20464 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn 2003-05-03 17:56:30 +00:00
parent 40f359cafe
commit 819451b6c7
11 changed files with 12 additions and 12 deletions

View File

@ -97,7 +97,7 @@ all or some part of the region is contained in this region.
\constfunc{wxBitmap}{ConvertToBitmap}{}
Convert the region to a black and white bitmap with the black pixels
Convert the region to a black and white bitmap with the white pixels
being inside the region.
\membersection{wxRegion::GetBox}\label{wxregiongetbox}

View File

@ -122,7 +122,7 @@ public:
wxRegionContain Contains(const wxPoint& pt) const;
wxRegionContain Contains(const wxRect& rect) const;
// Convert the region to a B&W bitmap with the black pixels being inside
// Convert the region to a B&W bitmap with the white pixels being inside
// the region.
wxBitmap ConvertToBitmap() const;

View File

@ -122,7 +122,7 @@ public:
wxRegionContain Contains(const wxPoint& pt) const;
wxRegionContain Contains(const wxRect& rect) const;
// Convert the region to a B&W bitmap with the black pixels being inside
// Convert the region to a B&W bitmap with the white pixels being inside
// the region.
wxBitmap ConvertToBitmap() const;

View File

@ -117,7 +117,7 @@ public:
// Does the region contain the rectangle rect?
wxRegionContain Contains(const wxRect& rect) const;
// Convert the region to a B&W bitmap with the black pixels being inside
// Convert the region to a B&W bitmap with the white pixels being inside
// the region.
wxBitmap ConvertToBitmap() const;

View File

@ -103,7 +103,7 @@ public:
// Does the region contain the rectangle rect?
wxRegionContain Contains(const wxRect& rect) const;
// Convert the region to a B&W bitmap with the black pixels being inside
// Convert the region to a B&W bitmap with the white pixels being inside
// the region.
wxBitmap ConvertToBitmap() const;

View File

@ -107,7 +107,7 @@ public:
// Does the region contain the rectangle rect?
wxRegionContain Contains(const wxRect& rect) const;
// Convert the region to a B&W bitmap with the black pixels being inside
// Convert the region to a B&W bitmap with the white pixels being inside
// the region.
wxBitmap ConvertToBitmap() const;

View File

@ -114,7 +114,7 @@ public:
// Does the region contain the rectangle rect?
wxRegionContain Contains(const wxRect& rect) const;
// Convert the region to a B&W bitmap with the black pixels being inside
// Convert the region to a B&W bitmap with the white pixels being inside
// the region.
wxBitmap ConvertToBitmap() const;

View File

@ -122,7 +122,7 @@ public:
wxRegionContain Contains(const wxPoint& pt) const;
wxRegionContain Contains(const wxRect& rect) const;
// Convert the region to a B&W bitmap with the black pixels being inside
// Convert the region to a B&W bitmap with the white pixels being inside
// the region.
wxBitmap ConvertToBitmap() const;

View File

@ -37,10 +37,10 @@ wxBitmap wxRegion::ConvertToBitmap() const
wxBitmap bmp(box.GetRight(), box.GetBottom());
wxMemoryDC dc;
dc.SelectObject(bmp);
dc.SetBackground(*wxWHITE_BRUSH);
dc.SetBackground(*wxBLACK_BRUSH);
dc.Clear();
dc.SetClippingRegion(*this);
dc.SetBackground(*wxBLACK_BRUSH);
dc.SetBackground(*wxWHITE_BRUSH);
dc.Clear();
dc.SelectObject(wxNullBitmap);
return bmp;

View File

@ -989,7 +989,7 @@ static bool do_shape_combine_region(GdkWindow* window, const wxRegion& region)
gdk_window_shape_combine_region(window, region.GetRegion(), 0, 0);
#else
wxBitmap bmp = region.ConvertToBitmap();
bmp.SetMask(new wxMask(bmp, *wxWHITE));
bmp.SetMask(new wxMask(bmp, *wxBLACK));
GdkBitmap* mask = bmp.GetMask()->GetBitmap();
gdk_window_shape_combine_mask(window, mask, 0, 0);
#endif

View File

@ -989,7 +989,7 @@ static bool do_shape_combine_region(GdkWindow* window, const wxRegion& region)
gdk_window_shape_combine_region(window, region.GetRegion(), 0, 0);
#else
wxBitmap bmp = region.ConvertToBitmap();
bmp.SetMask(new wxMask(bmp, *wxWHITE));
bmp.SetMask(new wxMask(bmp, *wxBLACK));
GdkBitmap* mask = bmp.GetMask()->GetBitmap();
gdk_window_shape_combine_mask(window, mask, 0, 0);
#endif