Opened 17 years ago

Closed 17 years ago

#1426 closed bug (fixed)

redraw is incorrect

Reported by: axeld Owned by: stippi
Priority: high Milestone: R1
Component: Servers/app_server Version: R1/pre-alpha1
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

With Sudoku on mouse over, it would (on BeOS) redraw exactly the inner field without the frame. On Haiku, the border will flicker, too, and the right and lower borders will be overdrawn by the background color - which is never done in Sudoku itself.

I did quite some fine tuning on that part in BeOS, and it works there perfectly.

Change History (4)

comment:1 by axeld, 17 years ago

Priority: normalhigh

Having thought about it a bit, the problem is probably related to rounding errors. I don't round the values I use for drawing the lines, and also not those I send to the update region.

Apparently, the background deletion rounds the values differently than the region code - at least that would match what I see, I haven't looked at the actual code.

comment:2 by stippi, 17 years ago

Status: newassigned

The background deletion is correct. The checks that test if a certain drawing command is intersecting the current clipping region is not working correctly for drawing commands containing fractional coordinates. Otherwise this problem would not have shown visually. I have fixed one part of the problem (incompatible behavior of BView::Invalidate(BRect)), so that the parts are invalidated for fractional BRects as on BeOS. The other issue with testing the drawing commands against the current clipping on the app_server need to be corrected yet.

comment:3 by stippi, 17 years ago

Small correction: The problem would have shown itself visually in terms of flickering lines. But the clipping problem is that instead, the lines and rects are not drawn at all in some conditions. I am thinking that maybe the rounding of coordinates (in case a BView is not B_SUB_PIXEL_PRECISE) should not happen in Painter, but in ViewLayer::ConvertToScreenForDrawing(). That would avoid this problem and simplify some code maybe.

comment:4 by stippi, 17 years ago

Resolution: fixed
Status: assignedclosed

Both parts of the bug are now fixed in hrev22058 and hrev22060.

Note: See TracTickets for help on using tickets.