This blog post is a survey of the graphics programs available on Linux. A friend complained how hard it is to even draw a square with the Gimp. My suggestion is there are better tools for drawing and the Gimp is better left to image manipulation.
So what tools are there for drawing a square?
Inkscape has got to be the most popular free drawing tool. Inkscape is an Open Source vector graphics editor, with capabilities similar to Illustrator using the standard Scalable Vector Graphics (SVG) file format.
To draw a square in Inkscape: Click on the rectangles tool
(or push F4), and while holding down Ctrl (to keep the ratio right) draw your square. We want a black empty square so now we need to edit the Fill and Stroke. Click on the Fill colour in the bottom left corner and the Fill and Stroke dialog will pop up. Select X for no Fill. Change to the Stroke paint tab and select black for the stroke. On the Stroke style tab you can select the width of the stroke. (On my screen the black stroke looked kind of grey until I zoomed in (+) on it.)
OpenOffice.org comes with a basic drawing tool, oodraw. This might be all you need if you are working with oowrite and just want to add a simple diagram.
To draw a square in oodraw: Click on the rectangle tool
and while holding down Ctrl+Shift draw your square. Right-click the square, select Area | Fill: None | ok. The line colour defaults to black, but if you want to change it just right-click (must be on the outline now) and choose Line, then change the colour.
For the child in all of us Tux Paint is fun to play with. The truth is it is actually harder to create a neat drawing in Tux Paint than in Inkscape. But then having fun is the point, not neat drawings to illustrate the report to your boss. Children might like this app too.
To draw a square in Tux Paint: First select the shapes tool
on the left, then the open square shape
on the right. Select how big you want your square and what crazy angle you want it on.
Xara Xtreme looked cool when it was open-sourced, but doesn’t seem to have gone anywhere fast. (I may be out of date on this.) Wikipedia says “The port is still in its first stages and, while usable, currently lacks major features.”
Dia is a GTK+ based diagram creation program. It is similar to Visio, but unfortunately doesn’t match it. For basic diagrams though Dia is useful.
Getting a bit off topic. I have found the cpp->dia (aka cpp2dia) tool very useful for reverse engineering UML diagrams from existing C++ source. Pity it hasn’t been updated since 2003.
To draw a square in Dia: Click on the box tool
and draw your square. There is no keypress I am aware of to to force the ratio to be a square. After you’ve drawn it though you can right click on the shape and edit its properties.
But what if you really want to draw a square using the Gimp?
For example you may have a photo and want to draw attention to a region in it.
First I’d suggest you create a new transparent layer for your square Layer | New Layer. This lets you work on your square without it messing up the rest of your image.
You may also find it useful to drag out guides from the rulers to mark the boundaries of your square.
Method One: Use the Gfig plugin
Updated: Thanks to Penguin Pete we’ve learnt there is a gfig plugin which can draw all kinds of shapes under the menu Filters | Render | Gfig. Use the rectangle tool
to create the square and move single point tool
to adjust its size. I didn’t find a way of maintain the square ratio, but you can use snap to grid to help with that.
Method Two: Use the Rectangular Select and Bucket Fill Tool draw a solid square
Use the rectangle select tool
to select the region, then use the bucket fill tool
to paint the square. This could then be used as a background, e.g. for some text.
Method Three: Use Select Invert and layer transparency to create a square “window”
Select the area we want to highlight with the rectangle select tool again, but this time choose the menu item Select | Invert to select everything outside the window. Now use the bucket fill tool to paint this area white. Then the cool bit: wind down the layer’s Opacity in the layer options until the layer underneath is visible, but the selected area is still highlighted.