ArahPaint 4.1f Open Source

© 1992-2011 Arahne, d.o.o.

Download

Download the source from here:
apaint4.1f.tar.bz2 (845 KB)

Why should you try it?

Because this program was not written as someone's lesson in programming, but to solve a real need.
It is used by hundreds of people to do real work, during their day job.
If you just want to try it, without compiling it, then please download the ArahWeave demo, which also contains ArahPaint4.

Why do we need another paint program?

This package contains ArahPaint4, a textile oriented paint program. Textile oriented means that: This is a pixel pushing program, not a photo retouching program. You should look at Photoshop or GIMP if you need red eye reduction. Or just learn how to use the flash. The user's manual, keyboard shortcuts list and screenshots are available from Arahne's web site
http://www.arahne.si

With ArahPaint4, easy things remain easy, while complicated ones remain impossible ;-)

License

ArahPaint4 is licensed under GPL2, and the libraries it uses are licensed under LGPL.

Compilation instructions

ArahPaint4 is usually delivered as a part of ArahWeave CAD/CAM for weaving. Arahne has released ArahPaint4 as open source, together with some custom libraries which ArahPaint4 uses. For this reason, ArahPaint4 uses non-standard build method, since the libraries stay at their place as if it was still part of ArahWeave, to minimize the changes to the code. In this way, it is easier for Arahne to continue the development of open source and non-open source programs in parallel.

To compile ArahPaint4, you will need a C and C++ compiler and development environment for:

After uncompressing the source files with command
tar -jxf apaint4.1f.tar.bz2
you will need the edit one configuration file with a text editor of your choice.
xedit apaint4.1f/main/makeRelease
In that file, you need to edit the line
export QMAKESPEC=/home/dusan/apaint4.1f/main/default
so that it will reference the directory in which you have placed the source. You need to replace /home/dusan with your development directory.

You may also change the line
make -j 4
so that the number after -j reflects the number of CPU cores of your computer. Your compilation will be much faster in parallel. Later, if you wish you can also change the file makeReleaseIcc (if you use Intel C/C++ compiler) or makeDebug (if you wish to make a version with debug symbols). This was the only way we could customize compile Qt environment, without requiring root permissions. The rest should be easy.

The easiest way to build ArahPaint4 is to type
./makeAll
in apaint4 directory.

If all goes well, you should be able to type
cd main
./apaint

and be able to run the program.

If it fails, here are the steps involved: cd into each of the library directories
llib
iolib
plib

and type make in each of those directories. Then go in the main directory and type
makeClean
to clean up the garbage from any previous build, and type
makeRelease
to compile the whole ArahPaint4 program.

If you wish, and know how to configure the beast, you can also use Qt designer to compile and debug the program. On OpenSuse 10.3, you can run the Qt designer with command
/usr/lib/qt3/bin/designer

If ArahPaint4 runs correctly, and you want to use your own version, it is best if you just make a link to the desktop to the script
./main/apaint

Due to some strange bug in qt3 library, the qt library shipped with OpenSUSE 11.0 or 11.1, program runs, and mostly works, but drawing operations (draw line, circle, rectangle), do not work. In order to fix this problem, you need to take the qt library from OpenSUSE 10.3, and it will work. Copy the file libqt-mt.so.3 to main/common/lib, so program will use this library and it will start working correctly.

Making a stand alone distribution

If you want to make a little stand-alone ArahPaint4 distribution, you will need the following files:
main/msg/*.msg all text files for different languages, all texts are UTF8 encoded
main/src/arahpaint4 program's executable
main/apaint script to run the program
main/common/icons directory with all the icons needed by the program (many are also from ArahWeave). All icons need to be 32 bit PNG with alpha channel transparency.
main/common/lib/libAload.so library for all file formats for loading
main/common/lib/libAprint.so library for printing and saving all supported image formats
main/common/lib/libAiconio.so library which handles creation of icons for image browsing
main/common/aspawngp program to print via gimp-print as a separate process
main/common/agutenp program to print via gutenprint as a separate process
main/common/profile/screen screen color profile, unused in ArahPaint4
If you wish, you may also put the extra libraries in a different location, but you will need to modify the LD_LIBRARY_PATH in the apaint script, to reflect that change.

ArahPaint4 configuration settings

ArahPaint4 also reads the
.arahne
configuration file from the user's home directory.

If you use ArahWeave DEMO, you will already have it in place and you do not need to worry about anything. Only ArahWeave can write the .arahne configuration file, to avoid confusion of several programs writing settings at the same time. If you wish to configure ArahPaint4 to your defaults, but you do not have ArahWeave, you will need to edit .arahne file by hand. Here is a sample contents of .arahne file, which you need to place at the home directory:
#MESSAGES_FILE=eng.txtchoose the program language: chi, eng, fin, fre, ger, ita, slo, spa, tha, tur
#PRINTER_XDPI=1440000printer x dpi x 1000
#PRINTER_YDPI=720000printer y dpi x 1000
#PRINTER_TYPE=StylusR200 (gimp-print)selected printer name
#PRINT_LEFT_BORDER=3.00left print border in mm
#PRINT_UPPER_BORDER=3.00upper print border in mm
#PRINT_WIDTH=203.00print width in mm
#PRINT_HEIGHT=279.00print height in mm
#PATH_IMAGES=/home/capdam/data/imgchange default image directory
#METRIC_SYSTEM=1do we prefer metric or imperial system (for ruler)
#PRINT_COMMAND=/usr/bin/lpr -o raw -Plp -#%dcommand to send the binary print file to printer
#CLEAR_ICON_CACHE_DAYS=100after how many days of inactivity should unused icons be cleared from icon cache
#RULER_ON=1should the program open with visible ruler or not
#PRINTER_NAME_PRINTCAP=StylusR220the printer name of selected printer from printcap
#FONT_SMALL_PT=80small screen font size (in points)
#FONT_NORMAL_PT=100normal screen font size (in points)
#FONT_SCALE=-*-helvetica-medium-r-normal--name of screen font, when antialiased fonts are not used
#FONT_SCALE_PRINT=-*-utopia-bold-r-normal--name of print font, when antialiased fonts are not used
#XFT_STATUS=1 0 0enable antialiased fonts, bold, italic
#FONT_XFT=Sansantialiased font name
#SCREEN_WIDTH_MM=408width of the screen in mm
#SCREEN_HEIGHT_MM=307height of the screen in mm
#SCREEN_WIDTH_PIXELS=1600horizontal screen pixels
#SCREEN_HEIGHT_PIXELS=1200vertical screen pixels
#OPEN_WITH_BROWSE=0should the program immediately open with browse window to load image
#BROWSE_WITH_FILTER=1should filter fields be enabled by default on browse window
#DEF_SIZE_MAIN=1541 1315default size of main window
#DEF_SIZE_IMAGE_BROWSE=1366 955default size of image browse window
#USE_SHARED_MEMORY=1should we use MIT SHM extension to get faster refreshes. Users on Mac OSX need to disable it in order for program to work.
#HIDE_SAVE_MENU=0should we hide Save menu and leave just Save as... so people do not overwrite their files by mistake

The original ArahWeave's .arahne configuration file contains many more options (about 200), but only the ones listed above are used by ArahPaint4. If you don't want to run ArahWeave in order to make a configuration file automatically by using Files > Save setup from ArahWeave, you can take the sample.arahne file from the distribution, copy it to the home directory and rename it to .arahne

How to contribute and debug?

If you wish to contribute to ArahPaint development, or if you find a bug, please contact Arahne at
arahne@arahne.si

Please provide the image which manifests the bug, and step by step instructions to reproduce the bug.

If you want to debug a problem more in detail, you can compile a debug version by typing
cd main
./makeClean
./makeDebug

Then you can run the program in ddd debugger by typing
./debug
This is is most useful if you have a core dump, which you are able to reproduce, and you want to check where in the source does it happen, and what is the state of the variables at that moment.

If you suspect a small memory overwrite or a subtle bug which does not manifest in immediate crash, you can also try running the program with valgrind by typing
./grind
This will give you positions of errors in the source, with descriptions of the errors. It is especially useful for memory leaks and memory overwrites. But program runs much slower.

Obviously, you need to have ddd or valgrind installed to use the respective tools.

Good luck in compiling,

Arahne development team