* * *

Author Topic: TShape Questions - Possible Bug?  (Read 1342 times)

Harrison

  • New member
  • *
  • Posts: 12
TShape Questions - Possible Bug?
« 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.
« Last Edit: July 26, 2010, 09:35:05 am by Harrison »

Harrison

  • New member
  • *
  • Posts: 12
Re: TShape Questions
« Reply #1 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?

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2450
Re: TShape Questions - Possible Bug?
« Reply #2 on: July 27, 2010, 12:23:04 am »
It shopuld indeed not, but are you sure the debugger didn't interfere ?
//--
{$I stdsig.inc}
//-Patches are always welcome at patch (at) dommelstein.net (please put the word "patch" in the subject)
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

Harrison

  • New member
  • *
  • Posts: 12
Re: TShape Questions - Possible Bug?
« Reply #3 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.
« Last Edit: July 27, 2010, 03:15:46 am by Harrison »

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads