diff options
author | Jay Sorg <jay.sorg@gmail.com> | 2014-01-25 09:29:32 -0800 |
---|---|---|
committer | Jay Sorg <jay.sorg@gmail.com> | 2014-01-25 09:29:32 -0800 |
commit | 9d7e58ee98ccdab90b1096542c325b2f8bb930f1 (patch) | |
tree | 9f6627cc633b498e553257b78bf1ef693e27cf42 | |
parent | 03e5b5e62bae5f872874869e62cc096c576fba16 (diff) | |
download | xrdp-proprietary-9d7e58ee98ccdab90b1096542c325b2f8bb930f1.tar.gz xrdp-proprietary-9d7e58ee98ccdab90b1096542c325b2f8bb930f1.zip |
xorg: work on xorg driver
-rw-r--r-- | xorg/server/module/rdpPolyRectangle.c | 45 |
1 files changed, 29 insertions, 16 deletions
diff --git a/xorg/server/module/rdpPolyRectangle.c b/xorg/server/module/rdpPolyRectangle.c index 304a8122..ca7b7903 100644 --- a/xorg/server/module/rdpPolyRectangle.c +++ b/xorg/server/module/rdpPolyRectangle.c @@ -95,6 +95,10 @@ rdpPolyRectangle(DrawablePtr pDrawable, GCPtr pGC, int nrects, int down; int lw; int cd; + int x1; + int y1; + int x2; + int y2; RegionRec clip_reg; RegionRec reg; @@ -113,28 +117,37 @@ rdpPolyRectangle(DrawablePtr pDrawable, GCPtr pGC, int nrects, while (index < nrects) { - box.x1 = (rects[index].x + pDrawable->x) - up; - box.y1 = (rects[index].y + pDrawable->y) - up; - box.x2 = box.x1 + rects[index].width + (up + down); - box.y2 = box.y1 + lw; + x1 = rects[index].x + pDrawable->x; + y1 = rects[index].y + pDrawable->y; + x2 = x1 + rects[index].width; + y2 = y1 + rects[index].height; + + /* top */ + box.x1 = x1 - up; + box.y1 = y1 - up; + box.x2 = x2 + down; + box.y2 = y1 + down; rdpRegionUnionRect(®, &box); - box.x1 = (rects[index].x + pDrawable->x) - up; - box.y1 = (rects[index].y + pDrawable->y) + down; - box.x2 = box.x1 + lw; - box.y2 = box.y1 + rects[index].height - (up + down); + /* left */ + box.x1 = x1 - up; + box.y1 = y1 - up; + box.x2 = x1 + down; + box.y2 = y2 + down; rdpRegionUnionRect(®, &box); - box.x1 = ((rects[index].x + rects[index].width) + pDrawable->x) - up; - box.y1 = (rects[index].y + pDrawable->y) + down; - box.x2 = box.x1 + lw; - box.y2 = box.y1 + rects[index].height - (up + down); + /* right */ + box.x1 = x2 - up; + box.y1 = y1 - up; + box.x2 = x2 + down; + box.y2 = y2 + down; rdpRegionUnionRect(®, &box); - box.x1 = (rects[index].x + pDrawable->x) - up; - box.y1 = ((rects[index].y + rects[index].height) + pDrawable->y) - up; - box.x2 = box.x1 + rects[index].width + (up + down); - box.y2 = box.y1 + lw; + /* bottom */ + box.x1 = x1 - up; + box.y1 = y2 - up; + box.x2 = x2 + down; + box.y2 = y2 + down; rdpRegionUnionRect(®, &box); index++; |