diff --git a/dlls/gdiplus/gdiplus_private.h b/dlls/gdiplus/gdiplus_private.h index 2313cd543e6..eafed7c820e 100644 --- a/dlls/gdiplus/gdiplus_private.h +++ b/dlls/gdiplus/gdiplus_private.h @@ -296,6 +296,8 @@ struct color_remap_table{ struct GpImageAttributes{ WrapMode wrap; + ARGB outside_color; + BOOL clamp; struct color_key colorkeys[ColorAdjustTypeCount]; struct color_matrix colormatrices[ColorAdjustTypeCount]; struct color_remap_table colorremaptables[ColorAdjustTypeCount]; diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index 790e0fbf03b..879646a8263 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -2049,6 +2049,16 @@ GpStatus WINGDIPAPI GdipDrawImagePointsRect(GpGraphics *graphics, GpImage *image stride = sizeof(ARGB) * (dst_area.right - dst_area.left); + if (imageAttributes && + (imageAttributes->wrap != WrapModeClamp || + imageAttributes->outside_color != 0x00000000 || + imageAttributes->clamp)) + { + static int fixme; + if (!fixme++) + FIXME("Image wrap mode not implemented\n"); + } + for (x=dst_area.left; x= src_area.right || src_y < src_area.top || src_y >= src_area.bottom) - /* FIXME: Use wrapmode */ *src_color = 0; else GdipBitmapGetPixel(bitmap, src_x, src_y, src_color); diff --git a/dlls/gdiplus/imageattributes.c b/dlls/gdiplus/imageattributes.c index 1a7118df773..c157af3a393 100644 --- a/dlls/gdiplus/imageattributes.c +++ b/dlls/gdiplus/imageattributes.c @@ -53,6 +53,8 @@ GpStatus WINGDIPAPI GdipCreateImageAttributes(GpImageAttributes **imageattr) *imageattr = GdipAlloc(sizeof(GpImageAttributes)); if(!*imageattr) return OutOfMemory; + (*imageattr)->wrap = WrapModeClamp; + TRACE("<-- %p\n", *imageattr); return Ok; @@ -120,17 +122,16 @@ GpStatus WINGDIPAPI GdipSetImageAttributesColorMatrix(GpImageAttributes *imageat GpStatus WINGDIPAPI GdipSetImageAttributesWrapMode(GpImageAttributes *imageAttr, WrapMode wrap, ARGB argb, BOOL clamp) { - static int calls; - TRACE("(%p,%u,%08x,%i)\n", imageAttr, wrap, argb, clamp); - if(!imageAttr) + if(!imageAttr || wrap > WrapModeClamp) return InvalidParameter; - if(!(calls++)) - FIXME("not implemented\n"); + imageAttr->wrap = wrap; + imageAttr->outside_color = argb; + imageAttr->clamp = clamp; - return NotImplemented; + return Ok; } GpStatus WINGDIPAPI GdipSetImageAttributesCachedBackground(GpImageAttributes *imageAttr,