43 SurfaceDataBounds span, srcBounds;
44 RegionData clipInfo;
45 GC xgc;
46
47 if (width <= 0 || height <= 0) {
48 return;
49 }
50
51 srcXsdo = (X11SDOps *)jlong_to_ptr(srcData);
52 if (srcXsdo == NULL) {
53 return;
54 }
55 dstXsdo = (X11SDOps *)jlong_to_ptr(dstData);
56 if (dstXsdo == NULL) {
57 return;
58 }
59 if (Region_GetInfo(env, clip, &clipInfo)) {
60 return;
61 }
62
63 xgc = (GC)gc;
64 if (xgc == NULL) {
65 return;
66 }
67
68 #ifdef MITSHM
69 if (srcXsdo->isPixmap) {
70 X11SD_UnPuntPixmap(srcXsdo);
71 }
72 #endif /* MITSHM */
73
74 /* clip the source rect to the source pixmap's dimensions */
75 srcBounds.x1 = srcx;
76 srcBounds.y1 = srcy;
77 srcBounds.x2 = srcx + width;
78 srcBounds.y2 = srcy + height;
79 SurfaceData_IntersectBoundsXYXY(&srcBounds,
80 0, 0, srcXsdo->pmWidth, srcXsdo->pmHeight);
81 span.x1 = dstx;
82 span.y1 = dsty;
83 span.x2 = dstx + width;
134 {
135 #ifndef HEADLESS
136 X11SDOps *srcXsdo, *dstXsdo;
137 GC dstGC;
138 SurfaceDataBounds dstBounds, srcBounds;
139 Drawable srcDrawable;
140
141 if (width <= 0 || height <= 0) {
142 return;
143 }
144
145 srcXsdo = (X11SDOps *)jlong_to_ptr(srcData);
146 if (srcXsdo == NULL) {
147 return;
148 }
149 dstXsdo = (X11SDOps *)jlong_to_ptr(dstData);
150 if (dstXsdo == NULL) {
151 return;
152 }
153
154 dstGC = (GC)xgc;
155 if (dstGC == NULL) {
156 return;
157 }
158
159 #ifdef MITSHM
160 if (srcXsdo->isPixmap) {
161 X11SD_UnPuntPixmap(srcXsdo);
162 }
163 #endif /* MITSHM */
164
165 srcDrawable = srcXsdo->GetPixmapWithBg(env, srcXsdo, pixel);
166 if (srcDrawable == 0) {
167 return;
168 }
169
170 /* clip the source rect to the source pixmap's dimensions */
171 srcBounds.x1 = srcx;
172 srcBounds.y1 = srcy;
173 srcBounds.x2 = srcx + width;
174 srcBounds.y2 = srcy + height;
|
43 SurfaceDataBounds span, srcBounds;
44 RegionData clipInfo;
45 GC xgc;
46
47 if (width <= 0 || height <= 0) {
48 return;
49 }
50
51 srcXsdo = (X11SDOps *)jlong_to_ptr(srcData);
52 if (srcXsdo == NULL) {
53 return;
54 }
55 dstXsdo = (X11SDOps *)jlong_to_ptr(dstData);
56 if (dstXsdo == NULL) {
57 return;
58 }
59 if (Region_GetInfo(env, clip, &clipInfo)) {
60 return;
61 }
62
63 xgc = (GC)jlong_to_ptr(gc);
64 if (xgc == NULL) {
65 return;
66 }
67
68 #ifdef MITSHM
69 if (srcXsdo->isPixmap) {
70 X11SD_UnPuntPixmap(srcXsdo);
71 }
72 #endif /* MITSHM */
73
74 /* clip the source rect to the source pixmap's dimensions */
75 srcBounds.x1 = srcx;
76 srcBounds.y1 = srcy;
77 srcBounds.x2 = srcx + width;
78 srcBounds.y2 = srcy + height;
79 SurfaceData_IntersectBoundsXYXY(&srcBounds,
80 0, 0, srcXsdo->pmWidth, srcXsdo->pmHeight);
81 span.x1 = dstx;
82 span.y1 = dsty;
83 span.x2 = dstx + width;
134 {
135 #ifndef HEADLESS
136 X11SDOps *srcXsdo, *dstXsdo;
137 GC dstGC;
138 SurfaceDataBounds dstBounds, srcBounds;
139 Drawable srcDrawable;
140
141 if (width <= 0 || height <= 0) {
142 return;
143 }
144
145 srcXsdo = (X11SDOps *)jlong_to_ptr(srcData);
146 if (srcXsdo == NULL) {
147 return;
148 }
149 dstXsdo = (X11SDOps *)jlong_to_ptr(dstData);
150 if (dstXsdo == NULL) {
151 return;
152 }
153
154 dstGC = (GC)jlong_to_ptr(xgc);
155 if (dstGC == NULL) {
156 return;
157 }
158
159 #ifdef MITSHM
160 if (srcXsdo->isPixmap) {
161 X11SD_UnPuntPixmap(srcXsdo);
162 }
163 #endif /* MITSHM */
164
165 srcDrawable = srcXsdo->GetPixmapWithBg(env, srcXsdo, pixel);
166 if (srcDrawable == 0) {
167 return;
168 }
169
170 /* clip the source rect to the source pixmap's dimensions */
171 srcBounds.x1 = srcx;
172 srcBounds.y1 = srcy;
173 srcBounds.x2 = srcx + width;
174 srcBounds.y2 = srcy + height;
|