1) Add a singleton (XPainterConstant) for accessing global painter
constant objects;
2) Fill rectangles with the same pen and brush.