Re: Need XOR drawing help

----- Original Message ----- 
From: Timothy M. Shead <tshead k-3d com>
To: Steven I Usdansky <usdanskys rocketmail com>
Cc: <gtk-app-devel-list gnome org>
Sent: Tuesday, April 17, 2001 10:35 AM
Subject: Re: Need XOR drawing help

Steven I Usdansky wrote:

I'm looking to draw a small (7x7) plus sign on the screen in XOR mode
at a specific point.  The plus sign will be erased and redrawn at
different positions several times.  Looking over the Gdk API
documentation, I believe it's possible, but I have no idea how to go
about doing it.  Can anyone point me to a code snippet that might
help?  Thanks.


GdkColor color; = gushort(m_EditorSelectorColor[0] * 0xffff); = gushort(m_EditorSelectorColor[1] * 0xffff); = gushort(m_EditorSelectorColor[2] * 0xffff);
gdk_color_alloc(gdk_colormap_get_system(), &color);

// Create an XOR gc for drawing ...
GdkGC* gc = gdk_gc_new(Widget->window);
gdk_gc_set_foreground(gc, &color);
gdk_gc_set_function(gc, GDK_XOR);

Timothy M. Shead
tshead k-3d com


It worked well.  Thank you very much.


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