I don't know how could I missed the obvious and trudge into complex and unnecessary methods.
If the button is narrower (or not) than the window, it's enough to use <hbox homogeneous="true"> (this will nicely align it to center, horizontally), and calculate X position using:
X = ( Mouse_X_Pos - Window_X_Pos ) - ( ( Window_Width - Picture_Width ) / 2 )
Much more simple and elegant...

So, the height problem is gone and theoretically picture size is no longer limited, but I set the limit to 2048x2048; more causes terrible slow down and/or Gtk crashes.
Also, coordinates were displayed in a range from 0 to Picture_Width/Height what was wrong, it's been corrected: from 0 to (Picture_Width/Height - 1).
And, just for fun, I added simplified support for dashed lines.

Ok, now I'm quite satisfied with this...

Version 1.2 attached to the first post.
___________

@Zigbert:
Just tried <eventbox> and it's really promissing. The one and only problem is handling keystrokes (for "Arc"), because there's no way to catch focus on <evenbox><pixmap> area; it's always glued to (and intercepted by) one of bottom buttons.

If someone would like to play with it, I've attached it to this post, as version 1.2+.

Nothing is unsolvable.
I examined Zigbert's Pmusic - I had no idea that there's $BUTTON variable in Gtkdialog that makes possible to read which button is pressed.
So "Arc" is now handled by right mouse button instead of spacebar.

As a really nice side effect, it's possible to draw "rays" and similar stuff now - simply, when you left click on some point, then you can right click many times elsewhere, but the initial X/Y position stays unchanged.

Another thing I _thought_ it's impossible to implement: "Freehand" mode.
It's not perfect - a bit "edgy", but pretty amusing.

Important change:
AFAIK in frugally installed Puppies /tmp folder is kept in RAM, but not in case of full installs (I might be wrong).
Since there's a lot of constantly used (by BDraw) temp files stored in /tmp, I changed the location to /dev/shm (suggested to me by Technosaurus elsewhere), what (I guess) should improve performance in fully installed Puppies.
If I'm wrong about this, please let me know, so I'll roll it back.

BTW, I combined both methods into one script - one can choose at initial window to use <button> or <pixmap>.

First post updated.

PS. Sorry for such frequent updates, but every time I thought "Ok, that's it, done!", then suddenly in the middle of the night something new popped up in my mind.
This time I'm pretty sure - I'll give it a rest...at least for some time.

PS. Sorry for such frequent updates, but every time I thought "Ok, that's it, done!", then suddenly in the middle of the night something new popped up in my mind.
This time I'm pretty sure - I'll give it a rest...at least for some time.

Don't apologize, update as much as you like, I like to see things evolve like this, I'm liking it a lot. _________________Carolina:Recent Repository AdditionsCreate strikethrough textHERE

BTW, the image will be 'base64' encoded and embedded into the picture, not linked.

Another nice side effect - the direction of selecting matters, eg. from upper left to bottom right - image will be inserted normally, but eg. selecting from bottom right to upper left - image will be flipped both horizontally and vertically.

"Export clipart" is used in the same manner as "Import", but the output format is always .png and the trick with "direction of selecting" doesn't work.

Hi,
would like to get a try ...
i only got this on dPup-Exprimo an uPup-Precise-5.4.X.4...
BDraw-1.4 and 1.3
here gtkdialog is 0.8.2 (exprimo) and 0.8.3 (precise).
did i miss something..?
thanks for any answer
Charlie

Just tried BDraw-1.4 on the uPup-Precise-5.4.X.4 (fresh live boot as well as after creating pupsave) and everything's fine here...
Your screenshot suggests me that, for some reason, the initial, empty picture wasn't created properly and its resolution was set to contents of /root dir (Choices, Desktop), which is absolutely strange.

Hmm, I installed most of these packages (except TiMidity++-2.13.0 (but the newer 2.13.2 - yes), lxtask_NLS-0.1.4, ttf-bitstream-vera_1.10-8 and xorg_high_intel-0.0.1) and still can't reproduce this issue.
But my suspicions goes to Xdialog.

Would you like to do a little bit of debugging?
About line 709 there's the following piece of code:

I compared with another theme running without such problem and which has gtk-2.0/button-default.png (i forgot which name...);
Mac4Lin_GTK_v0.4-MU/gtk-2.0/button-default.png size is 75x23;
whereas the other is 75x25;
I then edited Mac4Lin_GTK_v0.4-MU/gtk-2.0/button-default.png to 75x25 (using mTpaint); saved it and restarted jwm and X;
>>------> no more problem reported;
then ran BDraw >>-----> now runs OK

was a good guess indeed...
There's a few more lines with faulty Xdialog syntax - I've corrected them in version 1.5, which works ok for me now with that specific theme.

I'm glad we have figured out what's going on, thanks!
_____________

Another addition:
After many trials&errors, tricks I'm not proud of, and almost crossing the edge of comprehending my own code complexity , I added (poor's man) "Preview" ability.
It's synchronized with coordinates updating (1 sec.).
It works with any tool except "Freehand" and "Text"; also, for "Arc" it shows only the final stage of creation (x3,y3).
I added togglebutton (an eye icon) to (de)activate it (default = off), because it can simply act too slow on slower machines.
This is rather experimental addition, so I'd be glad for any info how it works on other machines and if it's really usable or not..?

I discovered that "Import Clipart" option doesn't work in Precise and uPup-Precise.
I don't really know why, my guess is that there is a newer, more strict library responsible for displaying SVG in this pair.

Anyway, I've managed to fix that.

But since I have found that:

1. In those two Puppies only the following formats are supported:
.bdr, .svg, .bmp, .gif, .jpg, .png
2. tif/tiff makes BDraw hangs (sooo "sweet" )
3. pnm seems to not work at all...

I just reduced allowed formats to those six above; they're most popular anyway (except .bdr of course ).