Re: Converting from gdkregion to xregion on gtk2?

Victor Hernandez Maksimenko <victor planetasur com> writes:

> Hi there,
> I'm just trying to get mozilla with xft compiled with the gtk2 toolkit
> (so i can have galeon2 with aa fonts), but i'm having troubles setting
> the Clip area for XftDraw... 
> it uses a code like this for setting the clipping region
> --
> GdkRegionPrivate  *priv = (GdkRegionPrivate *)rgn;
> XftDrawSetClip(draw, priv->xregion);
> --
> but in gtk/gdk 2, there is no GdkRegionPrivate, so i have tried to find
> a way to get and xlib region from a gdkregion but with no success so
> far...

void           gdk_region_get_rectangles (GdkRegion     *region,
                                          GdkRectangle **rectangles,
                                          gint          *n_rectangles);

And then construct the XRegion using XUnionRectWithRegion. If you
grab a mid 1.3.x series copy of GTK+, you'll find such code in
there, but it's probably easier just to redo it.

The coordinate space is bigger for GdkRegion than for an X Region, so
GdkRegion isn't internally implementation as a Region.


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