- // The empty region signifies that the shape
- // should be removed from the window.
- if ( region.IsEmpty() )
+ return m_nowpeer->SetShape(region);
+}
+
+#if wxUSE_GRAPHICS_CONTEXT
+
+#include "wx/scopedptr.h"
+
+bool wxNonOwnedWindow::DoSetPathShape(const wxGraphicsPath& path)
+{
+ m_shapePath = path;
+
+ // Convert the path to wxRegion by rendering the path on a window-sized
+ // bitmap, creating a mask from it and finally creating the region from
+ // this mask.
+ wxBitmap bmp(GetSize());
+