forked from old/legacy-imlib2
parent
e983a0adbb
commit
11e7b0369a
20
src/grab.c
20
src/grab.c
|
@ -115,8 +115,13 @@ __imlib_GrabXImageToRGBA(DATA32 *data, int ox, int oy, int ow, int oh,
|
|||
src = (DATA32 *)(xim->data + (xim->bytes_per_line * y));
|
||||
ptr = data + ((y + iny) * ow) + inx;
|
||||
for (x = 0; x < (w - 1); x += 2) {
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
*ptr++ = MP(x + 1, y) | P2(*src);
|
||||
*ptr++ = MP(x, y) | P1(*src);
|
||||
#else
|
||||
*ptr++ = MP(x, y) | P1(*src);
|
||||
*ptr++ = MP(x + 1, y) | P2(*src);
|
||||
#endif
|
||||
src++;
|
||||
}
|
||||
if (x == (w - 1)) {
|
||||
|
@ -132,8 +137,13 @@ __imlib_GrabXImageToRGBA(DATA32 *data, int ox, int oy, int ow, int oh,
|
|||
src = (DATA32 *)(xim->data + (xim->bytes_per_line * y));
|
||||
ptr = data + ((y + iny) * ow) + inx;
|
||||
for (x = 0; x < (w - 1); x += 2) {
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
*ptr++ = MP(x + 1, y) | P2(*src);
|
||||
*ptr++ = MP(x, y) | P1(*src);
|
||||
#else
|
||||
*ptr++ = MP(x, y) | P1(*src);
|
||||
*ptr++ = MP(x + 1, y) | P2(*src);
|
||||
#endif
|
||||
src++;
|
||||
}
|
||||
if (x == (w - 1)) {
|
||||
|
@ -173,8 +183,13 @@ __imlib_GrabXImageToRGBA(DATA32 *data, int ox, int oy, int ow, int oh,
|
|||
src = (DATA32 *)(xim->data + (xim->bytes_per_line * y));
|
||||
ptr = data + ((y + iny) * ow) + inx;
|
||||
for (x = 0; x < (w - 1); x += 2) {
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
*ptr++ = MP(x + 1, y) | P2(*src);
|
||||
*ptr++ = MP(x, y) | P1(*src);
|
||||
#else
|
||||
*ptr++ = MP(x, y) | P1(*src);
|
||||
*ptr++ = MP(x + 1, y) | P2(*src);
|
||||
#endif
|
||||
src++;
|
||||
}
|
||||
if (x == (w - 1)) {
|
||||
|
@ -190,8 +205,13 @@ __imlib_GrabXImageToRGBA(DATA32 *data, int ox, int oy, int ow, int oh,
|
|||
src = (DATA32 *)(xim->data + (xim->bytes_per_line * y));
|
||||
ptr = data + ((y + iny) * ow) + inx;
|
||||
for (x = 0; x < (w - 1); x += 2) {
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
*ptr++ = MP(x + 1, y) | P2(*src);
|
||||
*ptr++ = MP(x, y) | P1(*src);
|
||||
#else
|
||||
*ptr++ = MP(x, y) | P1(*src);
|
||||
*ptr++ = MP(x + 1, y) | P2(*src);
|
||||
#endif
|
||||
src++;
|
||||
}
|
||||
if (x == (w - 1)) {
|
||||
|
|
Loading…
Reference in New Issue