[ros-dev] [ros-diffs] [jimtabor] 73475: [Win32SS|RTL] - Fix clipping for Draw Text. Inspired by Katayama Hirofumi MZ patch and ComCtl32/RichEd20/UxThmems. See CORE-2201.
James Tabor
jimtabor.rosdev at gmail.com
Thu Dec 29 20:15:38 UTC 2016
Wow,
too much in my inbox!
Yeah, I guess we can just go with NtGDI only calls.
On Sun, Dec 25, 2016 at 10:35 AM, Thomas Faber <thomas.faber at reactos.org>
wrote:
> On 2016-12-22 11:39, jimtabor at svn.reactos.org wrote:
>
>> +#ifndef _WIN32K_ ///// Fix CORE-2201.
>> + if (!(flags & DT_NOCLIP) )
>> + {
>> + int hasClip;
>> + hrgn = CreateRectRgn(0,0,0,0);
>> + if (hrgn)
>> + {
>> + hasClip = GetClipRgn(hdc, hrgn);
>> + // If the region to be retrieved is NULL, the return value is
>> 0.
>> + if (hasClip != 1)
>> + {
>> + DeleteObject(hrgn);
>> + hrgn = NULL;
>> + }
>> + IntersectClipRect(hdc, rect->left, rect->top, rect->right,
>> rect->bottom);
>> + }
>> + }
>> +#else
>> + if (!(flags & DT_NOCLIP) )
>> + {
>> + int hasClip;
>> + hrgn = NtGdiCreateRectRgn(0,0,0,0);
>> + if (hrgn)
>> + {
>> + hasClip = NtGdiGetRandomRgn(hdc, hrgn, CLIPRGN);
>> + if (hasClip != 1)
>> + {
>> + GreDeleteObject(hrgn);
>> + hrgn = NULL;
>> + }
>> + NtGdiIntersectClipRect(hdc, rect->left, rect->top,
>> rect->right, rect->bottom);
>> + }
>> + }
>> +#endif /////
>>
>
> Any particular reason not to simply do the NtGdi call in both user
> and kernel? Looks like they should be doing the exact same thing.
>
> _______________________________________________
> Ros-dev mailing list
> Ros-dev at reactos.org
> http://www.reactos.org/mailman/listinfo/ros-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.reactos.org/pipermail/ros-dev/attachments/20161229/13edc43f/attachment.html>
More information about the Ros-dev
mailing list