Recent

Author Topic: Slow writing/update of/to TEdit.. Screen Generally etc  (Read 3168 times)

MorbidFractal

  • Jr. Member
  • **
  • Posts: 97
Slow writing/update of/to TEdit.. Screen Generally etc
« on: June 08, 2011, 02:34:03 pm »
Beyond moving to OpenGL I'm not certain there is a 'go faster' fix for this.

I am writing a CAD program and one part of it, naturally, includes a Cursor and within a StatusBar X and Y co-ordinates, amongst other things.

Restricting operation to movement and updating of the Cursor or updating the StatusBar then things are 'acceptable' although I would like better performance.

If I try to update the X and Y values in the StatusBar and update the Cursor

PanelMain.StatusBar1.Panels[1].Text := 'X' + ArrayXLoc[Step];
PanelMain.StatusBar1.Panels[2].Text := 'Y' + ArrayYLoc[Step];
PanelMain.StatusBar1.Update;

Things turn to treacle.

In order to draw the cursor I have two BitMaps one, OutPMap, stores an 'image' of the on screen TImage. It gets copied to the other, CurPMap, on which I draw the Cursor. CurPmap is then transferred to the on screen TImage. Something like,

CurPMap.Canvas.Draw(0,0,OutPMap);
[Scribble the cursor on CurPmap];
DrawImage.Canvas.Draw(0,0,CurPMap);

Any suggestions or is it just the way it is?

 

TinyPortal © 2005-2018