+ dc.DrawRectangle( 100, 40, 4, height );
+}
+
+void MyCanvas::DrawImages(wxDC& dc)
+{
+ static const struct
+ {
+ const wxChar *name;
+ int rop;
+ } rasterOperations[] =
+ {
+ { "wxAND", wxAND },
+ { "wxAND_INVERT", wxAND_INVERT },
+ { "wxAND_REVERSE", wxAND_REVERSE },
+ { "wxCLEAR", wxCLEAR },
+ { "wxCOPY", wxCOPY },
+ { "wxEQUIV", wxEQUIV },
+ { "wxINVERT", wxINVERT },
+ { "wxNAND", wxNAND },
+ { "wxNO_OP", wxNO_OP },
+ { "wxOR", wxOR },
+ { "wxOR_INVERT", wxOR_INVERT },
+ { "wxOR_REVERSE", wxOR_REVERSE },
+ { "wxSET", wxSET },
+ { "wxSRC_INVERT", wxSRC_INVERT },
+ { "wxXOR", wxXOR },
+ };
+
+ dc.DrawText("original image", 0, 0);
+ dc.DrawBitmap(gs_bmpNoMask, 0, 20, 0);
+ dc.DrawText("with colour mask", 0, 100);
+ dc.DrawBitmap(gs_bmpWithColMask, 0, 120, TRUE);
+ dc.DrawText("the mask image", 0, 200);
+ dc.DrawBitmap(gs_bmpMask, 0, 220, 0);
+ dc.DrawText("masked image", 0, 300);
+ dc.DrawBitmap(gs_bmpWithMask, 0, 320, TRUE);
+
+ int cx = gs_bmpWithColMask.GetWidth(),
+ cy = gs_bmpWithColMask.GetHeight();
+
+ wxMemoryDC memDC;
+ for ( size_t n = 0; n < WXSIZEOF(rasterOperations); n++ )
+ {
+ wxCoord x = 120 + 150*(n%4),
+ y = 20 + 100*(n/4);