Re: ImageView

I solved the same problem by writing my own image viewer widget. See:

It provides the functions:

void gtk_image_viewer_canv_coord_to_img_coord        (GtkImageViewer * self,
                                        double cx,
                                        double cy,
                                        double * imgx,
                                        double * imgy);
void gtk_image_viewer_img_coord_to_canv_coord        (GtkImageViewer * self,
                                        double imgx,
                                        double imgy,
                                        double * canvx,
                                        double * canvy);

to convert between canvas (callback) and image coordinates, no matter what your zoom and scroll positions are.

That said, perhaps someone else can answer you regarding ImageView.


On Wed, Nov 3, 2010 at 15:17, Emmanuel Gontcho <gontcho gmail com> wrote:

I am using ImageView 1.6 to make some manipulation over images. The
problem is I am using the signal "button-press-event" to cacth clicks
on the imageView, but I am unable to convert mouse coordinates to
image coordinate. I am unable to retrieve the exact coordinate of the
pixel clicked. What Can I do ?

Emmanuel Mbenga Gontcho
!!!!! Gem !!!!!

N'utilisez pas Windows 7. Pour savoir pourquoi :
Don't use Windows 7. To know why :

Membre de l'April - « promouvoir et défendre le logiciel libre » -

Rejoignez maintenant plus de 2 500 personnes, associations, entreprises et
collectivités qui soutiennent notre action
gtk-list mailing list
gtk-list gnome org

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