Re: no text output on win32



On 6/25/05, claude pomalo <claude pomalo free fr> wrote:
> > the app run without error but i have no text drawing.
> > the following function draw text. it work fine on linux.

I wonder if it needs to be so complicated (maybe I don't understand).
I draw text on a drawing area widget with:

  const char *txt = "hello world!";
  PangoLayout *layout = gtk_widget_create_pango_layout( widget, txt );
  gdk_draw_layout( widget->window, widget->style->fg_gc[my_paint_state],
    left, top + ascent, layout );
  g_object_unref( layout );

This works for me on linux and win32. Also, do you really need the
off-screen pixmap for "field"? It would be simpler to just draw in the
expose handler.

John



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