Re: gdk_draw_text and offsets



>> 		gdk_draw_text (area_widget->window,
>> 			       area_widget->style->font,
>> 			       area_widget->style->text_gc[GTK_STATE_NORMAL],
>> 			       10, 10,
>> 			       label,
>> 			       label_len);
>> 
>> can anyone explain to me what set of circumstances can lead to this
>> drawing the text at some position that is *not* (10,10) in the window
>> provided ? this is happening to me on a regular basis, and i simply
>> have no idea how it can happen.
>
>Absolutely no circumstances. Are you sure you are accounting for
>the fact that y=10 is the position of the baseline, not the top
>of the text?

yes. at least 50% of the time, it draws in the right place, probably
more like 90% of the time. but under some circumstances, it draws
elsewhere. i initially wondered if clipping could cause this, but i am
fairly convinced that it cannot. the only other way i can see this
happening is if the window itself is moved for some reason, but this
seems unlikely.

--p




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