Re: [PATCH] d2d1: Support text clipping with D2D1_DRAW_TEXT_OPTIONS_CLIP
On 1 April 2017 at 21:01, Nikolay Sivov <nsivov(a)codeweavers.com> wrote:
+ clip_rect.left = origin.x + layout_metrics.left; + clip_rect.top = origin.y + layout_metrics.top; + clip_rect.right = clip_rect.left + layout_metrics.layoutWidth; + clip_rect.bottom = clip_rect.top + layout_metrics.layoutHeight; + ID2D1RenderTarget_PushAxisAlignedClip(iface, &clip_rect, D2D1_ANTIALIAS_MODE_ALIASED);
Does this do the right thing wrt. rendertarget transforms?
On 03.04.2017 9:06, Henri Verbeet wrote:
On 1 April 2017 at 21:01, Nikolay Sivov <nsivov(a)codeweavers.com> wrote:
+ clip_rect.left = origin.x + layout_metrics.left; + clip_rect.top = origin.y + layout_metrics.top; + clip_rect.right = clip_rect.left + layout_metrics.layoutWidth; + clip_rect.bottom = clip_rect.top + layout_metrics.layoutHeight; + ID2D1RenderTarget_PushAxisAlignedClip(iface, &clip_rect, D2D1_ANTIALIAS_MODE_ALIASED);
Does this do the right thing wrt. rendertarget transforms?
No, this will only work if rotation angle is multiple of 90 degrees. Please ignore.
participants (2)
-
Henri Verbeet -
Nikolay Sivov