Re: Color questions



In answer to my own second question, this seems to work fine to get a GC that
draws and clears appropriately.

    values.foreground.pixel =
        widget->style->fg[GTK_WIDGET_STATE(widget)].pixel ^
        widget->style->bg[GTK_WIDGET_STATE(widget)].pixel;
    (void) memset((char *) &values.background, 0, sizeof(GdkColor));
    values.function = GDK_XOR;
    xor_gc = gdk_gc_new_with_values(widget->window, &values,
                                    GDK_GC_FOREGROUND|GDK_GC_BACKGROUND|
                                    GDK_GC_FUNCTION);

What I don't know is if this behaves as expected on Windows as well.  Anyone
tried this on a Win box?




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