Re: region to bitmap conversion functions



	I've just uploaded two new patches to ftp.gtk.org,
gtk-rsteinke-001205-0.patch and gtk-rsteinke-001205-1.patch.
The first patch implements three new functions:


void gdk_draw_rectangles       (GdkDrawable  *drawable,
                                GdkGC        *gc,
                                gint          filled,
                                GdkRectangle *rectangles,
                                gint          nrectangles)

In the x11 implementation, this is a wrapper for XDrawRectangles
and XFillRectangles. In the other implementations, it simply
calls gdk_draw_rectangle multiple times.

void gdk_region_get_rectangles (GdkRegion *region,
                                GdkRectangle **rectangles,
                                gint *nrectangles)

Returns a list of nonoverlaping rectangles which cover the region.
(equivalent to the region's private data, should this be a private function?)

void gdk_draw_region           (GdkDrawable *drawable,
                                GdkGC       *gc,
                                GdkRegion   *region)

This one just calls the previous two functions.

The second patch implements two new functions:


GdkBitmap* gdk_bitmap_create_from_region (GdkRegion *region,
                                          gint       width,
                                          gint       height)
GdkRegion* gdk_region_create_from_bitmap (GdkBitmap      *bitmap,
                                          gint           *width,
                                          gint           *height)

These functions are the same as those discussed in the patch
gtk-rsteinke-001130-0.patch.

This patches replace the old patch gtk-rsteinke-001130-0.patch.

					Ron Steinke





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