GpStatus WINGDIPAPI GdipCreateTexture2I(GpImage *image, GpWrapMode wrapmode,
INT x, INT y, INT width, INT height, GpTexture **texture)
{
- GpImageAttributes imageattr;
+ GpImageAttributes *imageattr;
+ GpStatus stat;
TRACE("%p %d %d %d %d %d %p\n", image, wrapmode, x, y, width, height,
texture);
- imageattr.wrap = wrapmode;
+ stat = GdipCreateImageAttributes(&imageattr);
+
+ if (stat == Ok)
+ {
+ imageattr->wrap = wrapmode;
- return GdipCreateTextureIA(image, &imageattr, x, y, width, height, texture);
+ stat = GdipCreateTextureIA(image, imageattr, x, y, width, height, texture);
+ }
+
+ return stat;
}
GpStatus WINGDIPAPI GdipGetBrushType(GpBrush *brush, GpBrushType *type)