That's alot of stuff we need to get to just to try your script.... too lazy. But if I was to do it, I would put it on a Gnome2::Canvas ( or Goo::Canvas). Why? The canvas has persistence of objects, so you can put your tiff on the canvas, have easy access to canvas mouse coordinates, and can easily drop little icons on top of the tiff..... it would all be
my $image = Gnome2::Canvas::Item->new ($root,
'Gnome2::Canvas::Pixbuf',
pixbuf => $im,
x => 75.0,
y => 75.0,
width => $im->get_width,
height => $im->get_height,
anchor => 'center',
);
Just keep dropping your images on the canvas, and the canvas will remember it.
With the event box and a drawing area, it is not-persistent..... and you will need to go thru a bunch of extra work to constantly rebuild on every expose event.
See Gtk2-annotate-draggable texts on image for an example which you can easily adapt.... I add text to an image on a canvas, but all you need to do is add images in a layer.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.