More Lazarus

Posted by ALB42 on 25. April 2015No Comments

hmm seems I opened Pandoras Box with compiling Lazarus. Of course its very unstable and buggy, so many bugs that its hard to decide where to start. So I started with the crashes on start and some redrawing issues I noticed.
 
Not sure whats wrong but the non-buffered drawing does not work well. For example the SynEdit looks nice with buffered drawing… when non buffered Drawing happen the upper quarter of the picture is empty. So it would be nice to always used buffered drawing (as long it does flicker less and is faster) But sadly with native MUI Widgets I can not use Buffered drawing. The reason is that the MUI drawing of the children only draws directly to the window and not to the buffer. So when the buffer is drawn to the window the MUI Objects are overpainted. So I first clip the buffer to window and then call the Childs to do a redraw, works nicely so now I alsways can use buffered drawing. I think LAter I should ckeck if some more optimizations can be done here (turn off the background drawing of MUI for example).
 
An other big part of the was the file handling and Text sizing. There this bad behaviour of lazarus showed up again, they implemented all the RTL functions for file handling again. For example found again a System: -> System:/ conversation, instead of using IncludeTrailingPathDelimiter(). I guess I have to recheck all the file utils again.
 
The Text Width/Height function is often called, even there is no RastPort available (outside paint event or even before the window is open). The height one can get directly from the Font, which solved the issue. The Width is a little bit more difficult, especially for not fixed width fonts. But even so I get some problem with the Toolbar buttons, the complete Window does not redraw anymore :-O if the Textwidth is bigger than 0 very strange, but I guess this I can also debug outside Lazarus with a little test application.
 

lazarus4

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert