20 if ((t = b - a) < 0) \
32#define MNMX3(a, b, c) \
35#define MNMX4(a, b, c, d) \
40#define MNMX5(a, b, c, d, e) \
45#define MNMX6(a, b, c, d, e, f) \
65 const sal_Int32 nWidth = pWriteAcc->Width(), nWidth2 = nWidth + 2;
66 const sal_Int32 nHeight = pWriteAcc->Height(), nHeight2 = nHeight + 2;
67 std::unique_ptr<sal_Int32[]> pColm(
new sal_Int32[nWidth2]);
68 std::unique_ptr<sal_Int32[]> pRows(
new sal_Int32[nHeight2]);
69 std::unique_ptr<BitmapColor[]> pColRow1(
new BitmapColor[nWidth2]);
70 std::unique_ptr<BitmapColor[]> pColRow2(
new BitmapColor[nWidth2]);
71 std::unique_ptr<BitmapColor[]> pColRow3(
new BitmapColor[nWidth2]);
77 sal_Int32 nR1, nR2, nR3, nR4, nR5, nR6, nR7, nR8, nR9;
78 sal_Int32 nG1, nG2, nG3, nG4, nG5, nG6, nG7, nG8, nG9;
79 sal_Int32 nB1, nB2, nB3, nB4, nB5, nB6, nB7, nB8, nB9;
82 for (
i = 0;
i < nWidth2;
i++)
83 pColm[
i] = (
i > 0) ? (
i - 1) : 0;
85 pColm[nWidth + 1] = pColm[nWidth];
88 for (
i = 0;
i < nHeight2;
i++)
89 pRows[
i] = (
i > 0) ? (
i - 1) : 0;
91 pRows[nHeight + 1] = pRows[nHeight];
96 for (
i = 0;
i < nWidth2;
i++)
98 pColRow1[
i] = pReadAcc->
GetColor(pRows[0], pColm[
i]);
99 pColRow2[
i] = pReadAcc->
GetColor(pRows[1], pColm[
i]);
100 pColRow3[
i] = pReadAcc->
GetColor(pRows[2], pColm[
i]);
105 for (nY = 0; nY < nHeight;)
107 Scanline pScanline = pWriteAcc->GetScanline(nY);
108 for (nX = 0; nX < nWidth; nX++)
110 pColor = pRowTmp1 + nX;
114 nR2 = (++pColor)->GetRed();
117 nR3 = (++pColor)->GetRed();
121 pColor = pRowTmp2 + nX;
125 nR5 = (++pColor)->GetRed();
128 nR6 = (++pColor)->GetRed();
132 pColor = pRowTmp3 + nX;
136 nR8 = (++pColor)->GetRed();
139 nR9 = (++pColor)->GetRed();
143 MNMX6(nR1, nR2, nR3, nR4, nR5, nR6);
144 MNMX5(nR7, nR2, nR3, nR4, nR5);
145 MNMX4(nR8, nR2, nR3, nR4);
146 MNMX3(nR9, nR2, nR3);
148 MNMX6(nG1, nG2, nG3, nG4, nG5, nG6);
149 MNMX5(nG7, nG2, nG3, nG4, nG5);
150 MNMX4(nG8, nG2, nG3, nG4);
151 MNMX3(nG9, nG2, nG3);
153 MNMX6(nB1, nB2, nB3, nB4, nB5, nB6);
154 MNMX5(nB7, nB2, nB3, nB4, nB5);
155 MNMX4(nB8, nB2, nB3, nB4);
156 MNMX3(nB9, nB2, nB3);
159 pWriteAcc->SetPixelOnData(pScanline, nX,
167 if (pRowTmp1 == pColRow1.get())
169 pRowTmp1 = pColRow2.get();
170 pRowTmp2 = pColRow3.get();
171 pRowTmp3 = pColRow1.get();
173 else if (pRowTmp1 == pColRow2.get())
175 pRowTmp1 = pColRow3.get();
176 pRowTmp2 = pColRow1.get();
177 pRowTmp3 = pColRow2.get();
181 pRowTmp1 = pColRow1.get();
182 pRowTmp2 = pColRow2.get();
183 pRowTmp3 = pColRow3.get();
186 for (
i = 0;
i < nWidth2;
i++)
187 pRowTmp3[
i] = pReadAcc->
GetColor(pRows[nY + 2], pColm[
i]);
Bitmap GetBitmap(Color aTransparentReplaceColor) const
BitmapColor GetColor(tools::Long nY, tools::Long nX) const
void SetPrefMapMode(const MapMode &rMapMode)
const MapMode & GetPrefMapMode() const
Size GetSizePixel() const
void SetPrefSize(const Size &rSize)
const Size & GetPrefSize() const
sal_uInt8 GetBlue() const
sal_uInt8 GetGreen() const
HashMap_OWString_Interface aMap