Lines Matching refs:xp
66 InitScroll(XParms xp, Parms p, int64_t reps)
69 XSetFunction(xp->d, xp->fggc, GXcopy);
70 XDrawLines(xp->d, xp->w, xp->fggc, points, NUMPOINTS, CoordModeOrigin);
71 XSetFunction(xp->d, xp->fggc, xp->func);
76 DoScroll(XParms xp, Parms p, int64_t reps)
83 if (xp->version == VERSION1_2) {
94 XCopyArea(xp->d, xp->w, xp->w, xp->fggc, x, y + delta,
117 MidScroll(XParms xp, Parms p)
119 XClearWindow(xp->d, xp->w);
120 XDrawLines(xp->d, xp->w, xp->fggc, points, NUMPOINTS, CoordModeOrigin);
124 EndScroll(XParms xp, Parms p)
191 InitCopyWin(XParms xp, Parms p, int64_t reps)
193 (void) InitScroll(xp, p, reps);
199 InitCopyPix(XParms xp, Parms p, int64_t reps)
202 (void) InitCopyWin(xp, p, reps);
205 pix = XCreatePixmap(xp->d, xp->w, WIDTH, HEIGHT, xp->vinfo.depth);
206 pixgc = XCreateGC(xp->d, pix, 0, NULL);
208 XCopyArea(xp->d, xp->w, pix, pixgc, 0, 0, WIDTH, HEIGHT, 0, 0);
209 XFreeGC(xp->d, pixgc);
214 InitImage(XParms xp, Parms p, int64_t reps, long pm)
216 (void) InitCopyWin(xp, p, reps);
219 image = XGetImage(xp->d, xp->w, 0, 0, WIDTH, HEIGHT, pm,
228 XImage *new = XCreateImage(xp->d, xp->vinfo.visual, 1, XYBitmap, 0,
255 InitGetImage(XParms xp, Parms p, int64_t reps)
257 return InitImage(xp, p, reps, xp->planemask);
261 InitPutImage(XParms xp, Parms p, int64_t reps)
263 if(!InitImage(xp, p, reps, 0xffffffff))return False;
264 XClearWindow(xp->d, xp->w);
269 CopyArea(XParms xp, Parms p, int64_t reps, Drawable src, Drawable dst)
276 XCopyArea(xp->d, src, dst, xp->fggc,
278 XCopyArea(xp->d, src, dst, xp->fggc,
280 XCopyArea(xp->d, src, dst, xp->fggc,
282 XCopyArea(xp->d, src, dst, xp->fggc,
289 DoCopyWinWin(XParms xp, Parms p, int64_t reps)
291 CopyArea(xp, p, reps, xp->w, xp->w);
295 DoCopyPixWin(XParms xp, Parms p, int64_t reps)
297 CopyArea(xp, p, reps, pix, xp->w);
301 DoCopyWinPix(XParms xp, Parms p, int64_t reps)
303 CopyArea(xp, p, reps, xp->w, pix);
304 xp->p = pix; /* HardwareSync will now sync on pixmap */
308 DoCopyPixPix(XParms xp, Parms p, int64_t reps)
310 CopyArea(xp, p, reps, pix, pix);
311 xp->p = pix; /* HardwareSync will now sync on pixmap */
315 DoGetImage(XParms xp, Parms p, int64_t reps)
325 image = XGetImage(xp->d, xp->w, sa->x1, sa->y1, size, size,
326 xp->planemask, format);
328 image = XGetImage(xp->d, xp->w, sa->x2, sa->y2, size, size,
329 xp->planemask, format);
331 image = XGetImage(xp->d, xp->w, sb->x2, sb->y2, size, size,
332 xp->planemask, format);
334 image = XGetImage(xp->d, xp->w, sb->x1, sb->y1, size, size,
335 xp->planemask, format);
342 (void) XGetSubImage(xp->d, xp->w, sa->x1, sa->y1, size, size,
343 xp->planemask, ZPixmap, image, sa->x2, sa->y2);
344 (void) XGetSubImage(xp->d, xp->w, sa->x2, sa->y2, size, size,
345 xp->planemask, ZPixmap, image, sa->x1, sa->y1);
346 (void) XGetSubImage(xp->d, xp->w, sb->x2, sb->y2, size, size,
347 xp->planemask, ZPixmap, image, sb->x2, sb->y2);
348 (void) XGetSubImage(xp->d, xp->w, sb->x1, sb->y1, size, size,
349 xp->planemask, ZPixmap, image, sb->x2, sb->y2);
356 DoPutImage(XParms xp, Parms p, int64_t reps)
363 XPutImage(xp->d, xp->w, xp->fggc, image,
365 XPutImage(xp->d, xp->w, xp->fggc, image,
367 XPutImage(xp->d, xp->w, xp->fggc, image,
369 XPutImage(xp->d, xp->w, xp->fggc, image,
405 InitShmImage(XParms xp, Parms p, int64_t reps, Bool read_only)
409 if(!InitImage(xp, p, reps, 0xffffffff))return False;
410 if (!XShmQueryExtension(xp->d)) {
425 if(p->font && strcmp(p->font, "XYBitmap") != 0) image_size *= xp->vinfo.depth;
458 XSync(xp->d,True);
461 XShmAttach (xp->d, &shm_info);
462 XSync(xp->d,True); /* wait for error or ok */
487 InitShmPutImage(XParms xp, Parms p, int64_t reps)
489 if (!InitShmImage(xp, p, reps, True)) return False;
490 XClearWindow(xp->d, xp->w);
495 InitShmGetImage(XParms xp, Parms p, int64_t reps)
497 return InitShmImage(xp, p, reps, False);
501 DoShmPutImage(XParms xp, Parms p, int64_t reps)
508 XShmPutImage(xp->d, xp->w, xp->fggc, &shm_image,
510 XShmPutImage(xp->d, xp->w, xp->fggc, &shm_image,
512 XShmPutImage(xp->d, xp->w, xp->fggc, &shm_image,
514 XShmPutImage(xp->d, xp->w, xp->fggc, &shm_image,
521 DoShmGetImage(XParms xp, Parms p, int64_t reps)
533 XShmGetImage(xp->d, xp->w, &shm_image, sa->x1, sa->y1, xp->planemask);
534 XShmGetImage(xp->d, xp->w, &shm_image, sa->x2, sa->y2, xp->planemask);
535 XShmGetImage(xp->d, xp->w, &shm_image, sb->x2, sb->y2, xp->planemask);
536 XShmGetImage(xp->d, xp->w, &shm_image, sb->x1, sb->y1, xp->planemask);
542 EndShmImage(XParms xp, Parms p)
544 EndGetImage (xp, p);
545 XShmDetach (xp->d, &shm_info);
546 XSync(xp->d, False); /* need server to detach so can remove id */
554 EndShmGetImage(XParms xp, Parms p)
556 EndShmImage(xp, p);
560 EndShmPutImage(XParms xp, Parms p)
562 EndShmImage(xp, p);
568 MidCopyPix(XParms xp, Parms p)
570 XClearWindow(xp->d, xp->w);
574 EndCopyWin(XParms xp, Parms p)
576 EndScroll(xp, p);
587 EndCopyPix(XParms xp, Parms p)
589 EndCopyWin(xp, p);
590 XFreePixmap(xp->d, pix);
594 xp->p = (Pixmap)0;
598 EndGetImage(XParms xp, Parms p)
600 EndCopyWin(xp, p);
605 InitCopyPlane(XParms xp, Parms p, int64_t reps)
614 pix = XCreatePixmap(xp->d, xp->w, WIDTH, HEIGHT,
615 p->font==NULL ? 1 : xp->vinfo.depth);
619 pixgc = XCreateGC(xp->d, pix,
621 XFillRectangle(xp->d, pix, pixgc, 0, 0, WIDTH, HEIGHT);
624 XChangeGC(xp->d, pixgc, GCForeground | GCBackground, &gcv);
625 XDrawLines(xp->d, pix, pixgc, points, NUMPOINTS, CoordModeOrigin);
626 XFreeGC(xp->d, pixgc);
632 DoCopyPlane(XParms xp, Parms p, int64_t reps)
639 XCopyPlane(xp->d, pix, xp->w, xp->fggc,
641 XCopyPlane(xp->d, pix, xp->w, xp->fggc,
643 XCopyPlane(xp->d, pix, xp->w, xp->fggc,
645 XCopyPlane(xp->d, pix, xp->w, xp->fggc,
656 InitCompositeWin(XParms xp, Parms p, int64_t reps)
660 (void) InitScroll (xp, p, reps);
667 format = XRenderFindVisualFormat (xp->d, xp->vinfo.visual);
668 winPict = XRenderCreatePicture (xp->d, xp->w, format, 0, NULL);
673 InitCompositePix(XParms xp, Parms p, int64_t reps)
679 (void) InitCompositeWin (xp, p, reps);
682 switch (xp->planemask) {
684 depth = xp->vinfo.depth;
685 format = XRenderFindVisualFormat (xp->d, xp->vinfo.visual);
707 format = XRenderFindStandardFormat (xp->d, xp->planemask);
709 pix = XCreatePixmap(xp->d, xp->w, WIDTH, HEIGHT, depth);
710 pixPict = XRenderCreatePicture (xp->d, pix, format, 0, NULL);
712 XRenderComposite (xp->d, PictOpClear,
716 XRenderFillRectangle (xp->d, PictOpSrc,
719 XRenderComposite (xp->d, PictOpSrc,
729 XRenderSetPictureTransform (xp->d, pixPict, &transform);
730 XRenderSetPictureFilter (xp->d, pixPict, FilterBilinear, NULL, 0);
736 EndCompositeWin (XParms xp, Parms p)
740 XRenderFreePicture (xp->d, winPict);
745 XRenderFreePicture (xp->d, pixPict);
751 CompositeArea(XParms xp, Parms p, int64_t reps, Picture src, Picture dst)
764 XRenderComposite (xp->d, xp->func,
767 XRenderComposite (xp->d, xp->func,
770 XRenderComposite (xp->d, xp->func,
773 XRenderComposite (xp->d, xp->func,
783 DoCompositeWinWin (XParms xp, Parms p, int64_t reps)
785 CompositeArea (xp, p, reps, winPict, winPict);
789 DoCompositePixWin (XParms xp, Parms p, int64_t reps)
791 CompositeArea (xp, p, reps, pixPict, winPict);