odd behavior
- From: Mathew Yeates <mathew yeates tv>
- To: gtk-i18n-list gnome org
- Subject: odd behavior
- Date: Fri, 17 Dec 2004 00:18:49 -0800
Okay, I reinstalled cygwin, got pango 1.6 and ... still aint working
here is my expose routine for my widget
static GdkPixmap *pixmap = NULL; /* set in my configure routine */
static gboolean
da_expose_event(GtkWidget * widget, GdkEventExpose * event, gpointer data)
{
PangoContext *pc;
PangoLayout *pl;
PangoFontDescription *desc;
GdkGC *gc;
GtkStyle *style;
style = gtk_widget_get_style(widget);
gc = style->black_gc;
pc = gtk_widget_create_pango_context(widget);
pl = gtk_widget_create_pango_layout(widget, "TITLE");
desc = pango_font_description_from_string("Sans 42");
/* bizarre, the folllowing line does NOTHING */
pango_context_set_font_description(pc, desc);
/* but if I change it so I pass in the layout */
/* pango_context_set_font_description(pl, desc); */
/* then I get a compiler warning, but the font changes size!! */
gdk_draw_layout(pixmap, gc, 0, 0, pl);
gdk_draw_drawable(widget->window,
widget->style->fg_gc[GTK_WIDGET_STATE(widget)],
pixmap,
/* Only copy the area that was exposed. */
event->area.x, event->area.y,
event->area.x, event->area.y,
event->area.width, event->area.height);
return FALSE;
}
Mathew
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]