Re: Clues needed

If all you want to do is display a single image frame, using a
GtkDrawingArea with gdkrgb calls is probably the best.  You can use
gdk-pixbuf to load the image frames (even if you have some other image
loading code, take a look at gdk-pixbuf, as it can help you render a
scaled image easily).

If you use a GtkDrawingArea, you will need to connect to the expose_event
signal to redraw portions of the image when it gets exposed.  To react to
size changes, connect to the size_allocate signal (this is emitted by the
parent to allocate where the child should be).



On Tue, 28 Mar 2000, spoon wrote:

> Hi
> We're trying to write a fairly simple app with gnome, and I was hoping
> someone would be kind enough to help us get started, and hopefully we
> can work the rest out from the examples and docs.
> We have some complex data we wish to visualize.  I won't describe it,
> but at the end of the day, this data can be represented as a sequence
> of images. 
> So all we want is an app that opens a data set, and allows each image
> to be displayed in sequence. There could be many of these images (~
> 300), so we really need something like a scrollbar to select which of
> the images is to be displayed.  Ideally, when the app is resized, the
> image would resize to fit.
> So the app should have a menu bar with a File menu, with Open and Exit
> items (this we can manage), then below that a horizontal scrollbar and
> below that the image.
> Questions.
> Should I look at canvases, should I use a pixmap, or should I work
> with an RGB buffer?
> When I advance to the next image, do I have to completely destroy the
> image I have or can I just overwrite it?
> Do I have to detect the resizing of the app (how is this done?) and
> then resize the image manually, or is there some automatic way of
> doing this?
> Any suggestions/code snippets most welcome.
> Simon
> -- 
> *****************************************************************
> *  Simon Wotherspoon                               _--_|\       *
> *  Maths Dept, University of Tasmania             /  Aus \      *
> *  Tasmania, Australia                            \_.--._/      *
> *                      v       *
> *****************************************************************
> -- 
> To unsubscribe: mail with "unsubscribe"
> as the Subject.

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