mirror of
https://github.com/reactos/reactos.git
synced 2025-07-31 10:21:50 +00:00
parent
5cc4c9b24d
commit
094960e386
1 changed files with 115 additions and 56 deletions
|
@ -22,166 +22,225 @@
|
||||||
class ImageAttributes : public GdiplusBase
|
class ImageAttributes : public GdiplusBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ImageAttributes(VOID)
|
ImageAttributes() : nativeImageAttr(NULL)
|
||||||
{
|
{
|
||||||
|
lastStatus = DllExports::GdipCreateImageAttributes(&nativeImageAttr);
|
||||||
}
|
}
|
||||||
|
|
||||||
Status ClearBrushRemapTable(VOID)
|
~ImageAttributes()
|
||||||
{
|
{
|
||||||
return NotImplemented;
|
DllExports::GdipDisposeImageAttributes(nativeImageAttr);
|
||||||
}
|
}
|
||||||
|
|
||||||
Status
|
Status
|
||||||
ClearColorKey(ColorAdjustType type)
|
ClearBrushRemapTable()
|
||||||
{
|
{
|
||||||
return NotImplemented;
|
return ClearRemapTable(ColorAdjustTypeBrush);
|
||||||
}
|
}
|
||||||
|
|
||||||
Status
|
Status
|
||||||
ClearColorMatrices(ColorAdjustType type)
|
ClearColorKey(ColorAdjustType type = ColorAdjustTypeDefault)
|
||||||
{
|
{
|
||||||
return NotImplemented;
|
return SetStatus(DllExports::GdipSetImageAttributesColorKeys(nativeImageAttr, type, FALSE, NULL, NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
Status
|
Status
|
||||||
ClearColorMatrix(ColorAdjustType type)
|
ClearColorMatrices(ColorAdjustType type = ColorAdjustTypeDefault)
|
||||||
{
|
{
|
||||||
return NotImplemented;
|
return SetStatus(DllExports::GdipSetImageAttributesColorMatrix(
|
||||||
|
nativeImageAttr, type, FALSE, NULL, NULL, ColorMatrixFlagsDefault));
|
||||||
}
|
}
|
||||||
|
|
||||||
Status
|
Status
|
||||||
ClearGamma(ColorAdjustType type)
|
ClearColorMatrix(ColorAdjustType type = ColorAdjustTypeDefault)
|
||||||
{
|
{
|
||||||
return NotImplemented;
|
return SetStatus(DllExports::GdipSetImageAttributesColorMatrix(
|
||||||
|
nativeImageAttr, type, FALSE, NULL, NULL, ColorMatrixFlagsDefault));
|
||||||
}
|
}
|
||||||
|
|
||||||
Status
|
Status
|
||||||
ClearNoOp(ColorAdjustType type)
|
ClearGamma(ColorAdjustType type = ColorAdjustTypeDefault)
|
||||||
{
|
{
|
||||||
return NotImplemented;
|
return SetStatus(DllExports::GdipSetImageAttributesGamma(nativeImageAttr, type, FALSE, 0.0));
|
||||||
}
|
}
|
||||||
|
|
||||||
Status
|
Status
|
||||||
ClearOutputChannel(ColorAdjustType type)
|
ClearNoOp(ColorAdjustType type = ColorAdjustTypeDefault)
|
||||||
{
|
{
|
||||||
return NotImplemented;
|
return SetStatus(DllExports::GdipSetImageAttributesNoOp(nativeImageAttr, type, FALSE));
|
||||||
}
|
}
|
||||||
|
|
||||||
Status
|
Status
|
||||||
ClearOutputChannelColorProfile(ColorAdjustType type)
|
ClearOutputChannel(ColorAdjustType type = ColorAdjustTypeDefault)
|
||||||
{
|
{
|
||||||
return NotImplemented;
|
return SetStatus(
|
||||||
|
DllExports::GdipSetImageAttributesOutputChannel(nativeImageAttr, type, FALSE, ColorChannelFlagsLast));
|
||||||
}
|
}
|
||||||
|
|
||||||
Status
|
Status
|
||||||
ClearRemapTable(ColorAdjustType type)
|
ClearOutputChannelColorProfile(ColorAdjustType type = ColorAdjustTypeDefault)
|
||||||
{
|
{
|
||||||
return NotImplemented;
|
return SetStatus(
|
||||||
|
DllExports::GdipSetImageAttributesOutputChannelColorProfile(nativeImageAttr, type, FALSE, NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
Status
|
Status
|
||||||
ClearThreshold(ColorAdjustType type)
|
ClearRemapTable(ColorAdjustType type = ColorAdjustTypeDefault)
|
||||||
{
|
{
|
||||||
return NotImplemented;
|
return SetStatus(DllExports::GdipSetImageAttributesRemapTable(nativeImageAttr, type, FALSE, 0, NULL));
|
||||||
}
|
|
||||||
|
|
||||||
ImageAttributes *Clone(VOID)
|
|
||||||
{
|
|
||||||
return NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Status
|
Status
|
||||||
GetAdjustedPalette(ColorPalette *colorPalette, ColorPalette colorAdjustType)
|
ClearThreshold(ColorAdjustType type = ColorAdjustTypeDefault)
|
||||||
{
|
{
|
||||||
return NotImplemented;
|
return SetStatus(DllExports::GdipSetImageAttributesThreshold(nativeImageAttr, type, FALSE, 0.0));
|
||||||
}
|
}
|
||||||
|
|
||||||
Status GetLastStatus(VOID)
|
ImageAttributes *
|
||||||
|
Clone()
|
||||||
{
|
{
|
||||||
return NotImplemented;
|
GpImageAttributes *clone = NULL;
|
||||||
|
SetStatus(DllExports::GdipCloneImageAttributes(nativeImageAttr, &clone));
|
||||||
|
if (lastStatus != Ok)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
ImageAttributes *newImageAttr = new ImageAttributes(clone, lastStatus);
|
||||||
|
if (newImageAttr == NULL)
|
||||||
|
SetStatus(DllExports::GdipDisposeImageAttributes(clone));
|
||||||
|
|
||||||
|
return newImageAttr;
|
||||||
}
|
}
|
||||||
|
|
||||||
Status
|
Status
|
||||||
Reset(ColorAdjustType type)
|
GetAdjustedPalette(ColorPalette *colorPalette, ColorAdjustType colorAdjustType)
|
||||||
{
|
{
|
||||||
return NotImplemented;
|
return SetStatus(
|
||||||
|
DllExports::GdipGetImageAttributesAdjustedPalette(nativeImageAttr, colorPalette, colorAdjustType));
|
||||||
|
}
|
||||||
|
|
||||||
|
Status
|
||||||
|
GetLastStatus()
|
||||||
|
{
|
||||||
|
return lastStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
Status
|
||||||
|
Reset(ColorAdjustType type = ColorAdjustTypeDefault)
|
||||||
|
{
|
||||||
|
return SetStatus(DllExports::GdipResetImageAttributes(nativeImageAttr, type));
|
||||||
}
|
}
|
||||||
|
|
||||||
Status
|
Status
|
||||||
SetBrushRemapTable(UINT mapSize, ColorMap *map)
|
SetBrushRemapTable(UINT mapSize, ColorMap *map)
|
||||||
{
|
{
|
||||||
return NotImplemented;
|
return SetRemapTable(mapSize, map, ColorAdjustTypeBrush);
|
||||||
}
|
}
|
||||||
|
|
||||||
Status
|
Status
|
||||||
SetColorKey(const Color &colorLow, const Color &colorHigh, ColorAdjustType type)
|
SetColorKey(const Color &colorLow, const Color &colorHigh, ColorAdjustType type = ColorAdjustTypeDefault)
|
||||||
{
|
{
|
||||||
return NotImplemented;
|
return SetStatus(DllExports::GdipSetImageAttributesColorKeys(
|
||||||
|
nativeImageAttr, type, TRUE, colorLow.GetValue(), colorHigh.GetValue()));
|
||||||
}
|
}
|
||||||
|
|
||||||
Status
|
Status
|
||||||
SetColorMatrices(
|
SetColorMatrices(
|
||||||
const ColorMatrix *colorMatrix,
|
const ColorMatrix *colorMatrix,
|
||||||
const ColorMatrix *grayMatrix,
|
const ColorMatrix *grayMatrix,
|
||||||
ColorMatrixFlags mode,
|
ColorMatrixFlags mode = ColorMatrixFlagsDefault,
|
||||||
ColorAdjustType type)
|
ColorAdjustType type = ColorAdjustTypeDefault)
|
||||||
{
|
{
|
||||||
return NotImplemented;
|
return SetStatus(
|
||||||
|
DllExports::GdipSetImageAttributesColorMatrix(nativeImageAttr, type, TRUE, colorMatrix, grayMatrix, mode));
|
||||||
}
|
}
|
||||||
|
|
||||||
Status
|
Status
|
||||||
SetColorMatrix(const ColorMatrix *colorMatrix, ColorMatrixFlags mode, ColorAdjustType type)
|
SetColorMatrix(
|
||||||
|
const ColorMatrix *colorMatrix,
|
||||||
|
ColorMatrixFlags mode = ColorMatrixFlagsDefault,
|
||||||
|
ColorAdjustType type = ColorAdjustTypeDefault)
|
||||||
{
|
{
|
||||||
return NotImplemented;
|
return SetStatus(
|
||||||
|
DllExports::GdipSetImageAttributesColorMatrix(nativeImageAttr, type, TRUE, colorMatrix, NULL, mode));
|
||||||
}
|
}
|
||||||
|
|
||||||
Status
|
Status
|
||||||
SetGamma(REAL gamma, ColorAdjustType type)
|
SetGamma(REAL gamma, ColorAdjustType type = ColorAdjustTypeDefault)
|
||||||
{
|
{
|
||||||
return NotImplemented;
|
return SetStatus(DllExports::GdipSetImageAttributesGamma(nativeImageAttr, type, TRUE, gamma));
|
||||||
}
|
}
|
||||||
|
|
||||||
Status
|
Status
|
||||||
SetNoOp(ColorAdjustType type)
|
SetNoOp(ColorAdjustType type = ColorAdjustTypeDefault)
|
||||||
{
|
{
|
||||||
return NotImplemented;
|
return SetStatus(DllExports::GdipSetImageAttributesNoOp(nativeImageAttr, type, TRUE));
|
||||||
}
|
}
|
||||||
|
|
||||||
Status
|
Status
|
||||||
SetOutputChannel(ColorChannelFlags channelFlags, ColorAdjustType type)
|
SetOutputChannel(ColorChannelFlags channelFlags, ColorAdjustType type = ColorAdjustTypeDefault)
|
||||||
{
|
{
|
||||||
return NotImplemented;
|
return SetStatus(DllExports::GdipSetImageAttributesOutputChannel(nativeImageAttr, type, TRUE, channelFlags));
|
||||||
}
|
}
|
||||||
|
|
||||||
Status
|
Status
|
||||||
SetOutputChannelColorProfile(const WCHAR *colorProfileFilename, ColorAdjustType type)
|
SetOutputChannelColorProfile(const WCHAR *colorProfileFilename, ColorAdjustType type = ColorAdjustTypeDefault)
|
||||||
{
|
{
|
||||||
return NotImplemented;
|
return SetStatus(DllExports::GdipSetImageAttributesOutputChannelColorProfile(
|
||||||
|
nativeImageAttr, type, TRUE, colorProfileFilename));
|
||||||
}
|
}
|
||||||
|
|
||||||
Status
|
Status
|
||||||
SetRemapTable(UINT mapSize, const ColorMap *map, ColorAdjustType type)
|
SetRemapTable(UINT mapSize, const ColorMap *map, ColorAdjustType type = ColorAdjustTypeDefault)
|
||||||
{
|
{
|
||||||
return NotImplemented;
|
return SetStatus(DllExports::GdipSetImageAttributesRemapTable(nativeImageAttr, type, TRUE, mapSize, map));
|
||||||
}
|
}
|
||||||
|
|
||||||
Status
|
Status
|
||||||
SetThreshold(REAL threshold, ColorAdjustType type)
|
SetThreshold(REAL threshold, ColorAdjustType type = ColorAdjustTypeDefault)
|
||||||
{
|
{
|
||||||
return NotImplemented;
|
return SetStatus(DllExports::GdipSetImageAttributesThreshold(nativeImageAttr, type, TRUE, threshold));
|
||||||
}
|
}
|
||||||
|
|
||||||
Status
|
Status
|
||||||
SetToIdentity(ColorAdjustType type)
|
SetToIdentity(ColorAdjustType type = ColorAdjustTypeDefault)
|
||||||
{
|
{
|
||||||
return NotImplemented;
|
return SetStatus(DllExports::GdipSetImageAttributesToIdentity(nativeImageAttr, type));
|
||||||
}
|
}
|
||||||
|
|
||||||
Status
|
Status
|
||||||
SetWrapMode(WrapMode wrap, const Color &color, BOOL clamp)
|
SetWrapMode(WrapMode wrap, const Color &color = Color(), BOOL clamp = FALSE)
|
||||||
{
|
{
|
||||||
return NotImplemented;
|
ARGB argb = color.GetValue();
|
||||||
|
return SetStatus(DllExports::GdipSetImageAttributesWrapMode(nativeImageAttr, wrap, argb, clamp));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected:
|
||||||
|
GpImageAttributes *nativeImageAttr;
|
||||||
|
mutable Status lastStatus;
|
||||||
|
|
||||||
|
ImageAttributes(GpImageAttributes *imageAttr, Status status) : nativeImageAttr(imageAttr), lastStatus(status)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID
|
||||||
|
SetNativeImageAttr(GpImageAttributes *imageAttr)
|
||||||
|
{
|
||||||
|
nativeImageAttr = imageAttr;
|
||||||
|
}
|
||||||
|
|
||||||
|
Status
|
||||||
|
SetStatus(Status status) const
|
||||||
|
{
|
||||||
|
if (status != Ok)
|
||||||
|
lastStatus = status;
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
// ImageAttributes is not copyable
|
||||||
|
ImageAttributes(const ImageAttributes &);
|
||||||
|
ImageAttributes &
|
||||||
|
operator=(const ImageAttributes &);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* _GDIPLUSIMAGEATTRIBUTES_H */
|
#endif /* _GDIPLUSIMAGEATTRIBUTES_H */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue