Lines Matching refs:ximage
73 unsigned int height, XImage **image_return));
86 XImage *image, Pixel *image_pixels,
87 XImage *mask, Pixel *mask_pixels));
89 /* XImage pixel routines */
90 LFUNC(PutImagePixels, void, (XImage *image, unsigned int width,
94 LFUNC(PutImagePixels32, void, (XImage *image, unsigned int width,
98 LFUNC(PutImagePixels16, void, (XImage *image, unsigned int width,
102 LFUNC(PutImagePixels8, void, (XImage *image, unsigned int width,
106 LFUNC(PutImagePixels1, void, (XImage *image, unsigned int width,
110 LFUNC(PutPixel1, int, (XImage *ximage, int x, int y, unsigned long pixel));
111 LFUNC(PutPixel, int, (XImage *ximage, int x, int y, unsigned long pixel));
113 LFUNC(PutPixel32, int, (XImage *ximage, int x, int y, unsigned long pixel));
115 LFUNC(PutPixel32MSB, int, (XImage *ximage, int x, int y, unsigned long pixel));
116 LFUNC(PutPixel32LSB, int, (XImage *ximage, int x, int y, unsigned long pixel));
117 LFUNC(PutPixel16MSB, int, (XImage *ximage, int x, int y, unsigned long pixel));
118 LFUNC(PutPixel16LSB, int, (XImage *ximage, int x, int y, unsigned long pixel));
119 LFUNC(PutPixel8, int, (XImage *ximage, int x, int y, unsigned long pixel));
120 LFUNC(PutPixel1MSB, int, (XImage *ximage, int x, int y, unsigned long pixel));
121 LFUNC(PutPixel1LSB, int, (XImage *ximage, int x, int y, unsigned long pixel));
670 XImage **image_return,
671 XImage **shapeimage_return,
682 XImage *ximage = NULL;
683 XImage *shapeimage = NULL;
763 /* create the ximage */
767 image->width, image->height, &ximage);
772 * set the ximage data using optimized functions for ZPixmap
775 if (ximage->bits_per_pixel == 8)
776 PutImagePixels8(ximage, image->width, image->height,
778 else if (((ximage->bits_per_pixel | ximage->depth) == 1) &&
779 (ximage->byte_order == ximage->bitmap_bit_order))
780 PutImagePixels1(ximage, image->width, image->height,
782 else if (ximage->bits_per_pixel == 16)
783 PutImagePixels16(ximage, image->width, image->height,
785 else if (ximage->bits_per_pixel == 32)
786 PutImagePixels32(ximage, image->width, image->height,
789 PutImagePixels(ximage, image->width, image->height,
826 *image_return = ximage;
834 if (ximage)
835 XDestroyImage(ximage);
854 * Create an XImage with its data
864 XImage **image_return)
876 /* then create the XImage with data = NULL and bytes_per_line = 0 */
974 register XImage *img)
1004 register XImage *img)
1096 XImage *image,
1183 XImage *image,
1293 XImage *image,
1374 XImage *image,
1421 XImage *image,
1542 XImage *ximage = NULL, *shapeimage = NULL;
1553 (pixmap_return ? &ximage : NULL),
1561 if (pixmap_return && ximage) {
1563 xpmCreatePixmapFromImage(display, d, ximage, pixmap_return);
1573 if (ximage != NULL)
1574 XDestroyImage(ximage);
1592 register XImage *ximage,
1608 src = &ximage->data[XYINDEX(x, y, ximage)];
1611 nbytes = ximage->bitmap_unit >> 3;
1613 XYNORMALIZE(&px, ximage);
1614 i = ((x + ximage->xoffset) % ximage->bitmap_unit);
1616 XYNORMALIZE(&px, ximage);
1618 dst = &ximage->data[XYINDEX(x, y, ximage)];
1627 register XImage *ximage,
1641 ibpp = ximage->bits_per_pixel;
1642 if (ximage->depth == 4)
1646 src = &ximage->data[ZINDEX(x, y, ximage)];
1652 ZNORMALIZE(&px, ximage);
1654 ZNORMALIZE(&px, ximage);
1656 dst = &ximage->data[ZINDEX(x, y, ximage)];
1666 register XImage *ximage,
1676 addr = &((unsigned char *)ximage->data) [ZINDEX32(x, y, ximage)];
1684 register XImage *ximage,
1694 addr = &((unsigned char *)ximage->data) [ZINDEX32(x, y, ximage)];
1704 register XImage *ximage,
1714 addr = &((unsigned char *)ximage->data) [ZINDEX32(x, y, ximage)];
1724 register XImage *ximage,
1734 addr = &((unsigned char *)ximage->data) [ZINDEX16(x, y, ximage)];
1742 register XImage *ximage,
1752 addr = &((unsigned char *)ximage->data) [ZINDEX16(x, y, ximage)];
1760 register XImage *ximage,
1768 ximage->data[ZINDEX8(x, y, ximage)] = pixel;
1774 register XImage *ximage,
1783 ximage->data[ZINDEX1(x, y, ximage)] |= 0x80 >> (x & 7);
1785 ximage->data[ZINDEX1(x, y, ximage)] &= ~(0x80 >> (x & 7));
1791 register XImage *ximage,
1800 ximage->data[ZINDEX1(x, y, ximage)] |= 1 << (x & 7);
1802 ximage->data[ZINDEX1(x, y, ximage)] &= ~(1 << (x & 7));
1808 * This function parses an Xpm file or data and directly create an XImage
1814 XImage **image_return,
1815 XImage **shapeimage_return,
1828 XImage *ximage = NULL;
1829 XImage *shapeimage = NULL;
1964 /* now create the ximage */
1968 width, height, &ximage);
1974 * set the XImage pointer function, to be used with XPutPixel,
1978 if (ximage->bits_per_pixel == 8)
1979 ximage->f.put_pixel = PutPixel8;
1980 else if (((ximage->bits_per_pixel | ximage->depth) == 1) &&
1981 (ximage->byte_order == ximage->bitmap_bit_order))
1982 if (ximage->bitmap_bit_order == MSBFirst)
1983 ximage->f.put_pixel = PutPixel1MSB;
1985 ximage->f.put_pixel = PutPixel1LSB;
1986 else if (ximage->bits_per_pixel == 16)
1987 if (ximage->bitmap_bit_order == MSBFirst)
1988 ximage->f.put_pixel = PutPixel16MSB;
1990 ximage->f.put_pixel = PutPixel16LSB;
1991 else if (ximage->bits_per_pixel == 32)
1993 if (*((char *)&byteorderpixel) == ximage->byte_order)
1994 ximage->f.put_pixel = PutPixel32;
1997 if (ximage->bitmap_bit_order == MSBFirst)
1998 ximage->f.put_pixel = PutPixel32MSB;
2000 ximage->f.put_pixel = PutPixel32LSB;
2001 else if ((ximage->bits_per_pixel | ximage->depth) == 1)
2002 ximage->f.put_pixel = PutPixel1;
2004 ximage->f.put_pixel = PutPixel;
2021 * read pixels and put them in the XImage
2025 ximage, image_pixels,
2102 *image_return = ximage;
2120 if (ximage)
2121 XDestroyImage(ximage);
2147 XImage *image,
2149 XImage *shapeimage,