+static GdkPixmap* GetHatch(int style)
+{
+ wxASSERT(style >= wxFIRST_HATCH && style <= wxLAST_HATCH);
+ const int i = style - wxFIRST_HATCH;
+ if (hatches[i] == NULL)
+ {
+ switch (style)
+ {
+ case wxBDIAGONAL_HATCH:
+ hatches[i] = gdk_bitmap_create_from_data(NULL, bdiag_bits, bdiag_width, bdiag_height);
+ break;
+ case wxCROSSDIAG_HATCH:
+ hatches[i] = gdk_bitmap_create_from_data(NULL, cdiag_bits, cdiag_width, cdiag_height);
+ break;
+ case wxCROSS_HATCH:
+ hatches[i] = gdk_bitmap_create_from_data(NULL, cross_bits, cross_width, cross_height);
+ break;
+ case wxFDIAGONAL_HATCH:
+ hatches[i] = gdk_bitmap_create_from_data(NULL, fdiag_bits, fdiag_width, fdiag_height);
+ break;
+ case wxHORIZONTAL_HATCH:
+ hatches[i] = gdk_bitmap_create_from_data(NULL, horiz_bits, horiz_width, horiz_height);
+ break;
+ case wxVERTICAL_HATCH:
+ hatches[i] = gdk_bitmap_create_from_data(NULL, verti_bits, verti_width, verti_height);
+ break;
+ }
+ }
+ return hatches[i];
+}
+