< prev index next >
src/java.desktop/unix/native/common/java2d/x11/X11Renderer.c
Print this page
*** 223,239 ****
(JNIEnv *env, jobject xr,
jlong pXSData, jlong xgc,
jint x1, jint y1, jint x2, jint y2)
{
#ifndef HEADLESS
! X11SDOps *xsdo = (X11SDOps *) pXSData;
if (xsdo == NULL) {
return;
}
! XDrawLine(awt_display, xsdo->drawable, (GC) xgc,
CLAMP_TO_SHORT(x1), CLAMP_TO_SHORT(y1),
CLAMP_TO_SHORT(x2), CLAMP_TO_SHORT(y2));
X11SD_DirectRenderNotify(env, xsdo);
#endif /* !HEADLESS */
}
--- 223,239 ----
(JNIEnv *env, jobject xr,
jlong pXSData, jlong xgc,
jint x1, jint y1, jint x2, jint y2)
{
#ifndef HEADLESS
! X11SDOps *xsdo = (X11SDOps *) jlong_to_ptr(pXSData);
if (xsdo == NULL) {
return;
}
! XDrawLine(awt_display, xsdo->drawable, (GC) jlong_to_ptr(xgc),
CLAMP_TO_SHORT(x1), CLAMP_TO_SHORT(y1),
CLAMP_TO_SHORT(x2), CLAMP_TO_SHORT(y2));
X11SD_DirectRenderNotify(env, xsdo);
#endif /* !HEADLESS */
}
*** 247,257 ****
(JNIEnv *env, jobject xr,
jlong pXSData, jlong xgc,
jint x, jint y, jint w, jint h)
{
#ifndef HEADLESS
! X11SDOps *xsdo = (X11SDOps *) pXSData;
if (xsdo == NULL || w < 0 || h < 0) {
return;
}
--- 247,257 ----
(JNIEnv *env, jobject xr,
jlong pXSData, jlong xgc,
jint x, jint y, jint w, jint h)
{
#ifndef HEADLESS
! X11SDOps *xsdo = (X11SDOps *) jlong_to_ptr(pXSData);
if (xsdo == NULL || w < 0 || h < 0) {
return;
}
*** 261,275 ****
* This optimization not only simplifies the processing
* of a particular degenerate case, but it protects against
* the anomalies of various X11 implementations that draw
* nothing for degenerate Polygons and Rectangles.
*/
! XFillRectangle(awt_display, xsdo->drawable, (GC) xgc,
CLAMP_TO_SHORT(x), CLAMP_TO_SHORT(y),
CLAMP_TO_USHORT(w+1), CLAMP_TO_USHORT(h+1));
} else {
! XDrawRectangle(awt_display, xsdo->drawable, (GC) xgc,
CLAMP_TO_SHORT(x), CLAMP_TO_SHORT(y),
CLAMP_TO_USHORT(w), CLAMP_TO_USHORT(h));
}
X11SD_DirectRenderNotify(env, xsdo);
#endif /* !HEADLESS */
--- 261,275 ----
* This optimization not only simplifies the processing
* of a particular degenerate case, but it protects against
* the anomalies of various X11 implementations that draw
* nothing for degenerate Polygons and Rectangles.
*/
! XFillRectangle(awt_display, xsdo->drawable, (GC) jlong_to_ptr(xgc),
CLAMP_TO_SHORT(x), CLAMP_TO_SHORT(y),
CLAMP_TO_USHORT(w+1), CLAMP_TO_USHORT(h+1));
} else {
! XDrawRectangle(awt_display, xsdo->drawable, (GC) jlong_to_ptr(xgc),
CLAMP_TO_SHORT(x), CLAMP_TO_SHORT(y),
CLAMP_TO_USHORT(w), CLAMP_TO_USHORT(h));
}
X11SD_DirectRenderNotify(env, xsdo);
#endif /* !HEADLESS */
*** 287,297 ****
jint arcW, jint arcH)
{
#ifndef HEADLESS
long ty1, ty2, tx1, tx2, cx, cy, cxw, cyh,
halfW, halfH, leftW, rightW, topH, bottomH;
! X11SDOps *xsdo = (X11SDOps *) pXSData;
if (xsdo == NULL || w < 0 || h < 0) {
return;
}
--- 287,297 ----
jint arcW, jint arcH)
{
#ifndef HEADLESS
long ty1, ty2, tx1, tx2, cx, cy, cxw, cyh,
halfW, halfH, leftW, rightW, topH, bottomH;
! X11SDOps *xsdo = (X11SDOps *) jlong_to_ptr(pXSData);
if (xsdo == NULL || w < 0 || h < 0) {
return;
}
*** 332,367 ****
leftW = (tx1 - cx) * 2;
rightW = (cxw - tx2) * 2;
topH = (ty1 - cy) * 2;
bottomH = (cyh - ty2) * 2;
! awt_drawArc(env, xsdo->drawable, (GC) xgc,
cx, cy, leftW, topH,
90, 90, JNI_FALSE);
! awt_drawArc(env, xsdo->drawable, (GC) xgc,
cxw - rightW, cy, rightW, topH,
0, 90, JNI_FALSE);
! awt_drawArc(env, xsdo->drawable, (GC) xgc,
cx, cyh - bottomH, leftW, bottomH,
180, 90, JNI_FALSE);
! awt_drawArc(env, xsdo->drawable, (GC) xgc,
cxw - rightW, cyh - bottomH, rightW, bottomH,
270, 90, JNI_FALSE);
if (tx1 <= tx2) {
! XDrawLine(awt_display, xsdo->drawable, (GC) xgc,
tx1, cy, tx2, cy);
if (h > 0) {
! XDrawLine(awt_display, xsdo->drawable, (GC) xgc,
tx1, cyh, tx2, cyh);
}
}
if (ty1 <= ty2) {
! XDrawLine(awt_display, xsdo->drawable, (GC) xgc,
cx, ty1, cx, ty2);
if (w > 0) {
! XDrawLine(awt_display, xsdo->drawable, (GC) xgc,
cxw, ty1, cxw, ty2);
}
}
X11SD_DirectRenderNotify(env, xsdo);
#endif /* !HEADLESS */
--- 332,367 ----
leftW = (tx1 - cx) * 2;
rightW = (cxw - tx2) * 2;
topH = (ty1 - cy) * 2;
bottomH = (cyh - ty2) * 2;
! awt_drawArc(env, xsdo->drawable, (GC) jlong_to_ptr(xgc),
cx, cy, leftW, topH,
90, 90, JNI_FALSE);
! awt_drawArc(env, xsdo->drawable, (GC) jlong_to_ptr(xgc),
cxw - rightW, cy, rightW, topH,
0, 90, JNI_FALSE);
! awt_drawArc(env, xsdo->drawable, (GC) jlong_to_ptr(xgc),
cx, cyh - bottomH, leftW, bottomH,
180, 90, JNI_FALSE);
! awt_drawArc(env, xsdo->drawable, (GC) jlong_to_ptr(xgc),
cxw - rightW, cyh - bottomH, rightW, bottomH,
270, 90, JNI_FALSE);
if (tx1 <= tx2) {
! XDrawLine(awt_display, xsdo->drawable, (GC) jlong_to_ptr(xgc),
tx1, cy, tx2, cy);
if (h > 0) {
! XDrawLine(awt_display, xsdo->drawable, (GC) jlong_to_ptr(xgc),
tx1, cyh, tx2, cyh);
}
}
if (ty1 <= ty2) {
! XDrawLine(awt_display, xsdo->drawable, (GC) jlong_to_ptr(xgc),
cx, ty1, cx, ty2);
if (w > 0) {
! XDrawLine(awt_display, xsdo->drawable, (GC) jlong_to_ptr(xgc),
cxw, ty1, cxw, ty2);
}
}
X11SD_DirectRenderNotify(env, xsdo);
#endif /* !HEADLESS */
*** 376,386 ****
(JNIEnv *env, jobject xr,
jlong pXSData, jlong xgc,
jint x, jint y, jint w, jint h)
{
#ifndef HEADLESS
! X11SDOps *xsdo = (X11SDOps *) pXSData;
if (xsdo == NULL) {
return;
}
--- 376,386 ----
(JNIEnv *env, jobject xr,
jlong pXSData, jlong xgc,
jint x, jint y, jint w, jint h)
{
#ifndef HEADLESS
! X11SDOps *xsdo = (X11SDOps *) jlong_to_ptr(pXSData);
if (xsdo == NULL) {
return;
}
*** 391,405 ****
* Really small ovals degenerate to simple rectangles as they
* have no curvature or enclosed area. Use XFillRectangle
* for speed and to deal better with degenerate sizes.
*/
if (w >= 0 && h >= 0) {
! XFillRectangle(awt_display, xsdo->drawable, (GC) xgc,
x, y, w+1, h+1);
}
} else {
! awt_drawArc(env, xsdo->drawable, (GC) xgc,
x, y, w, h, 0, 360, JNI_FALSE);
}
X11SD_DirectRenderNotify(env, xsdo);
#endif /* !HEADLESS */
}
--- 391,405 ----
* Really small ovals degenerate to simple rectangles as they
* have no curvature or enclosed area. Use XFillRectangle
* for speed and to deal better with degenerate sizes.
*/
if (w >= 0 && h >= 0) {
! XFillRectangle(awt_display, xsdo->drawable, (GC) jlong_to_ptr(xgc),
x, y, w+1, h+1);
}
} else {
! awt_drawArc(env, xsdo->drawable, (GC) jlong_to_ptr(xgc),
x, y, w, h, 0, 360, JNI_FALSE);
}
X11SD_DirectRenderNotify(env, xsdo);
#endif /* !HEADLESS */
}
*** 414,430 ****
jlong pXSData, jlong xgc,
jint x, jint y, jint w, jint h,
jint angleStart, jint angleExtent)
{
#ifndef HEADLESS
! X11SDOps *xsdo = (X11SDOps *) pXSData;
if (xsdo == NULL) {
return;
}
! awt_drawArc(env, xsdo->drawable, (GC) xgc,
x, y, w, h, angleStart, angleExtent, JNI_FALSE);
X11SD_DirectRenderNotify(env, xsdo);
#endif /* !HEADLESS */
}
--- 414,430 ----
jlong pXSData, jlong xgc,
jint x, jint y, jint w, jint h,
jint angleStart, jint angleExtent)
{
#ifndef HEADLESS
! X11SDOps *xsdo = (X11SDOps *) jlong_to_ptr(pXSData);
if (xsdo == NULL) {
return;
}
! awt_drawArc(env, xsdo->drawable, (GC) jlong_to_ptr(xgc),
x, y, w, h, angleStart, angleExtent, JNI_FALSE);
X11SD_DirectRenderNotify(env, xsdo);
#endif /* !HEADLESS */
}
*** 440,450 ****
jintArray xcoordsArray, jintArray ycoordsArray, jint npoints,
jboolean isclosed)
{
#ifndef HEADLESS
XPoint pTmp[POLYTEMPSIZE], *points;
! X11SDOps *xsdo = (X11SDOps *) pXSData;
if (xsdo == NULL) {
return;
}
--- 440,450 ----
jintArray xcoordsArray, jintArray ycoordsArray, jint npoints,
jboolean isclosed)
{
#ifndef HEADLESS
XPoint pTmp[POLYTEMPSIZE], *points;
! X11SDOps *xsdo = (X11SDOps *) jlong_to_ptr(pXSData);
if (xsdo == NULL) {
return;
}
*** 474,488 ****
* specification. For simplicity we will dispatch all
* 2 point polygons through XDrawLine even if they are
* non-degenerate as this may invoke less processing
* down the line than a Poly primitive anyway.
*/
! XDrawLine(awt_display, xsdo->drawable, (GC) xgc,
points[0].x, points[0].y,
points[1].x, points[1].y);
} else {
! XDrawLines(awt_display, xsdo->drawable, (GC) xgc,
points, npoints, CoordModeOrigin);
}
if (points != pTmp) {
free(points);
}
--- 474,488 ----
* specification. For simplicity we will dispatch all
* 2 point polygons through XDrawLine even if they are
* non-degenerate as this may invoke less processing
* down the line than a Poly primitive anyway.
*/
! XDrawLine(awt_display, xsdo->drawable, (GC) jlong_to_ptr(xgc),
points[0].x, points[0].y,
points[1].x, points[1].y);
} else {
! XDrawLines(awt_display, xsdo->drawable, (GC) jlong_to_ptr(xgc),
points, npoints, CoordModeOrigin);
}
if (points != pTmp) {
free(points);
}
*** 567,577 ****
Java_sun_java2d_x11_X11Renderer_XDoPath
(JNIEnv *env, jobject self, jobject sg2d, jlong pXSData, jlong xgc,
jint transX, jint transY, jobject p2df, jboolean isFill)
{
#ifndef HEADLESS
! X11SDOps *xsdo = (X11SDOps *) pXSData;
jarray typesArray;
jobject pointArray;
jarray coordsArray;
jint numTypes;
jint fillRule;
--- 567,577 ----
Java_sun_java2d_x11_X11Renderer_XDoPath
(JNIEnv *env, jobject self, jobject sg2d, jlong pXSData, jlong xgc,
jint transX, jint transY, jobject p2df, jboolean isFill)
{
#ifndef HEADLESS
! X11SDOps *xsdo = (X11SDOps *) jlong_to_ptr(pXSData);
jarray typesArray;
jobject pointArray;
jarray coordsArray;
jint numTypes;
jint fillRule;
*** 607,617 ****
if ((*env)->GetArrayLength(env, typesArray) < numTypes) {
JNU_ThrowArrayIndexOutOfBoundsException(env, "types array");
return;
}
! XDHD_INIT(&dHData, (GC)xgc, xsdo->drawable);
drawHandler.pData = &dHData;
stroke = (((*env)->GetIntField(env, sg2d, sg2dStrokeHintID) ==
sunHints_INTVAL_STROKE_PURE)
? PH_STROKE_PURE
--- 607,617 ----
if ((*env)->GetArrayLength(env, typesArray) < numTypes) {
JNU_ThrowArrayIndexOutOfBoundsException(env, "types array");
return;
}
! XDHD_INIT(&dHData, (GC) jlong_to_ptr(xgc), xsdo->drawable);
drawHandler.pData = &dHData;
stroke = (((*env)->GetIntField(env, sg2d, sg2dStrokeHintID) ==
sunHints_INTVAL_STROKE_PURE)
? PH_STROKE_PURE
*** 664,680 ****
(JNIEnv *env, jobject xr,
jlong pXSData, jlong xgc,
jint x, jint y, jint w, jint h)
{
#ifndef HEADLESS
! X11SDOps *xsdo = (X11SDOps *) pXSData;
if (xsdo == NULL) {
return;
}
! XFillRectangle(awt_display, xsdo->drawable, (GC) xgc,
CLAMP_TO_SHORT(x), CLAMP_TO_SHORT(y),
CLAMP_TO_USHORT(w), CLAMP_TO_USHORT(h));
X11SD_DirectRenderNotify(env, xsdo);
#endif /* !HEADLESS */
}
--- 664,680 ----
(JNIEnv *env, jobject xr,
jlong pXSData, jlong xgc,
jint x, jint y, jint w, jint h)
{
#ifndef HEADLESS
! X11SDOps *xsdo = (X11SDOps *) jlong_to_ptr(pXSData);
if (xsdo == NULL) {
return;
}
! XFillRectangle(awt_display, xsdo->drawable, (GC) jlong_to_ptr(xgc),
CLAMP_TO_SHORT(x), CLAMP_TO_SHORT(y),
CLAMP_TO_USHORT(w), CLAMP_TO_USHORT(h));
X11SD_DirectRenderNotify(env, xsdo);
#endif /* !HEADLESS */
}
*** 691,701 ****
jint arcW, jint arcH)
{
#ifndef HEADLESS
long ty1, ty2, tx1, tx2, cx, cy, cxw, cyh,
halfW, halfH, leftW, rightW, topH, bottomH;
! X11SDOps *xsdo = (X11SDOps *) pXSData;
if (xsdo == NULL || w <= 0 || h <= 0) {
return;
}
--- 691,701 ----
jint arcW, jint arcH)
{
#ifndef HEADLESS
long ty1, ty2, tx1, tx2, cx, cy, cxw, cyh,
halfW, halfH, leftW, rightW, topH, bottomH;
! X11SDOps *xsdo = (X11SDOps *) jlong_to_ptr(pXSData);
if (xsdo == NULL || w <= 0 || h <= 0) {
return;
}
*** 736,770 ****
leftW = (tx1 - cx) * 2;
rightW = (cxw - tx2) * 2;
topH = (ty1 - cy) * 2;
bottomH = (cyh - ty2) * 2;
! awt_drawArc(env, xsdo->drawable, (GC) xgc,
cx, cy, leftW, topH,
90, 90, JNI_TRUE);
! awt_drawArc(env, xsdo->drawable, (GC) xgc,
cxw - rightW, cy, rightW, topH,
0, 90, JNI_TRUE);
! awt_drawArc(env, xsdo->drawable, (GC) xgc,
cx, cyh - bottomH, leftW, bottomH,
180, 90, JNI_TRUE);
! awt_drawArc(env, xsdo->drawable, (GC) xgc,
cxw - rightW, cyh - bottomH, rightW, bottomH,
270, 90, JNI_TRUE);
if (tx1 < tx2) {
if (cy < ty1) {
! XFillRectangle(awt_display, xsdo->drawable, (GC) xgc,
tx1, cy, tx2 - tx1, ty1 - cy);
}
if (ty2 < cyh) {
! XFillRectangle(awt_display, xsdo->drawable, (GC) xgc,
tx1, ty2, tx2 - tx1, cyh - ty2);
}
}
if (ty1 < ty2) {
! XFillRectangle(awt_display, xsdo->drawable, (GC) xgc,
cx, ty1, cxw - cx, ty2 - ty1);
}
X11SD_DirectRenderNotify(env, xsdo);
#endif /* !HEADLESS */
}
--- 736,770 ----
leftW = (tx1 - cx) * 2;
rightW = (cxw - tx2) * 2;
topH = (ty1 - cy) * 2;
bottomH = (cyh - ty2) * 2;
! awt_drawArc(env, xsdo->drawable, (GC) jlong_to_ptr(xgc),
cx, cy, leftW, topH,
90, 90, JNI_TRUE);
! awt_drawArc(env, xsdo->drawable, (GC) jlong_to_ptr(xgc),
cxw - rightW, cy, rightW, topH,
0, 90, JNI_TRUE);
! awt_drawArc(env, xsdo->drawable, (GC) jlong_to_ptr(xgc),
cx, cyh - bottomH, leftW, bottomH,
180, 90, JNI_TRUE);
! awt_drawArc(env, xsdo->drawable, (GC) jlong_to_ptr(xgc),
cxw - rightW, cyh - bottomH, rightW, bottomH,
270, 90, JNI_TRUE);
if (tx1 < tx2) {
if (cy < ty1) {
! XFillRectangle(awt_display, xsdo->drawable, (GC) jlong_to_ptr(xgc),
tx1, cy, tx2 - tx1, ty1 - cy);
}
if (ty2 < cyh) {
! XFillRectangle(awt_display, xsdo->drawable, (GC) jlong_to_ptr(xgc),
tx1, ty2, tx2 - tx1, cyh - ty2);
}
}
if (ty1 < ty2) {
! XFillRectangle(awt_display, xsdo->drawable, (GC) jlong_to_ptr(xgc),
cx, ty1, cxw - cx, ty2 - ty1);
}
X11SD_DirectRenderNotify(env, xsdo);
#endif /* !HEADLESS */
}
*** 778,788 ****
(JNIEnv *env, jobject xr,
jlong pXSData, jlong xgc,
jint x, jint y, jint w, jint h)
{
#ifndef HEADLESS
! X11SDOps *xsdo = (X11SDOps *) pXSData;
if (xsdo == NULL) {
return;
}
--- 778,788 ----
(JNIEnv *env, jobject xr,
jlong pXSData, jlong xgc,
jint x, jint y, jint w, jint h)
{
#ifndef HEADLESS
! X11SDOps *xsdo = (X11SDOps *) jlong_to_ptr(pXSData);
if (xsdo == NULL) {
return;
}
*** 818,831 ****
y += (h-adjh)/2;
h = adjh;
}
#undef SQRT_3_4
if (w > 0 && h > 0) {
! XFillRectangle(awt_display, xsdo->drawable, (GC) xgc, x, y, w, h);
}
} else {
! awt_drawArc(env, xsdo->drawable, (GC) xgc,
x, y, w, h, 0, 360, JNI_TRUE);
}
X11SD_DirectRenderNotify(env, xsdo);
#endif /* !HEADLESS */
}
--- 818,831 ----
y += (h-adjh)/2;
h = adjh;
}
#undef SQRT_3_4
if (w > 0 && h > 0) {
! XFillRectangle(awt_display, xsdo->drawable, (GC) jlong_to_ptr(xgc), x, y, w, h);
}
} else {
! awt_drawArc(env, xsdo->drawable, (GC) jlong_to_ptr(xgc),
x, y, w, h, 0, 360, JNI_TRUE);
}
X11SD_DirectRenderNotify(env, xsdo);
#endif /* !HEADLESS */
}
*** 840,856 ****
jlong pXSData, jlong xgc,
jint x, jint y, jint w, jint h,
jint angleStart, jint angleExtent)
{
#ifndef HEADLESS
! X11SDOps *xsdo = (X11SDOps *) pXSData;
if (xsdo == NULL) {
return;
}
! awt_drawArc(env, xsdo->drawable, (GC) xgc,
x, y, w, h, angleStart, angleExtent, JNI_TRUE);
X11SD_DirectRenderNotify(env, xsdo);
#endif /* !HEADLESS */
}
--- 840,856 ----
jlong pXSData, jlong xgc,
jint x, jint y, jint w, jint h,
jint angleStart, jint angleExtent)
{
#ifndef HEADLESS
! X11SDOps *xsdo = (X11SDOps *) jlong_to_ptr(pXSData);
if (xsdo == NULL) {
return;
}
! awt_drawArc(env, xsdo->drawable, (GC) jlong_to_ptr(xgc),
x, y, w, h, angleStart, angleExtent, JNI_TRUE);
X11SD_DirectRenderNotify(env, xsdo);
#endif /* !HEADLESS */
}
*** 865,875 ****
jint transx, jint transy,
jintArray xcoordsArray, jintArray ycoordsArray, jint npoints)
{
#ifndef HEADLESS
XPoint pTmp[POLYTEMPSIZE], *points;
! X11SDOps *xsdo = (X11SDOps *) pXSData;
if (xsdo == NULL) {
return;
}
--- 865,875 ----
jint transx, jint transy,
jintArray xcoordsArray, jintArray ycoordsArray, jint npoints)
{
#ifndef HEADLESS
XPoint pTmp[POLYTEMPSIZE], *points;
! X11SDOps *xsdo = (X11SDOps *) jlong_to_ptr(pXSData);
if (xsdo == NULL) {
return;
}
*** 890,900 ****
points = transformPoints(env, xcoordsArray, ycoordsArray, transx, transy,
pTmp, (int *)&npoints, JNI_FALSE);
if (points != 0) {
if (npoints > 2) {
! XFillPolygon(awt_display, xsdo->drawable, (GC) xgc,
points, npoints, Complex, CoordModeOrigin);
X11SD_DirectRenderNotify(env, xsdo);
}
if (points != pTmp) {
free(points);
--- 890,900 ----
points = transformPoints(env, xcoordsArray, ycoordsArray, transx, transy,
pTmp, (int *)&npoints, JNI_FALSE);
if (points != 0) {
if (npoints > 2) {
! XFillPolygon(awt_display, xsdo->drawable, (GC) jlong_to_ptr(xgc),
points, npoints, Complex, CoordModeOrigin);
X11SD_DirectRenderNotify(env, xsdo);
}
if (points != pTmp) {
free(points);
*** 917,927 ****
#ifndef HEADLESS
SpanIteratorFuncs *pFuncs = (SpanIteratorFuncs *) jlong_to_ptr(pIterator);
void *srData;
jint x, y, w, h;
jint spanbox[4];
! X11SDOps *xsdo = (X11SDOps *) pXSData;
if (xsdo == NULL) {
return;
}
--- 917,927 ----
#ifndef HEADLESS
SpanIteratorFuncs *pFuncs = (SpanIteratorFuncs *) jlong_to_ptr(pIterator);
void *srData;
jint x, y, w, h;
jint spanbox[4];
! X11SDOps *xsdo = (X11SDOps *) jlong_to_ptr(pXSData);
if (xsdo == NULL) {
return;
}
*** 938,948 ****
while ((*pFuncs->nextSpan)(srData, spanbox)) {
x = spanbox[0] + transx;
y = spanbox[1] + transy;
w = spanbox[2] - spanbox[0];
h = spanbox[3] - spanbox[1];
! XFillRectangle(awt_display, xsdo->drawable, (GC) xgc,
CLAMP_TO_SHORT(x), CLAMP_TO_SHORT(y),
CLAMP_TO_USHORT(w), CLAMP_TO_USHORT(h));
}
(*pFuncs->close)(env, srData);
X11SD_DirectRenderNotify(env, xsdo);
--- 938,948 ----
while ((*pFuncs->nextSpan)(srData, spanbox)) {
x = spanbox[0] + transx;
y = spanbox[1] + transy;
w = spanbox[2] - spanbox[0];
h = spanbox[3] - spanbox[1];
! XFillRectangle(awt_display, xsdo->drawable, (GC) jlong_to_ptr(xgc),
CLAMP_TO_SHORT(x), CLAMP_TO_SHORT(y),
CLAMP_TO_USHORT(w), CLAMP_TO_USHORT(h));
}
(*pFuncs->close)(env, srData);
X11SD_DirectRenderNotify(env, xsdo);
*** 969,979 ****
xsdo = (X11SDOps *)jlong_to_ptr(xsd);
if (xsdo == NULL) {
return;
}
! xgc = (GC)gc;
if (xgc == NULL) {
return;
}
XCopyArea(awt_display, xsdo->drawable, xsdo->drawable, xgc,
--- 969,979 ----
xsdo = (X11SDOps *)jlong_to_ptr(xsd);
if (xsdo == NULL) {
return;
}
! xgc = (GC) jlong_to_ptr(gc);
if (xgc == NULL) {
return;
}
XCopyArea(awt_display, xsdo->drawable, xsdo->drawable, xgc,
< prev index next >