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];
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++)
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);
*imageattr = GdipAlloc(sizeof(GpImageAttributes));
if(!*imageattr) return OutOfMemory;
+ (*imageattr)->wrap = WrapModeClamp;
+
TRACE("<-- %p\n", *imageattr);
return Ok;
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,