Re: GimpImage to GdkPixbuf

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

 



On 3/23/07, Sven Neumann <sven@xxxxxxxx> wrote:
> What you are asking for is currently not possible. There are some ways
> to get something close though. It would help a lot if you could explain
> what exactly you want to achieve. We could then see if there are already
> ways to do that or if a new API is needed.

The first idea was that you can render all pixels of image on
GdkPixbuf once, and then it is very easy (and both fast) to display
GdkPixbuf zoomed, scrolled, etc, on GdkWindow. (Eliminate complexity
and add flexibility :)

I know that this approach wouldn't work for very large images and it
is not useful for everyone, so I thought of something more general:

gboolean
gimp_image_render_to_drawable(         GimpImage image,
                                                         GdkDrawable *drawable,
                                                         int dest_x,
                                                         int dest_y,
                                                         int dest_width,
                                                         int dest_height,
                                                         double offset_x,
                                                         double offset_y,
                                                         double scale_x,
                                                         double scale_y,
                                                         int overall_alpha,
                                                         int check_x,
                                                         int check_y,
                                                         int check_size,
                                                         guint32 color1,
                                                         guint32 color2);

(most arguments mean the same as in gdk_pixbuf_composite_color()).
This would render gimp image (whole or part) on GdkPixbuf or
GdkWindow, which should be enough to meat any rendering needs on
custom widgets.
_______________________________________________
Gimp-developer mailing list
Gimp-developer@xxxxxxxxxxxxxxxxxxxxxx
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer

[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux