Commit 0ae0c0c0 authored by Vincent Povirk's avatar Vincent Povirk Committed by Alexandre Julliard

gdiplus: Implement GdipSetImageAttributesWrapMode.

parent 15ebd84d
......@@ -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];
......
......@@ -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<dst_area.right; x++)
{
for (y=dst_area.top; y<dst_area.bottom; y++)
......@@ -2069,7 +2079,6 @@ GpStatus WINGDIPAPI GdipDrawImagePointsRect(GpGraphics *graphics, GpImage *image
if (src_x < src_area.left || src_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);
......
......@@ -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,
......
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