[lazarus] GTK team: please specify!
Micha Nelissen
M.Nelissen at student.tue.nl
Fri Oct 31 06:43:42 EST 2003
Marc Weustink wrote:
> At 19:19 30-10-2003, Micha Nelissen wrote:
>
>> Mattias Gaertner wrote:
>>
>>> On Thu, 30 Oct 2003 14:46:48 +0100
>>> Micha Nelissen <M.Nelissen at student.tue.nl> wrote:
>>>
>>>> Mattias Gaertner wrote:
>>>>
>>>>
>>>>> On Thu, 30 Oct 2003 08:59:31 +0100
>>>>> Micha Nelissen <M.Nelissen at student.tue.nl> wrote:
>>>>>
>>>>>
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I need your help on these functions, are the coordinates specified
>>>>>> in clientrect coordinates or screen coordinates:
>>>>>>
>>>>>> 1) (TGTKObject|TInterfaceBase).FillRect
>>>>>
>>>>>
>>>>>
>>>>> relative to clientorigin
>>>>
>>>>
>>>> Doesn't seem to be so when testing controlselection.pp,
>>>> DrawGrabbers... FillRect is passed the screen-relative points of the
>>>> grabber handle instead of client-origin. But this may be a problem
>>>> in DC.FormOrigin instead... I removed in my local copy the Diff
>>>> subtraction from the grabbers.left,top and then it was drawn at the
>>>> correct location on win32.
>>>
>>>
>>> About TControlSelection.DrawGrabbers:
>>> FGrabbers[g].Left/Top are holding the position of a grabber relative
>>> to the
>>> client origin of the form.
>>> The line
>>> Diff:=DC.FormOrigin;
>>> gets the DC origin also relative to the form origin.
>>> Therefore the grabber is painted at FGrabbers[g].Left-Diff.X.
>>
>>
>> FormOrigin calls TForm.GetClientOrigin which relative to the screen.
>
>
> Ehm... Fillrect draws on a DC. The rectangle given is relative to the
> origin of the DC.
Indeed. I have fixed the code. I hope GTK still works...
Micha.
More information about the Lazarus
mailing list