Hi everyone, I'm building a plugin to compare two images side-by-side with panning and zooming, and I'm having a bit of an issue with getting the zooming to work.
The way I'm doing it is initalizing a pixel region with the width being (width of preview) / (zoom factor) and soforth. /* Snip */ map_1 = gimp_drawable_get (vals.map_id_1); gimp_pixel_rgn_init (&map_1_rgn, map_1, p1_x1, p1_y1, init_width, init_height, FALSE, FALSE); gimp_pixel_rgn_resize ( &map_1_rgn , p1_x1, p1_y1, p1_width, p1_height); gimp_drawable_preview_draw_region (GIMP_DRAWABLE_PREVIEW (preview), &map_1_rgn); /'* Snap */ p1_x1, p1_y1 are the coordinates of the top left point, p1_width and p1_height are the width and height of the preview window, init_width and init_height are the smaller coordinates of the pixel region that have been divided by the zoom factor. This isn't even close to working, and after going through the API documentation several times and gdb equally, I'm sure its being called, the only problem is that it isn't doing anything, it would be the same as initializing the region with the width and height of the preview pane. Thanks, Brohan _______________________________________________ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer