Please, need help for optimisation

BlitzMax Forums/BlitzMax Programming/Please, need help for optimisation

The Gimp does pixel-based painting, doesn't it ?

You might even find it already installed on your Linux distro. (it appears under Graphics, in my taskbar menu).

In your Dot function I'm sure you can change this:
If X1<0 Then X1=0
If X1>=PixmapWidth(buf) Then X1=PixmapWidth(buf)-1

into this
X1 = Min(Max(X1, 0), PixmapWidth(buf) - 1)


As Azathoth says though, stick the code into a {codebox}{/codebox} (replace the curly brackets with square ones).

:o)