xorg: work on xorg driver

ulab-next
Jay Sorg 11 years ago
parent 03e5b5e62b
commit 9d7e58ee98

@ -95,6 +95,10 @@ rdpPolyRectangle(DrawablePtr pDrawable, GCPtr pGC, int nrects,
int down; int down;
int lw; int lw;
int cd; int cd;
int x1;
int y1;
int x2;
int y2;
RegionRec clip_reg; RegionRec clip_reg;
RegionRec reg; RegionRec reg;
@ -113,28 +117,37 @@ rdpPolyRectangle(DrawablePtr pDrawable, GCPtr pGC, int nrects,
while (index < nrects) while (index < nrects)
{ {
box.x1 = (rects[index].x + pDrawable->x) - up; x1 = rects[index].x + pDrawable->x;
box.y1 = (rects[index].y + pDrawable->y) - up; y1 = rects[index].y + pDrawable->y;
box.x2 = box.x1 + rects[index].width + (up + down); x2 = x1 + rects[index].width;
box.y2 = box.y1 + lw; y2 = y1 + rects[index].height;
/* top */
box.x1 = x1 - up;
box.y1 = y1 - up;
box.x2 = x2 + down;
box.y2 = y1 + down;
rdpRegionUnionRect(&reg, &box); rdpRegionUnionRect(&reg, &box);
box.x1 = (rects[index].x + pDrawable->x) - up; /* left */
box.y1 = (rects[index].y + pDrawable->y) + down; box.x1 = x1 - up;
box.x2 = box.x1 + lw; box.y1 = y1 - up;
box.y2 = box.y1 + rects[index].height - (up + down); box.x2 = x1 + down;
box.y2 = y2 + down;
rdpRegionUnionRect(&reg, &box); rdpRegionUnionRect(&reg, &box);
box.x1 = ((rects[index].x + rects[index].width) + pDrawable->x) - up; /* right */
box.y1 = (rects[index].y + pDrawable->y) + down; box.x1 = x2 - up;
box.x2 = box.x1 + lw; box.y1 = y1 - up;
box.y2 = box.y1 + rects[index].height - (up + down); box.x2 = x2 + down;
box.y2 = y2 + down;
rdpRegionUnionRect(&reg, &box); rdpRegionUnionRect(&reg, &box);
box.x1 = (rects[index].x + pDrawable->x) - up; /* bottom */
box.y1 = ((rects[index].y + rects[index].height) + pDrawable->y) - up; box.x1 = x1 - up;
box.x2 = box.x1 + rects[index].width + (up + down); box.y1 = y2 - up;
box.y2 = box.y1 + lw; box.x2 = x2 + down;
box.y2 = y2 + down;
rdpRegionUnionRect(&reg, &box); rdpRegionUnionRect(&reg, &box);
index++; index++;

Loading…
Cancel
Save