Changed return type to 'void' of function with unused return value.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10111 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -30,7 +30,7 @@ typedef union {
|
|||||||
} ColorRGB32;
|
} ColorRGB32;
|
||||||
|
|
||||||
class Halftone;
|
class Halftone;
|
||||||
typedef int (Halftone::*PFN_dither)(uchar *dst, const uchar *src, int x, int y, int width);
|
typedef void (Halftone::*PFN_dither)(uchar *dst, const uchar *src, int x, int y, int width);
|
||||||
typedef uint (*PFN_gray)(ColorRGB32 c);
|
typedef uint (*PFN_gray)(ColorRGB32 c);
|
||||||
|
|
||||||
class Halftone {
|
class Halftone {
|
||||||
@@ -59,7 +59,7 @@ public:
|
|||||||
~Halftone();
|
~Halftone();
|
||||||
void setPlanes(Planes planes);
|
void setPlanes(Planes planes);
|
||||||
void setBlackValue(BlackValue blackValue);
|
void setBlackValue(BlackValue blackValue);
|
||||||
int dither(uchar *dst, const uchar *src, int x, int y, int width);
|
void dither(uchar *dst, const uchar *src, int x, int y, int width);
|
||||||
int getPixelDepth() const;
|
int getPixelDepth() const;
|
||||||
const uchar *getPattern() const;
|
const uchar *getPattern() const;
|
||||||
void setPattern(const uchar *pattern);
|
void setPattern(const uchar *pattern);
|
||||||
@@ -74,13 +74,13 @@ protected:
|
|||||||
void initElements(int x, int y, uchar *elements);
|
void initElements(int x, int y, uchar *elements);
|
||||||
uint getDensity(ColorRGB32 c) const;
|
uint getDensity(ColorRGB32 c) const;
|
||||||
uchar convertUsingBlackValue(uchar byte) const;
|
uchar convertUsingBlackValue(uchar byte) const;
|
||||||
int ditherRGB32(uchar *dst, const uchar *src, int x, int y, int width);
|
void ditherRGB32(uchar *dst, const uchar *src, int x, int y, int width);
|
||||||
|
|
||||||
void initFloydSteinberg();
|
void initFloydSteinberg();
|
||||||
void deleteErrorTables();
|
void deleteErrorTables();
|
||||||
void uninitFloydSteinberg();
|
void uninitFloydSteinberg();
|
||||||
void setupErrorBuffer(int x, int y, int width);
|
void setupErrorBuffer(int x, int y, int width);
|
||||||
int ditherFloydSteinberg(uchar *dst, const uchar* src, int x, int y, int width);
|
void ditherFloydSteinberg(uchar *dst, const uchar* src, int x, int y, int width);
|
||||||
|
|
||||||
Halftone(const Halftone &);
|
Halftone(const Halftone &);
|
||||||
Halftone &operator = (const Halftone &);
|
Halftone &operator = (const Halftone &);
|
||||||
|
|||||||
@@ -135,15 +135,13 @@ void Halftone::initElements(int x, int y, uchar *elements)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int Halftone::dither(
|
void Halftone::dither(
|
||||||
uchar *dst,
|
uchar *dst,
|
||||||
const uchar *src,
|
const uchar *src,
|
||||||
int x,
|
int x,
|
||||||
int y,
|
int y,
|
||||||
int width)
|
int width)
|
||||||
{
|
{
|
||||||
int result;
|
|
||||||
|
|
||||||
if (fPlanes == kPlaneRGB1) {
|
if (fPlanes == kPlaneRGB1) {
|
||||||
switch (fCurrentPlane) {
|
switch (fCurrentPlane) {
|
||||||
case 0:
|
case 0:
|
||||||
@@ -160,14 +158,13 @@ int Halftone::dither(
|
|||||||
ASSERT(fGray == &gray);
|
ASSERT(fGray == &gray);
|
||||||
}
|
}
|
||||||
|
|
||||||
result = (this->*fDither)(dst, src, x, y, width);
|
(this->*fDither)(dst, src, x, y, width);
|
||||||
|
|
||||||
// next plane
|
// next plane
|
||||||
fCurrentPlane ++;
|
fCurrentPlane ++;
|
||||||
if (fCurrentPlane >= fNumberOfPlanes) {
|
if (fCurrentPlane >= fNumberOfPlanes) {
|
||||||
fCurrentPlane = 0;
|
fCurrentPlane = 0;
|
||||||
}
|
}
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Halftone::setGrayFunction(GrayFunction grayFunction)
|
void Halftone::setGrayFunction(GrayFunction grayFunction)
|
||||||
@@ -186,7 +183,7 @@ void Halftone::setGrayFunction(GrayFunction grayFunction)
|
|||||||
setGrayFunction(function);
|
setGrayFunction(function);
|
||||||
}
|
}
|
||||||
|
|
||||||
int Halftone::ditherRGB32(
|
void Halftone::ditherRGB32(
|
||||||
uchar *dst,
|
uchar *dst,
|
||||||
const uchar *a_src,
|
const uchar *a_src,
|
||||||
int x,
|
int x,
|
||||||
@@ -249,8 +246,6 @@ int Halftone::ditherRGB32(
|
|||||||
}
|
}
|
||||||
*dst++ = convertUsingBlackValue(cur);
|
*dst++ = convertUsingBlackValue(cur);
|
||||||
}
|
}
|
||||||
|
|
||||||
return widthByte;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Floyd-Steinberg dithering
|
// Floyd-Steinberg dithering
|
||||||
@@ -288,7 +283,7 @@ void Halftone::setupErrorBuffer(int x, int y, int width)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int Halftone::ditherFloydSteinberg(uchar *dst, const uchar* a_src, int x, int y, int width)
|
void Halftone::ditherFloydSteinberg(uchar *dst, const uchar* a_src, int x, int y, int width)
|
||||||
{
|
{
|
||||||
if (fErrorTables[fCurrentPlane] == NULL || fX != x || fCurrentPlane == 0 && fY != y - 1 || fCurrentPlane > 0 && fY != y || fWidth != width) {
|
if (fErrorTables[fCurrentPlane] == NULL || fX != x || fCurrentPlane == 0 && fY != y - 1 || fCurrentPlane > 0 && fY != y || fWidth != width) {
|
||||||
setupErrorBuffer(x, y, width);
|
setupErrorBuffer(x, y, width);
|
||||||
|
|||||||
Reference in New Issue
Block a user