Go to the source code of this file.
Definition at line 35 of file XCopyImg.c.
39 int line_width =
image->bytes_per_line;
44 switch (
image->bits_per_pixel )
51 char *srcline, *dstline;
52 register char *src, *dst;
57 srcline =
image->data + line_width * (src_y+
height-1) +
59 dstline =
image->data + line_width * (dst_y+
height-1) +
62 if ( src_x < dst_x ) {
65 src = srcline +
width - 1;
69 duff8( counter, *dst-- = *src-- );
71 srcline -= line_width;
72 dstline -= line_width;
78 src = srcline -
width + 1;
82 duff8( counter, *dst++ = *src++ );
84 srcline -= line_width;
85 dstline -= line_width;
91 srcline =
image->data + line_width * src_y + src_x;
92 dstline =
image->data + line_width * dst_y + dst_x;
94 if ( src_x < dst_x ) {
98 src = srcline +
width - 1;
102 duff8( counter, *dst-- = *src-- );
104 srcline += line_width;
105 dstline += line_width;
109 srcline +=
width - 1;
111 src = srcline -
width + 1;
115 duff8( counter, *dst++ = *src++ );
117 srcline += line_width;
118 dstline += line_width;
127 register long *srcline, *dstline;
128 register long *src, *dst;
132 srcline = (
long *) ((
char *)
image->data +
133 line_width * (src_y+
height-1) +
134 src_x *
sizeof(
long));
135 dstline = (
long *) ((
char *)
image->data +
136 line_width * (dst_y+
height-1) +
137 dst_x *
sizeof(
long));
139 if ( src_x < dst_x ) {
141 dstline +=
width - 1;
143 src = srcline +
width - 1;
146 while ( src >= srcline )
149 srcline -= line_width/
sizeof(long);
150 dstline -= line_width/
sizeof(long);
154 srcline +=
width - 1;
156 src = srcline -
width + 1;
159 while ( src <= srcline )
162 srcline -= line_width/
sizeof(long);
163 dstline -= line_width/
sizeof(long);
169 srcline = (
long *) ((
char *)
image->data + line_width * src_y +
170 src_x *
sizeof(long));
171 dstline = (
long *) ((
char *)
image->data + line_width * dst_y +
172 dst_x *
sizeof(long));
174 if ( src_x < dst_x ) {
176 dstline +=
width - 1;
178 src = srcline +
width - 1;
181 while ( src >= srcline )
184 srcline += line_width/
sizeof(long);
185 dstline += line_width/
sizeof(long);
189 srcline +=
width - 1;
191 src = srcline -
width + 1;
194 while ( src <= srcline )
197 srcline += line_width/
sizeof(long);
198 dstline += line_width/
sizeof(long);
#define duff8(counter, block)