Re: Optimization question
- From: Daniel Carrera <dcarrera math toronto edu>
- To: Dov Grobgeld <dov imagic weizmann ac il>
- Cc: <gtk-perl-list gnome org>
- Subject: Re: Optimization question
- Date: Wed, 6 Feb 2002 09:49:53 -0500 (EST)
Thanks. I am not sure that I completely follow your explanation. Maybe
you can help me out.
Since you are painting numbers, the fastest would be to do a prerendering
of all the numbers and store these in GdkPixbuf's in memory.
Who do you do that? I haven't found any documentation on that. I don't
know how to do that.
Is this what you mean?:
my $number = Gtk::Gdk::ImlibImage->load_image("7.xpm")
The conversion of an altitude reading to a number to display would then
just need to use a series of gdk_pixbuf_copy_area() to draw each of the
numbers.
That looks like C to me. How would I do that with Perl (or do you think
that I should do an XS extension?).
Using any kind of external file representation like png, is just a waste
of time.
You can do the same thing with GdkImlib images, btw, that are currently
required for the canvas. You don't need to destroy your objects btw. A
simple canvas_image->set("image"->$image) repaints the image, if I'm
not mistaken.
Regards,
Dov
Thanks a lot.
One more question: Am I missing some documentation from somewhere? The
only documentation that I have found consists of a man page
(Gnome::reference) and the Gtk-Perl home page which has a tutorial and
sample code.
Is there any other source of documentation?
Thanks again,
Daniel.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]