diff options
-rw-r--r-- | do_blt.c | 16 | ||||
-rw-r--r-- | do_tests.c | 8 |
2 files changed, 23 insertions, 1 deletions
@@ -614,8 +614,14 @@ int InitCompositeWin(XParms xp, Parms p, int reps) { XRenderPictFormat *format; + int mul = 1, div = 1; + + if (p->fillStyle) { + mul = 0x10000; + div = p->fillStyle; + } (void) InitScroll (xp, p, reps); - InitCopyLocations (xp, p, reps); + InitCopyLocations (xp, p, reps, mul, div); format = XRenderFindVisualFormat (xp->d, xp->vinfo.visual); winPict = XRenderCreatePicture (xp->d, xp->w, format, 0, NULL); return reps; @@ -660,6 +666,14 @@ InitCompositePix(XParms xp, Parms p, int reps) pix = XCreatePixmap(xp->d, xp->w, WIDTH, HEIGHT, depth); pixPict = XRenderCreatePicture (xp->d, pix, format, 0, NULL); + if (p->fillStyle) { + XTransform transform; + memset (&transform, '\0', sizeof (transform)); + transform.matrix[0][0] = 0x10000; + transform.matrix[1][1] = 0x10000; + transform.matrix[2][2] = p->fillStyle; + XRenderSetPictureTransform (xp->d, pixPict, &transform); + } XRenderComposite (xp->d, PictOpClear, winPict, None, pixPict, 0, 0, 0, 0, 0, 0, WIDTH, HEIGHT); @@ -1283,6 +1283,14 @@ Test test[] = { InitCompositePix, DoCompositePixWin, MidScroll, EndCompositeWin, VERSION1_6, COMP, 0, {4, 500}}, + {"-magpixwin500", "Scale 250x250 from pixmap to 500x500 window", NULL, + InitCompositePix, DoCompositePixWin, MidScroll, EndCompositeWin, + VERSION1_6, COMP, 0, + {4, 500, NULL, NULL, 0x20000}}, + {"-minpixwin500", "Scale 500x500 from pixmap to 250x250 window", NULL, + InitCompositePix, DoCompositePixWin, MidScroll, EndCompositeWin, + VERSION1_6, COMP, 0, + {4, 250, NULL, NULL, 0x08000}}, {"-noop", "X protocol NoOperation", NULL, NullInitProc, DoNoOp, NullProc, NullProc, V1_2FEATURE, PLANEMASK, 0, |