137 pixels += clipLeft - left;
138 left = clipLeft;
139 }
140 if (top < clipTop) {
141 pixels += (clipTop - top) * rowBytes;
142 top = clipTop;
143 }
144 if (right > clipRight) {
145 right = clipRight;
146 }
147 if (bottom > clipBottom) {
148 bottom = clipBottom;
149 }
150 if (right <= left || bottom <= top) {
151 continue;
152 }
153 width = right - left;
154 height = bottom - top;
155 top -= clipTop;
156 left -= clipLeft;
157 pPix = ((jubyte *) theImage->data) + (left >> 3) + top * scan;
158 left &= 0x07;
159 if (theImage->bitmap_bit_order == MSBFirst) {
160 left = 0x80 >> left;
161 do {
162 int x = 0, bx = 0;
163 int pix = pPix[0];
164 int bit = left;
165 do {
166 if (bit == 0) {
167 pPix[bx] = (jubyte) pix;
168 pix = pPix[++bx];
169 bit = 0x80;
170 }
171 if (pixels[x]) {
172 pix |= bit;
173 }
174 bit >>= 1;
175 } while (++x < width);
176 pPix[bx] = (jubyte) pix;
177 pPix += scan;
|
137 pixels += clipLeft - left;
138 left = clipLeft;
139 }
140 if (top < clipTop) {
141 pixels += (clipTop - top) * rowBytes;
142 top = clipTop;
143 }
144 if (right > clipRight) {
145 right = clipRight;
146 }
147 if (bottom > clipBottom) {
148 bottom = clipBottom;
149 }
150 if (right <= left || bottom <= top) {
151 continue;
152 }
153 width = right - left;
154 height = bottom - top;
155 top -= clipTop;
156 left -= clipLeft;
157 pPix = ((jubyte *) theImage->data) + (left >> 3) + (intptr_t) top * scan;
158 left &= 0x07;
159 if (theImage->bitmap_bit_order == MSBFirst) {
160 left = 0x80 >> left;
161 do {
162 int x = 0, bx = 0;
163 int pix = pPix[0];
164 int bit = left;
165 do {
166 if (bit == 0) {
167 pPix[bx] = (jubyte) pix;
168 pix = pPix[++bx];
169 bit = 0x80;
170 }
171 if (pixels[x]) {
172 pix |= bit;
173 }
174 bit >>= 1;
175 } while (++x < width);
176 pPix[bx] = (jubyte) pix;
177 pPix += scan;
|