freetype
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft] need help with freetype + xlib.


From: Werner LEMBERG
Subject: Re: [ft] need help with freetype + xlib.
Date: Tue, 18 Jun 2013 14:08:58 +0200 (CEST)

>   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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]