- wxRegion region(m_bmp, *wxWHITE);
- m_hasShape = SetShape(region);
+ switch ( m_shapeKind )
+ {
+ case Shape_None:
+ SetShape(wxRegion());
+ break;
+
+ case Shape_Star:
+ SetShape(wxRegion(m_bmp, *wxWHITE));
+ break;
+
+#if wxUSE_GRAPHICS_CONTEXT
+ case Shape_Circle:
+ {
+ wxGraphicsPath
+ path = wxGraphicsRenderer::GetDefaultRenderer()->CreatePath();
+ path.AddCircle(m_bmp.GetWidth()/2, m_bmp.GetHeight()/2, 30);
+ SetShape(path);
+ }
+ break;
+#endif // wxUSE_GRAPHICS_CONTEXT
+
+ case Shape_Max:
+ wxFAIL_MSG( "invalid shape kind" );
+ break;
+ }