- GdkRGBA *fg_color;
-
- gtk_style_context_get (context, state,
- "font", &font_desc, "color", &fg_color, NULL);
-
- cr = gdk_cairo_create (gtk_widget_get_window (GTK_WIDGET (view->output)));
-
- /* Set the widget's text color as the foreground color for the output driver */
- /* gdk_rgba_to_string() would be perfect, but xr's parse_color does not */
- /* understand the rgb(255,128,33) format. Therefore we do it ourself. */
- fgc = xasprintf("#%4x%4x%4x",(int)(fg_color->red*0xffff),
- (int)(fg_color->green*0xffff),(int)(fg_color->blue*0xffff));
- string_map_insert (&view->render_opts, "foreground-color", fgc);
- g_free (fgc);
- gdk_rgba_free (fg_color);