Extended to dither each RGB channel separately.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6407 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Michael Pfeiffer
2004-01-29 18:47:58 +00:00
parent fc2f5c4f98
commit aa36fbce3a
2 changed files with 40 additions and 1 deletions
@@ -24,6 +24,12 @@ public:
TYPE2,
TYPE3
};
enum GrayFunction {
kMixToGray,
kRedChannel,
kGreenChannel,
kBlueChannel
};
Halftone(color_space cs, double gamma = 1.4, DITHERTYPE dither_type = TYPE3);
~Halftone();
int dither(uchar *dst, const uchar *src, int x, int y, int width);
@@ -33,6 +39,7 @@ public:
void setPattern(const uchar *pattern);
PFN_gray getGrayFunction() const;
void setGrayFunction(PFN_gray gray);
void setGrayFunction(GrayFunction grayFunction);
protected:
void createGammaTable(double gamma);