gdiplus: Store color key information in ImageAttributes.
This commit is contained in:
parent
e0d9d17536
commit
55ec1d9150
|
@ -223,8 +223,15 @@ struct GpCachedBitmap{
|
||||||
GpImage *image;
|
GpImage *image;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct color_key{
|
||||||
|
BOOL enabled;
|
||||||
|
ARGB low;
|
||||||
|
ARGB high;
|
||||||
|
};
|
||||||
|
|
||||||
struct GpImageAttributes{
|
struct GpImageAttributes{
|
||||||
WrapMode wrap;
|
WrapMode wrap;
|
||||||
|
struct color_key colorkeys[ColorAdjustTypeCount];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct GpFont{
|
struct GpFont{
|
||||||
|
|
|
@ -68,15 +68,16 @@ GpStatus WINGDIPAPI GdipDisposeImageAttributes(GpImageAttributes *imageattr)
|
||||||
GpStatus WINGDIPAPI GdipSetImageAttributesColorKeys(GpImageAttributes *imageattr,
|
GpStatus WINGDIPAPI GdipSetImageAttributesColorKeys(GpImageAttributes *imageattr,
|
||||||
ColorAdjustType type, BOOL enableFlag, ARGB colorLow, ARGB colorHigh)
|
ColorAdjustType type, BOOL enableFlag, ARGB colorLow, ARGB colorHigh)
|
||||||
{
|
{
|
||||||
static int calls;
|
TRACE("(%p,%u,%i,%08x,%08x)\n", imageattr, type, enableFlag, colorLow, colorHigh);
|
||||||
|
|
||||||
if(!imageattr)
|
if(!imageattr || type >= ColorAdjustTypeCount)
|
||||||
return InvalidParameter;
|
return InvalidParameter;
|
||||||
|
|
||||||
if(!(calls++))
|
imageattr->colorkeys[type].enabled = enableFlag;
|
||||||
FIXME("not implemented\n");
|
imageattr->colorkeys[type].low = colorLow;
|
||||||
|
imageattr->colorkeys[type].high = colorHigh;
|
||||||
|
|
||||||
return NotImplemented;
|
return Ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
GpStatus WINGDIPAPI GdipSetImageAttributesColorMatrix(GpImageAttributes *imageattr,
|
GpStatus WINGDIPAPI GdipSetImageAttributesColorMatrix(GpImageAttributes *imageattr,
|
||||||
|
|
Loading…
Reference in New Issue