GNOME Bugzilla – Bug 346810
Weird horizontal / vertical lines
Last modified: 2007-05-01 08:50:34 UTC
Please describe the problem: The debian graphical installer shows some unnecessary horizontal / vertical lines (see [1]). Some changes were made to fix [2] and there's been a mass change of +-1 in the gdkdrawable-directfb.c module; reverting all the +-1 the preoblem disappers. [1] http://people.debian.org/~fjp/d-i/g-i_2.8.18_display-weirdness.png [2] http://bugzilla.gnome.org/show_bug.cgi?id=330824 [3] http://cvs.gnome.org/viewcvs/gtk%2B/gdk/directfb/gdkdrawable-directfb.c?r1=1.4&r2=1.2 Steps to reproduce: 1. just test an iso image based on the new libraries: http://www.webalice.it/zinosat/mini_2.8.18_cairo1.1.10.iso Actual results: Expected results: Does this happen every time? yes. Other information:
Did the changes cause or remove the problem thats what I'm not clear on. So is the later version correct or not ?
the latest version is _not_ correct. I just re-added all the +-1 and the lines disappeared, but I guess I also re-introduced http://bugzilla.gnome.org/show_bug.cgi?id=330824 PS: you've been amazingly fast with your reply :)
Okay so its a catch 22 situation. My opinion is the latest change is more correct and we need to make some further changes expand FillRect DrawRect etc with a +1 on the width and height. So the fix is not complete. If your willing to try to change the actuall calls that don't fill enough to add the +1 and test I'll apply that patch. you need to look in gdkdrawable-directfb.c and add +1 to the drawing functions. Proabably just DrawRect and FillRect will fix your problems. Now It probably is just FillRect not DrawRect pretty sure it will just be FillRect but you need to test a littlebit. To further pressure you to do the patch yourself I'll thank you now :) Thank You Mike
Try this patch Index: gdkdrawable-directfb.c =================================================================== RCS file: /cvs/gnome/gtk+/gdk/directfb/gdkdrawable-directfb.c,v retrieving revision 1.4 diff -u -r1.4 gdkdrawable-directfb.c --- gdkdrawable-directfb.c 14 Jun 2006 21:54:25 -0000 1.4 +++ gdkdrawable-directfb.c 6 Jul 2006 23:57:53 -0000 @@ -445,8 +445,8 @@ impl->surface->FillRectangle (impl->surface, region->x1, region->y1, - region->x2 - region->x1, - region->y2 - region->y1); + region->x2 - region->x1+1, + region->y2 - region->y1+1); } }
do you mean something like this (don't know the syntax for FillRectangle() so I might have placed +1 in the wrong place)? I've tried it an blue horizontal lines disappear; as for the vertical line on the top right corner it's still there. impl->surface->FillRectangle (impl->surface, region->x1, region->y1, - region->x2 - region->x1, - region->y2 - region->y1); + region->x2 - region->x1 + 1, + region->y2 - region->y1 + 1); } } if (gdk_region_point_in (clip, points->x, points->y)) { impl->surface->FillRectangle (impl->surface, - points->x, points->y, 1, 1); + points->x, points->y, 2, 2); if (points->x < region.x1) region.x1 = points->x;
Hmm you had to do the second one the FillRect 2,2) ? The other one is coming from something similar I don't know were. You can try this DrawRect has a +1 on it. /* DirectFB does not draw rectangles the X way. Using DirectFB, a filled Rectangle has the same size as a drawn one, while X draws the rectangle one pixel taller and wider. */ impl->surface->DrawRectangle (impl->surface, x, y, width + 1, height + 1); Maybe this is wrong ? I think so. If you remove these +1 then you should be able to remove the ones I just added I think. It has to do with the fact that there are two ways to draw and fill rects. I really think these +1 are wrong so you should remove these then probably remove the ones we just added. Mike
Remove the last patch and try this one Index: gdkdrawable-directfb.c =================================================================== RCS file: /cvs/gnome/gtk+/gdk/directfb/gdkdrawable-directfb.c,v retrieving revision 1.4 diff -u -r1.4 gdkdrawable-directfb.c --- gdkdrawable-directfb.c 14 Jun 2006 21:54:25 -0000 1.4 +++ gdkdrawable-directfb.c 7 Jul 2006 01:36:17 -0000 @@ -456,17 +456,17 @@ else { - DFBRegion region = { x, y, x + width+1, y + height+1 }; + DFBRegion region = { x, y, x + width, y + height }; impl->surface->SetClip (impl->surface, ®ion); /* DirectFB does not draw rectangles the X way. Using DirectFB, a filled Rectangle has the same size as a drawn one, while X draws the rectangle one pixel taller and wider. */ impl->surface->DrawRectangle (impl->surface, - x, y, width + 1, height + 1); + x, y, width , height); impl->surface->SetClip (impl->surface, NULL);
applied the last patch you suggested after reverting the changes we tried last nigh. The problem is still present: both horizontal and vertical lines appear, damn!
Okay can you isolate the widget thats showing the lines. I don't see them I thought it was a list but guess not. One of the tests that are under gtk/tests should use it and you should see the problem. I'll have to dig deeper to see whats going on. You can try real quick both patches and see if that fixes it. So expand the fill and reduce the drawRect. The problem is X11 and Directfb have different concepts of which pixels to color and I've got it wrong. Mike
let's see if we can narrow the problem down... As you can see in http://people.debian.org/~fjp/d-i/g-i_2.8.18_display-weirdness.png we have * blue horizontal lines * one vertical line in the top right part of the image. The following patch (gdk/directfb/gdkdrawable-directfb.c) fixes the problem with horizontal lines: impl->surface->FillRectangle (impl->surface, region->x1, region->y1, - region->x2 - region->x1, - region->y2 - region->y1); + region->x2 - region->x1 + 1, + region->y2 - region->y1 + 1); as for the vertical line I'm experimenting a bit; If it may halp this shows the result of one of such tests: http://www.webalice.it/zinosat/g-i_draw_image.png I did the following in gdk_directfb_draw_image() impl->surface->Blit (impl->surface, image_private->surface, &src_rect, - xdest, ydest); + xdest - 1, ydest -1); if needed, sources for the frontend are available from: http://svn.debian.org/wsvn/d-i/trunk/packages/cdebconf/src/modules/frontend/gtk/gtk.c?op=file&rev=0&sc=0 I just got my new laptop and I've got stuff here and there; I don't have latest gtk+ (and gtk-demo) anywhere; for my tests I'm just recompiling the Debian packages from scatch, which takes around 25 minutes. Hopefully I'll soon have a more confortable environment. Davide
I don't know what the lines at the top are from. We will have to dig into the drawing code to isolate the cause I'm assuming thats custom code for the top image. See if you can isolate it. The blue lines I understands there a bad fill rect in the widget. The white lines at the top not a clue. Weird.