Re: ImageView

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

 



Thank you,

I hesitated at the beginning using gtk-image-view, but now, I've got to.

2010/11/3 Dov Grobgeld <dov.grobgeld@xxxxxxxxx>
I solved the same problem by writing my own image viewer widget. See:

http://giv.sourceforge.net/gtk-image-viewer/

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.

Regards,
Dov

On Wed, Nov 3, 2010 at 15:17, Emmanuel Gontcho <gontcho@xxxxxxxxx> wrote:
Hello,

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 !!!!!

gontcho.wordpress.com

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

Membre de l'April -  promouvoir et dÃfendre le logiciel libre  -
http://www.april.org

Rejoignez maintenant plus de 2 500 personnes, associations, entreprises et
collectivitÃs qui soutiennent notre action
_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list




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

gontcho.wordpress.com

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

Membre de l'April -  promouvoir et dÃfendre le logiciel libre  - http://www.april.org

Rejoignez maintenant plus de 2 500 personnes, associations, entreprises et
collectivitÃs qui soutiennent notre action


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

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux