[ft] need help with freetype + xlib.
Werner LEMBERG
wl at gnu.org
Tue Jun 18 05:08:58 PDT 2013
> ximage = XCreateImage(display,
> DefaultVisual(display,0),
> 24,
> ZPixmap,
> 0,
> &Xdata[0],
> 8/*rows*/,
> 16/*width*/,
> 32/*RGBA*/,
> 8/*pitch??*/);
You got the last argument wrong. According to the man page of
XCreateImage, it
Specifies the number of bytes in the client image between the start
of one scanline and the start of the next.
Since you have 4 bytes per pixel, it must be (FreeType's) pitch*4
(which is 32 for your example).
Werner
More information about the xorg
mailing list