Re: adding plots to a canvas?

Adrian Feiguin <[email protected]> Sat, 02 Oct 2004 13:57:40 -0700
Newsgroups gmane.comp.scigraphica.gtkextra
Message-ID <[email protected]>
Hi Al, thank you for the comments. I implemented some changes to 
gtkplotcanvas: GtkPlotChild is now an object too, meaning thet 
GtkPlotCanvasEllipse, Rectangle, Pixmap, Line, Text, and 
GtkPlotCanvasPlot are independent objects. This means that in order to 
add a plot to the canvas your need to create a  GtkPlotCanvasPlot, 
containing the actual plot. All the interactions between the user and 
the plot are now through the GtkPlotCanvasChid, which acts as a 
container for the plot, and tells the plot what to do when you click the 
mouse, and move or resize. See for instance how the Line child behaves, 
opposed to ellipse, and rectangle (click and move). It's similar (much 
more simplified) to GnomeCanvas, and you can create and customize your 
own CanvasChild objects. Take a look at the new testgtkplot to see how 
simple it is:
1) you create the plot as usual
2) yout create the child as child = gtk_plot_canvas_plot_new(my_plot);
3) you add the child to the canvas.
I hope this helps. I'll be waiting for your feedback. Saludos!,
<ADRIAN>


Al Hooton wrote:

>Adrian, 
> 
>Thanks for the changes to gtkextra, they look good!  I'm just getting back to my project, 
>and all the changes for axes now being GtkObjects make sense. 
> 
>However, I'm puzzled by a different change: it appears that adding plots to a canvas 
>has changed.  I notice that gtk_plot_canvas_add_plot() is gone? 
> 
>How do you intend plots to be added to a canvas, and then manipulated? 
> 
>Thanks! 
> 
>-Al 
> 
>
>
>
>-------------------------------------------------------
>This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
>Use IT products in your business? Tell us what you think of them. Give us
>Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
>http://productguide.itmanagersjournal.com/guidepromo.tmpl
>_______________________________________________
>Scigraphica-gtkextra mailing list
>[email protected]
>https://lists.sourceforge.net/lists/listinfo/scigraphica-gtkextra
>  
>



-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl