Draw program

klaus

Expert
Licensed User
Longtime User
Here is a bitmap drawing program, it's an evolution from here: http://www.b4x.com/forum/questions-help-needed/2845-capture-basic-drawings.html

The program can:
draw
- lines, straight, free hand, polylines, different line widths and colors
- rectangles
- ellipses
- circles
- polygons
- texts
- images
onto a bitmap of different sizes, image or mono color background.

- formats supported 240/240, 320/320, 240/320, 240/400, 480/640, 480/800
- minimize button on device
with the help of Filippo
- multilanguage

To do list:
- undo and redo more than 2 levels


Bug reports and improvement suggestions are welcome.
The program is still in progress.

The whole drawing program is in a module.

Best regards.

EDIT: 2009.02.28 updated to version 0.6 fixed bugs

EDIT: 2009.03.02 updated to version 0.7
- fixed bugs
- added drawing of arcs, three types
-- center-radius-arc
-- 3 points on circumference mid point movable
-- 3 points on circumference 3rd point movable

EDIT: 2009.03.03 updated to version 0.8 fixed bugs

EDIT: 2009.03.07 updated to version 0.9
- fixed bugs
- undo / redo function 2 levels yet

EDIT: 2009.03.10 updated to version 0.95
- fixed bugs
- different formats supported

EDIT: 2009.04.14
updated to version 0.97 version with only the Draw module for tsteward

updated to version 1.0 version with other modules, About, FileChooser, Setup
-multilanguage
 

Attachments

  • Draw0_95.jpg
    Draw0_95.jpg
    27.2 KB · Views: 453
  • DrawV0_97.zip
    238.3 KB · Views: 418
  • DrawV1_0.zip
    271.5 KB · Views: 575
Last edited:

tsteward

Well-Known Member
Licensed User
Longtime User
Ok had a chance to take a good look and some very interesting thing going on here. Do you want bug reports yet? or is this just a teaser?
 

klaus

Expert
Licensed User
Longtime User
Please send bug reports now, the earlyer the bugs are known the betterit is. This is one of the reasons why I posted the program now, we can try to test a lot but there are always some details we miss.

There is no help file yet either.

Thanks in advance and best regards.
 

tsteward

Well-Known Member
Licensed User
Longtime User
Bug:
  1. Select DrawSelect tool.
  2. Select an area around the middle of the screen
  3. Select Cut button.
    This is problem #1 it cuts the wrong part of the image.
  4. Now with the same tool still selected click on the image and release without moving the mouse.
This causes the program to crash
 

tsteward

Well-Known Member
Licensed User
Longtime User
Thank's tsteward for the bug report.

The 1st one I had also seen it, the 2nd one was new to me.

Program updated in the 1st post.

Best regards.
Sorry but issue 2 still exists. After cutting just click the image and release without moving the mouse to cause error.
 

tsteward

Well-Known Member
Licensed User
Longtime User
I get trails left behind when positioning text.
See the video file attached.
Although these trails are not saved.
I get this when running on the PC or PPC
PPC is a Jasjam running WM6.1
 

Attachments

  • Video01.zip
    11.9 KB · Views: 350

tsteward

Well-Known Member
Licensed User
Longtime User
After choosing to create a New image. Select the background color and select Tick.
New image is created but not with the background color of choice?
 

tsteward

Well-Known Member
Licensed User
Longtime User
Feature Request

Whats the chance of being able to draw an arc?
As in the attached image I sometimes do quick floor plans & would like to add a neat arc for the door opening.
 

Attachments

  • FPlan1.jpg
    FPlan1.jpg
    4.3 KB · Views: 307

klaus

Expert
Licensed User
Longtime User
Hi tsteward,
Thank's for the bug reports, these will be fixed quite soon.

About the arc function, I will look at it and implement it.
The arc function you need is :
- 1st point = center
- 2nd point = radius
- 3rd point = arc

Would a function with an arc through 3 points on the circumference be of any interest for you ?

Best regards.
 

klaus

Expert
Licensed User
Longtime User
Version 0.7 is in the first post.

Fixed the bugs. The text shouldn't produce the trails any more.
To erase the previous text when moving, I erase the whole text area insted of writing the same text at the same position with transparent color.

Added drawing of arcs without or with radius, three types:
1) center-radius-arc,
- point on center
- move to the radius and release
- point besides the radius and move to draw the arc, the side you point on determines the arc orientation

2) 3 points on the circumference mid point movable
- point on the 1st point
- move to the 2nd point and release
- point somewhere between the first 2 points and move to draw the arc

3) 3 points on the circumference 3rd point movable
- point on the 1st point
- move to the 2nd point and release
- point on a 3rd point somewhere besides the 2nd point and move to draw the arc

Best regards.
 

Attachments

  • Draw2.jpg
    Draw2.jpg
    29.1 KB · Views: 311

tsteward

Well-Known Member
Licensed User
Longtime User
Wow GREAT work!

Bug1
If I compile the app as is and run on ppc I get the attached error1.

Bug2
Text is much better but after positioning, you remove stylus from screen and have blurred text. If you scroll the image you see the blurr is on the forlayer.

Bug 3
Select the DrawImage (btnDraw9) then click on the screen to position that red flag.

Thanks heaps
 

Attachments

  • Error01.jpg
    Error01.jpg
    20.9 KB · Views: 302

tsteward

Well-Known Member
Licensed User
Longtime User
Drawing text on an image, then close the drawing form via the "X" to go back to the main form. Them click Draw to edit another and the Text is still on the fore layer.
 

klaus

Expert
Licensed User
Longtime User
Version 0.8 is in the first post.

Bug1: If I compile the app as is and run on ppc I get the attached error1.
Bug3: Select the DrawImage (btnDraw9) then click on the screen to position that red flag.

I am afraid that you didn't have the files Flag_Red.jpg anf Flag_Green.jpg in the program folder. The program checks now if there are images or not.

Bug2
Text is much better but after positioning, you remove stylus from screen and have blurred text. If you scroll the image you see the blurr is on the forlayer.
Drawing text on an image, then close the drawing form via the "X" to go back to the main form. Them click Draw to edit another and the Text is still on the fore layer.
I changed a bit the forelayer erase mode, try if this solves the problem. If not, I added in the configuration panel a checkbox where you can choose 'Draw text outline'. If checked then when moving the text this one is not diplayed but the surrounding rectangle. The selection is saved in the Draw.ini file.

How about making it so when the frmdraw.show is called and filename ="" then go to btnNew_Click
Is done.

Best regards and thank's for testing.
 

tsteward

Well-Known Member
Licensed User
Longtime User
Not sure if this is a bug or maybe a imagelibex problem.

If I create a new drawing and save it as a .gif I can not load it again. I get the attached error.
 

klaus

Expert
Licensed User
Longtime User
Top