|
Post by Rod on Apr 20, 2023 7:59:28 GMT -5
Now has color! It is hanging together better. However the .ffu format has changed so don't load any old format files stick to the .ffu files in the v1.3 project directory. Link is in the first post.
|
|
gaslouk
Full Member
Hi from beautiful Greece.
Posts: 130
|
Post by gaslouk on Apr 20, 2023 9:57:36 GMT -5
Now has color! It is hanging together better. However the .ffu format has changed so don't load any old format files stick to the .ffu files in the v1.3 project directory. Link is in the first post. Hi! There are some problems. Change
font$(1)="Ctrl Font" font$(2)="Ctrl Reset" font$(3)="Proj Font" with this lines
font$(1)="Set Control" font$(2)="Reset Ctrl" font$(3)="Set Project"
because not set fonts.
Gaslouk.
|
|
|
Post by Rod on Apr 20, 2023 10:56:13 GMT -5
Thanks. I was making color and font options the same format, I need to change the font code.
|
|
gaslouk
Full Member
Hi from beautiful Greece.
Posts: 130
|
Post by gaslouk on Apr 20, 2023 12:28:39 GMT -5
Thanks. I was making color and font options the same format, I need to change the font code. Hi again
There is still something I can't express in English so I will upload some pictures. this is about writing the .BAS file when saving the various buttons and not just the form, in the font selection. Attachments:
|
|
|
Post by Rod on Apr 20, 2023 13:21:36 GMT -5
Not looked at the code yet but I am pretty sure I need to restrict font changes to font capable controls, had the same issue with color so again an easy fix. Thank you for exploring. I hope it eventually becomes useful. Been a painful gestation!
|
|
|
Post by xxgeek on Apr 20, 2023 14:32:01 GMT -5
Since there are more eyes here I'll ask here hoping someone can provide an answer in the affirmative.
The main reason there is flashing in this app is the drawing of the grid. Presently the grid is drawn pixel by pixel in 2 for next loops.
Is there a better, faster way?
Would creating bmp's of the different sized grids be faster? Sprites? Anything? Any fancy math that would draw so many pixels faster than the current method?
How about using a . printed? or a data set? - thinking outloud.
Hmm, maybe lines instead of pixels. I don't know much at all about the graphics of LB, a good time to learn how to draw lines.
|
|
|
Post by Walt Decker on Apr 20, 2023 18:08:44 GMT -5
The way I do it is in one do loop. I increment X and when it is beyond the bounds of the the client area I set X to zero and increment Y. I think that is a little faster than nested for loops with a step clause. One thing that might help, if the code was not JB, is set the extended style to WS_EX_TRANSPARENT.
With other systems I capture the client area in a bit map, draw on the memory bitmap and blit it back to the client area. Can't do that with LB.
Trying to use bit maps of different grid sizes might be a little faster, but calculating where each would be placed on the drawing surface might be a nightmare. And what happens if the drawing surface changes color?
|
|
|
Post by Rod on Apr 21, 2023 1:17:24 GMT -5
Thanks for those thoughts. You know I have a thing about api, I could easily use the blitter to eliminate the flashing but that restricts the user group and I am thinking ahead to LB5. So no api is the goal.
I have tried bmp blocks but it just made the flashing worse. The xor drawing seems to have cured the issue on my pc. Is the flashing obvious on your pc? I have not got xor background or text right yet, so I don’t draw the text on moving and the background is left behind while moving but I have no flashing at all.
I do redraw everything at the end of the move so it flashes a little at the end but only very briefly.
|
|
|
Post by Rod on Apr 21, 2023 7:37:01 GMT -5
|
|
gaslouk
Full Member
Hi from beautiful Greece.
Posts: 130
|
Post by gaslouk on Apr 21, 2023 9:17:45 GMT -5
|
|
|
Post by Rod on Apr 21, 2023 10:28:20 GMT -5
Nice to see it getting used, hope those text changes were entered in the property window. Anything with a ? Is generally waiting for a meaningful name.
|
|
gaslouk
Full Member
Hi from beautiful Greece.
Posts: 130
|
Post by gaslouk on Apr 21, 2023 11:43:56 GMT -5
Nice to see it getting used, hope those text changes were entered in the property window. Anything with a ? Is generally waiting for a meaningful name.
A good specimen. Well done Mr. Rod.
Gaslouk
|
|
|
Post by Rod on Apr 22, 2023 5:52:56 GMT -5
Few more bugs squashed, new help file. If the bug reports slow down I will work on improving the content of the written .bas program. the links in previous posts have been amended.
|
|
|
Post by Rod on Apr 23, 2023 5:42:08 GMT -5
Freeform Ultra Lite v1.x in a nutshell.
|
|
|
Post by xxgeek on Apr 27, 2023 14:13:45 GMT -5
The way I do it is in one do loop. I increment X and when it is beyond the bounds of the the client area I set X to zero and increment Y. Thanks Walt, it took me while to learn some graphics commands so I could accomplish this. Your way and what I ended up using differ in speed by a couple of ms. After reading up on some graphics commands I have managed to draw lines by first drawing the vertical then the horizontal using two for next loops, one after the other, non nested. The difference is amazing compared to the original using two nested loops, and drawing pixels instead of lines. Drawing of the grid is now thousands of times faster. You can 'really' notice the difference when debugging. The flash whenLeftButtonUp no longer happens after a drag, or a resize of controls. The only flashing now is with the individual controls. The #1 window doesn't flash when grid is draw with lines, and mostly noticeable when the control background differs from the project background. If they are the same, there is very little ficker. 3 controls are affected this way, texteditor, textbox, and listbox (because they can be colored) It is the filling of these control boxes that causes the flash as they move or get resized. y=0 ' Grid - Draw vertical lines for x = 0 to projectw step grid print #1.gb, "line "; x; " "; startX; " "; x; " "; projecth next x 'Grid - Draw horizontal lines for y = 0 to projecth step grid #1.gb, "line "; startX; " "; y; " "; projectw; " "; y next y
Just wanted to point this out, because using lines instead of pixels works quite well without taking anything away from the app, and it's a quick easy solution. One of the math geniuses could probably use boxes or some other method to create the grid even faster, but there is no real need now to draw it any faster.
|
|