+ for (wxNode * node = First (); node; node = node->Next ())
+ {
+ wxPen *each_pen = (wxPen *) node->Data ();
+ if (each_pen &&
+ each_pen->GetVisible() &&
+ each_pen->GetWidth () == width &&
+ each_pen->GetStyle () == style &&
+ each_pen->GetColour ().Red () == colour.Red () &&
+ each_pen->GetColour ().Green () == colour.Green () &&
+ each_pen->GetColour ().Blue () == colour.Blue ())
+ return each_pen;
+ }
+
+ wxPen *pen = new wxPen (colour, width, style);
+ if ( !pen->Ok() )