On 04/30/2013 01:45 PM, zeljko wrote:
On 04/30/2013 12:11 PM, Juha Manninen wrote:
Unfortunately it only works on Windows. FillRgn does not work with
GTK2 and it crashes with QT. Apparently it is not properly
implemented.
Could somebody graphics oriented please look at TWSArrow and maybe fix
it.
Ok, I've fixed Qt so it does not crash, but before commit: it seem that
there's typo in newarrow define (drawArrow function).
When you call FillRgn() you call it with Pen.Reference.Handle, instead
of Brush.Reference.Handle of canvas, so that's one of the reasons why qt
crashes (brush is NULL). MSDN says that 3rd param should be brush , not
pen.
Yes, there's nothing to touch in gtk2 or qt. Your new code should be fixed.
1.Must change Pen.Reference to Brush.Reference
2.Must change color of brush to eg. clBlack
3.Must reset brush style to old style/color
So, we should decide to use ACanvas.Brush (and change it's properties,
but restore it after FillRgn) or create new brush , use it for FillRgn,
and then destroy it.
And then arrows are ok.
z.
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus