Re: Optimization question



I highly doubt you will get 10 ms resolution using Perl... :-) The
speed at which Perl evaluates op-codes will probably limit you.

Also, I believe the Perl API is GTK 1.2. The GdkPixbuf API is
GTK 2.0 (1.3). (I think this is correct?)

mark



On Wed, Feb 06, 2002 at 09:49:53AM -0500, Daniel Carrera wrote:
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.

_______________________________________________
gtk-perl-list mailing list
gtk-perl-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-perl-list

-- 
mark mielke cc/markm ncf ca/markm nortelnetworks com __________________________
.  .  _  ._  . .   .__    .  . ._. .__ .   . . .__  | Neighbourhood Coder
|\/| |_| |_| |/    |_     |\/|  |  |_  |   |/  |_   | 
|  | | | | \ | \   |__ .  |  | .|. |__ |__ | \ |__  | Ottawa, Ontario, Canada

  One ring to rule them all, one ring to find them, one ring to bring them all
                       and in the darkness bind them...

                           http://mark.mielke.cc/




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