BDraw v1.8
Posted: Mon 19 Nov 2012, 19:56
I wrote simple graphic program in Gtkdialog and this is crazy, but...it works!
It uses <button> widget as a drawing area (that's why "BDraw").
Take a look at the screenshot; the toolbox area contains (from left to right):
- current shape
- stroke width
- transparency level
- stroke color
- fill color
(next row):
- Undo - delete last drawn object, doesn't work with Load & Save
- Load - load a picture, only .bdr format is accepted (well, it's SVG really, but has specific arrangement of lines)
- Save - save as .bdr (for further editing) or as .png (you can choose output resolution)
- Quit
Few words about drawing:
When you choose, eg. Line or Circle, then press the mouse button on starting point, drag cursor to the ending point and release button.
But there are two exceptions:
1. Text - press and release the button on starting point; this point will become the bottom-left beginning of the text.
Then choose a font (avoid fonts with digits in their names, they won't work [EDIT: they work since v1.1]), style and size and in the next window enter some text.
2. Arc - press the mouse button on starting point, drag cursor to the ending point and release button, then move cursor to another point and press space [EDIT: since v1.3 - press right mouse button].
(Then you can move cursor to another place and press space again, and so on.)
The drawing area is fixed to 512x512, but it doesn't matter IMHO, since it's vector graphic. As I wrote above you can adjust final resolution while exporting to PNG.
Hint: since you're drawing within a button, it blinks on hover and clicking. To avoid this, just draw filled rectangle that fills all space. This will also remove default transparency of the background.
Requirements:
- Gtkdialog >= 0.7.21 (version 1.0)
- Gtkdialog >= 0.8.0 (versions >= 1.1)
- Gtkdialog >= 0.8.1 (versions >= 1.3)
- base64 (versions >= 1.4)
- Xdialog
- rsvg-convert (for .png output)
- xwininfo
- getcurpos
- awk, sed, and so on.
(all of these should be already present in most/all of recent Puppies)
I've attached standalone, gzip'ed scripts - unpack, make executable and click to launch.
I didn't make a pet, but if someone could kindly make a nice icon for this app (I simply can't draw!) then I'll do it.
Tested on:
- Slacko-5.3.3, 5.4, 5.5
- Lupuplus-528.005
- Precise-5.4.1
- Akita-beta13
- FatDog64-601
- Carolina-0.0.3
- uPup-Precise-5.4.X.4
_____________
Edit:
Version 1.1 uploaded, see this post for changelog.
Version 1.2 uploaded, see this post for changelog.
Version 1.3 uploaded, see this post for changelog.
Version 1.4 uploaded, see this post for changelog.
Version 1.5 uploaded, see this post for changelog.
Version 1.5 replaced with v1.5.1, see this post for details.
Version 1.6 uploaded, see this post for changelog.
Version 1.6.1 uploaded, see this post for changelog.
Version 1.7 uploaded, see this post for changelog
Version 1.8:
- removed 'vercmp' dependency and used 'busybox dc' for compatibility with Fatdog
Have fun & Greetings!
It uses <button> widget as a drawing area (that's why "BDraw").
Take a look at the screenshot; the toolbox area contains (from left to right):
- current shape
- stroke width
- transparency level
- stroke color
- fill color
(next row):
- Undo - delete last drawn object, doesn't work with Load & Save
- Load - load a picture, only .bdr format is accepted (well, it's SVG really, but has specific arrangement of lines)
- Save - save as .bdr (for further editing) or as .png (you can choose output resolution)
- Quit
Few words about drawing:
When you choose, eg. Line or Circle, then press the mouse button on starting point, drag cursor to the ending point and release button.
But there are two exceptions:
1. Text - press and release the button on starting point; this point will become the bottom-left beginning of the text.
Then choose a font (avoid fonts with digits in their names, they won't work [EDIT: they work since v1.1]), style and size and in the next window enter some text.
2. Arc - press the mouse button on starting point, drag cursor to the ending point and release button, then move cursor to another point and press space [EDIT: since v1.3 - press right mouse button].
(Then you can move cursor to another place and press space again, and so on.)
The drawing area is fixed to 512x512, but it doesn't matter IMHO, since it's vector graphic. As I wrote above you can adjust final resolution while exporting to PNG.
Hint: since you're drawing within a button, it blinks on hover and clicking. To avoid this, just draw filled rectangle that fills all space. This will also remove default transparency of the background.
Requirements:
- Gtkdialog >= 0.7.21 (version 1.0)
- Gtkdialog >= 0.8.0 (versions >= 1.1)
- Gtkdialog >= 0.8.1 (versions >= 1.3)
- base64 (versions >= 1.4)
- Xdialog
- rsvg-convert (for .png output)
- xwininfo
- getcurpos
- awk, sed, and so on.
(all of these should be already present in most/all of recent Puppies)
I've attached standalone, gzip'ed scripts - unpack, make executable and click to launch.
I didn't make a pet, but if someone could kindly make a nice icon for this app (I simply can't draw!) then I'll do it.
Tested on:
- Slacko-5.3.3, 5.4, 5.5
- Lupuplus-528.005
- Precise-5.4.1
- Akita-beta13
- FatDog64-601
- Carolina-0.0.3
- uPup-Precise-5.4.X.4
_____________
Edit:
Version 1.1 uploaded, see this post for changelog.
Version 1.2 uploaded, see this post for changelog.
Version 1.3 uploaded, see this post for changelog.
Version 1.4 uploaded, see this post for changelog.
Version 1.5 uploaded, see this post for changelog.
Version 1.5 replaced with v1.5.1, see this post for details.
Version 1.6 uploaded, see this post for changelog.
Version 1.6.1 uploaded, see this post for changelog.
Version 1.7 uploaded, see this post for changelog
Version 1.8:
- removed 'vercmp' dependency and used 'busybox dc' for compatibility with Fatdog
Have fun & Greetings!