If you want to use Ruby TK for painting – and not just displaying pictures from the disk – you can use the widget TkCanvas. To this widget you can add lines, polygons, elipses and circles etc. Now, to add a shape to a canvas in Perl you would use the syntax: $canvas->createLine(x1, y1…, xn, …