+void MyCanvas::DrawGradients(wxDC& dc)
+{
+ // LHS: linear
+ wxRect r(10, 10, 100, 100);
+ dc.GradientFillLinear(r, *wxWHITE, *wxBLUE, wxRIGHT);
+
+ r.Offset(0, 110);
+ dc.GradientFillLinear(r, *wxWHITE, *wxBLUE, wxLEFT);
+
+ r.Offset(0, 110);
+ dc.GradientFillLinear(r, *wxWHITE, *wxBLUE, wxDOWN);
+
+ r.Offset(0, 110);
+ dc.GradientFillLinear(r, *wxWHITE, *wxBLUE, wxUP);
+
+
+ // RHS: concentric
+ r = wxRect(200, 10, 100, 100);
+ dc.GradientFillConcentric(r, *wxBLUE, *wxWHITE);
+
+ r.Offset(0, 110);
+ dc.GradientFillConcentric(r, *wxWHITE, *wxBLUE);
+
+ r.Offset(0, 110);
+ dc.GradientFillConcentric(r, *wxBLUE, *wxWHITE, wxPoint(0, 0));
+
+ r.Offset(0, 110);
+ dc.GradientFillConcentric(r, *wxBLUE, *wxWHITE, wxPoint(100, 100));
+}
+