GtkCurve and GtkGammaCurve



When work with GtkCurve how refresh the curve if have
a new vector of points? What method?? or how??

this is case:

void
bpfEditor_set_vector(bpfEditor *bpf, gfloat vector[])
{
  gint max;
  gint i,j;
  gint count = 0;

  gfloat vec[256];


  max = 127 + (count % 2)*128;

gtk_curve_set_range(GTK_CURVE(GTK_GAMMA_CURVE(BPF_EDITOR(bpf)->curve)->curve),0,max,0,max);

  gtk_curve_set_vector
(GTK_CURVE(GTK_GAMMA_CURVE(BPF_EDITOR(bpf)->curve)->curve),max,
vector);

 
GTK_CURVE(GTK_GAMMA_CURVE(BPF_EDITOR(bpf)->curve)->curve)->curve_type
= GTK_CURVE_TYPE_LINEAR;

}//bpfEditor_set_vector


here the bpfEditor is a widget you structure is the
follow:

struct _bpfEditor
{
  GtkVBox vbox;

  GtkWidget *windowEditor; 
  GtkWidget *windowPalette; 
  GtkWidget *rule; 
  GtkWidget *table; 
  GtkWidget *toolbar; 
  GtkWidget *curve; 
};

curve is a GtkGammaCurve

  bpf->curve = gtk_gamma_curve_new ();

but not refresh the curve when pass a new vector.

__________________________________________________
Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
http://greetings.yahoo.com



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