Strange behaviour / Possible Bug with GC Function
- From: Colin Thomas <colin designresources co uk>
- To: gtk-app-devel-list gnome org
- Subject: Strange behaviour / Possible Bug with GC Function
- Date: Tue, 13 Mar 2001 08:52:56 +0000 (GMT)
Hi,
I am running with gtk+ 1.2.8 on a Solaris platform.
I have the requirement to draw to a window various shapes, and when
overlapping to show the overlaps.
I have a pixmap which I draw to a window.
I have located the GDK_FUNCTION associated with the graphics context,
i.e. GDK_COPY , GDK_AND GDK_OR etc etc .
The GDK_OR gives me the ability to see overlapping shapes, but I seem
to get some strange behaviour. For example when I draw a green rectangle
it always paints as BLUE ?? (When I remove the call seting GDK_OR, Green
appears agains, but I look the overlapping).
The core code looks like:
////////////////////////////////////////////////////
/*Define some variables */
GdkGC * thisGraphicsContext;
GdkRectangle update_rect;
/* get the area to paint from a widget */
GtkWidget * widget = (GtkWidget *) user_data;
update_rect.x = MainWindowVariables.xmin;
update_rect.y = MainWindowVariables.ymin;
update_rect.width = MainWindowVariables.xmax;
update_rect.height = MainWindowVariables.ymax;
/*Set the GC foregrounf colour */
gdk_gc_set_foreground( thisGraphicsContext, &guiColourGreen);
/* Set the GDK_FUNCTION of the GC */
gdk_gc_set_function (thisGraphicsContext, GDK_OR );
gdk_draw_rectangle (pixmap,
thisGraphicsContext,
TRUE,
update_rect.x, update_rect.y,
update_rect.width, update_rect.height);
gtk_widget_draw (widget, &update_rect);
////////////////////////////////////////////////////
Firstly can anyone see anything incorrect about the above ?
If not, what is the best way to enter a bug report. I can supply
a simply testcase showing the behaviour.
I look forward to your thoughts..
Best regards
Colin Thomas
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Colin Thomas.
| Email : colin designresources co uk
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]