Re: efficient use of canvas lines
- From: Jon Trowbridge <trow ximian com>
- To: Ian Britten <britten caris com>
- Cc: gtk-list gnome org
- Subject: Re: efficient use of canvas lines
- Date: 16 Jul 2001 11:17:16 -0500
On 16 Jul 2001 12:27:51 -0300, Ian Britten wrote:
> > Even with a regular sized window, this implies hundreds of
> > GtkCanvasItems to represent the waveform.
> I don't have any suggestions about what to do, but I wouldn't mind hearing
> what some others approaches to dealing with large amounts of data are
> (Or moving the discussion somewhere more appropriate)
In brief, the solution to this sorft of problem is to define a your own
custom canvas item for a waveform (or a GIS rendering, or whatever)
This gives you the convenience of the canvas while still allowing for
good performance: it allows you to only render the part of the image
that is on-screen, and you can use stuff like gdk_draw_lines rather than
having to create a zillion line items.
The details of how to make a new canvas item are covered pretty well in
Havoc Pennington's "Gtk+/Gnome Applications Development"
(http://developer.gnome.org/doc/GGAD).
-JT
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]