[CM] [Snd] Black backgrounds in GTK EPSFs?

Bill Schottstaedt bil@ccrma.Stanford.EDU
Fri, 2 Mar 2007 04:49:15 -0800


Thanks for the bug report!  You can fix your existing eps file
by commenting out the black background rectangle -- "%" comments
out a line:

% 0.00 0.00 0.00 RG 
% 0 0 706 213 RF 

I also can't see why ps_bg can't find the background color in Gtk, but
I think this kludge fixes it:

void ps_bg(axis_info *ap, axis_context *ax)
{
  /* get background color, fill graph, then set foreground for axis */
#if USE_MOTIF
  ps_set_color(get_background_color(ax));
#else
#if USE_GTK
  {
    state_context *sx;
    chan_info *cp;
    sx = ss->sgx;
    cp = ap->cp;
    if (cp->cgx->selected) 
      ps_set_color(sx->selected_graph_color);
    else ps_set_color(sx->graph_color);
  }
#endif
#endif
...
}

I notice that the Gtk eps string positioning is left over from long ago --
I'll fix that later today.  Sorry about the mess -- my long term plan here is
to use Gtk's new print dialog which depends on cairo for the graphics --
I think I need to make a cairo version of the Gtk graph drawing routines (they
currently use Gdk), but maybe the gdk stuff already uses cairo -- this whole
business is in flux.