Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^2: Duplicate views to a single canvas using Perl TK

by Helter (Chaplain)
on May 03, 2008 at 17:20 UTC ( [id://684346]=note: print w/replies, xml ) Need Help??


in reply to Re: Duplicate views to a single canvas using Perl TK
in thread Duplicate views to a single canvas using Perl TK

Unfortunately the drawing to the canvas is a third party sort-of code that we don't want to muck too deeply with.

It seems like there isn't a real way to create 2 views of the same data, so our best bet is to just create 2 of the canvas. This will give us the most functionality, and we have some preliminary tests that say the impact on memory footprint isn't bad enough for this not to work.

Thanks for the suggestions, I'll keep them in mind for future projects working with TK.

If someone does have a way to do it I'd still love to hear about it, but for now I think we have a method that might work.

Replies are listed 'Best First'.
Re^3: Duplicate views to a single canvas using Perl TK
by qumsieh (Scribe) on May 04, 2008 at 17:57 UTC
    This is probably your best bet.

    As you noticed, having multiple canvases does not impact memory usage that much since much of the memory is shared between multiple instantiations of the same widget.

    The only other optimization I can think of is that you don't need to invoke the third party code twice. What you can probably do is invoke it once to get the object drawn on one canvas, then grab the coords of the new object (using the coords() method), and draw it on the second canvas. Probably a bit faster.

    HTH.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://684346]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (6)
As of 2024-03-28 22:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found