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

2013-06-18 Thread First Last
thank you Werner, it's working fine now. So this issue was (again) from my english skill, I wasn't sure of scanline and pitch means... -Nicoo ___ xorg@lists.x.org: X.Org support Archives: http://lists.freedesktop.org/archives/xorg Info:

Re: need help with freetype + xlib.

2013-06-18 Thread First Last
Hi Glynn,   so I guess,  length of face-glyph-bitmap.buffer = 1(gray lvl)*16(width)*8(rows)=128 unsigned chars, right ? Right answer, wrong reasoning; width should be replaced by pitch. The two values may differ if there is padding between lines. thx for this. -Nicoo

need help with freetype + xlib.

2013-06-17 Thread First Last
Hi, I try to use freetype with xlib, I , I need to pass a char type array (RGBA/pixel) to a xlib function. from freetype I got :   face-glyph-bitmap.pixel_mode = 2 so if I understood corectly in face-glyph-bitmap.buffer datas are stored in gray level.   face-glyph-bitmap.rows=16  

Re: need help with freetype + xlib.

2013-06-17 Thread First Last
Hi Alan, yes I know, I opened a question on stackoverflow about xft. - Nicoo___ xorg@lists.x.org: X.Org support Archives: http://lists.freedesktop.org/archives/xorg Info: http://lists.x.org/mailman/listinfo/xorg Your subscription address:

Re: redraw, who (xlib/cairo), when...

2013-05-28 Thread First Last
Hi Glynn and other guys,     while(XPending(dpy)==0){     usleep(100);     updateClock(myClock); Ugh. This causes the process to be scheduled up to 10,000 times per second, which is almost a busy wait. I would expect this process to consume

problem with my uses of the gradient.

2013-05-26 Thread First Last
Hi cairomailing list, I got a problem, when I use this code :     s=cairo_xlib_surface_create(dpy, wndw.frame, DefaultVisual(dpy, 0), 640, 480);     c=cairo_create(s);     p=cairo_pattern_create_linear(10.10,0.10,0.0,450.0);     cairo_pattern_add_color_stop_rgba(p,0,1,0,0,1);  

Re: redraw, who (xlib/cairo), when...

2013-05-26 Thread First Last
Hi Glynn, first thanks. You should redraw the window (or at least the rectangle specified in the XExposeEvent structure) in response to an Expose event. Ideally, you should collect any pending Expose events and perform the minimum amount of work necessary to redraw the specified rectangles (i.e.

redraw, who (xlib/cairo), when...

2013-05-25 Thread First Last
Hi guys from xorgand cairomailling list, I sent this mail to both of you because I don't know who can explains to me something. I wrote a small code, it's just a window where you should see the date and the time. If you hit space the window moves, if you hit q the wm will exit(ok ok it's a

Re: how to send data to Xorg.log and XQueryPointer crash

2013-05-22 Thread First Last
Hi Peter,     XQueryPointer(dpy,rootwin,None,None,mousex,mousey,None,None,None); // problem... none of these may be NULL (or None, which is just 0 anyway). you do need to provide some valid pointers here. well, yesterday I tried with all pointers settled, X crashed. Today I try again, 

Re: Fatal IO Error: 11 (resource temporarily unavailable)

2013-05-20 Thread First Last
I still don't know why the hello world code does not working as I expect. But I write a piece of code who works as expected. I'm not sure that's well written, (if someone want to take a look). Mouse pointer is rendered, when a button is pressed or when a key is release the while loop is stoped.

Fatal IO Error: 11 (resource temporarily unavailable)

2013-05-19 Thread First Last
Hi, I got this error when I try to run all example I have of xlib : Fatal IO Error: 11 (resource temporarily unavailable) I tried some examples form the book X WINDOW APPLICATION PROGRAMMING from ERIC F. JOHNSON KEVIN REICHARD some from the web, like these one