Lazarus

Programming => LCL => Topic started by: Harrison on July 26, 2010, 06:50:48 am

Title: TShape Questions - Possible Bug?
Post by: Harrison on July 26, 2010, 06:50:48 am
Alright, few questions regarding TShape.

1. I've got a TShape box set to follow the mouse in a paintbox, to make it clear what block is selected in the box. However, as the position has to be recalculated for every pixel the mouse moves, the box is very flickery. Is it possible to stop the flickering? Edit: See next post

2. Is it possible to make a TShape transparent? Edit: Set Pen mode to pmMask and style to psClear.
Title: Re: TShape Questions
Post by: Harrison on July 26, 2010, 09:07:47 am
Well this is interesting. I found the source of the flicker. However, it doesn't make much sense, and is possibly a bug.

The paintbox that the shape was drawn over had a function tied to OnMouseLeave, which was supposed to hide the shape. For some reason, this function was called every other pixel that the mouse traveled. Unless I don't understand "OnMouseLeave", this shouldn't be the case, should it?
Title: Re: TShape Questions - Possible Bug?
Post by: Marc on July 27, 2010, 12:23:04 am
It shopuld indeed not, but are you sure the debugger didn't interfere ?
Title: Re: TShape Questions - Possible Bug?
Post by: Harrison on July 27, 2010, 01:28:25 am
Just tested it, it does it regardless of if it is started with the debugger or without it.

Edit: Well actually I just realized the snapshot of 0.9.29 with FPC 2.4.3 doesn't have a debugger? Is that right? I'm on Windows by the way.
TinyPortal © 2005-2018