[1/2] richedit: Clip painting to formatting rectangle (try 2)

Alexandre Julliard julliard at winehq.org
Wed Jan 14 07:21:43 CST 2009


Dylan Smith <dylan.ah.smith at gmail.com> writes:

> @@ -29,6 +29,17 @@ void ME_PaintContent(ME_TextEditor *editor, HDC hDC, BOOL bOnlyNew, const RECT *
>    ME_Context c;
>    int yoffset;
>    int ys, ye;
> +  HRGN oldRgn, clipRgn;
> +
> +  oldRgn = CreateRectRgn(0, 0, 0, 0);
> +  if (!GetClipRgn(hDC, oldRgn))
> +  {
> +    DeleteObject(oldRgn);
> +    oldRgn = NULL;
> +  }
> +  clipRgn = CreateRectRgnIndirect(rcUpdate);
> +  ExtSelectClipRgn(hDC, clipRgn, RGN_AND);
> +  DeleteObject(clipRgn);

IntersectClipRect would be a lot easier.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list