Commit 9fb88c79 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

gdiplus: GdipDrawString should not clip the string if StringFormatFlagsNoClip is specified.

parent 73779060
......@@ -4907,7 +4907,7 @@ GpStatus WINGDIPAPI GdipDrawString(GpGraphics *graphics, GDIPCONST WCHAR *string
GpPointF pt[3], rectcpy[4];
POINT corners[4];
REAL rel_width, rel_height, margin_x;
INT save_state;
INT save_state, format_flags = 0;
REAL offsety = 0.0;
struct draw_string_args args;
RectF scaled_rect;
......@@ -4932,6 +4932,8 @@ GpStatus WINGDIPAPI GdipDrawString(GpGraphics *graphics, GDIPCONST WCHAR *string
if(format){
TRACE("may be ignoring some format flags: attr %x\n", format->attr);
format_flags = format->attr;
/* Should be no need to explicitly test for StringAlignmentNear as
* that is default behavior if no alignment is passed. */
if(format->vertalign != StringAlignmentNear){
......@@ -4985,7 +4987,8 @@ GpStatus WINGDIPAPI GdipDrawString(GpGraphics *graphics, GDIPCONST WCHAR *string
if (scaled_rect.Width >= 1 << 23 || scaled_rect.Width < 0.5) scaled_rect.Width = 1 << 23;
if (scaled_rect.Height >= 1 << 23 || scaled_rect.Height < 0.5) scaled_rect.Height = 1 << 23;
if (scaled_rect.Width != 1 << 23 && scaled_rect.Height != 1 << 23)
if (!(format_flags & StringFormatFlagsNoClip) &&
scaled_rect.Width != 1 << 23 && scaled_rect.Height != 1 << 23)
{
/* FIXME: If only the width or only the height is 0, we should probably still clip */
rgn = CreatePolygonRgn(corners, 4, ALTERNATE);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment