XWindows: drawing rectangle using GXinvert function fails on upper left corner

Asked by MarioDePoli

Using the following code:

/*look at upper left corner in the second rectangle using a black window*/
/*the pixel is black!!! Double inversion? */

 XSetForeground (Display,Draw_GC, XWhitePixel(Display,XDefaultScreen(Display)));

  XSetFunction(Display,Draw_GC,GXcopy);
  XDrawRectangle(Display, draw_window, Draw_GC, 100, 100, 10, 10);

  XSetFunction(Display,Draw_GC,GXinvert);
  XDrawRectangle(Display, draw_window, Draw_GC, 200, 200, 10, 10);

XFlushGC(UxDisplay,Draw_GC);

the first pixel is lost (black)!!!

Possible interpretation: double inversion!

I do not like that missing pixel expecially if point are large due to scaling.

thank for help

Mario

Question information

Language:
English Edit question
Status:
Expired
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Launchpad Janitor (janitor) said :
#1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.