m0n0 <ole(a)monochrom.net> wrote:
But why isn't the gradient renderer? Because the image shall be
completely outside of the clipping rectangle ( clipping is from x: 0, y:
0, x1: window_width, y1: 40) - the plot function is called with 250 as y
coord - that's not within the clipping rectangle... so the image will
never be drawn.
Ah, right, this is expected behaviour.
Consider the following css:
background: url(bg.png) bottom right;
A box generated for <div class="example"></div> will have the
image bg.png tiled over the 1000x1000 area of the box. The "bottom right"
part says that the image is explicitly placed at the bottom right, so if
the image is 3px by 3px, then the image is positioned at a position 997
from the top of the box, and 997 from the left of the box. It is tiled
such that one of the tiles is exactly at that coordinate.
If you only need to redraw the top half of the box, because the rest is
outside the viewport, then that coordinate is outside the clipping
rectangle. You still have to draw the visible area with the tiled
background, and the tiles must still be positioned to coincide with the
explicitly given tile coordinate, whether it's inside the clipping
rectangle or not.
I fixed this in the framebuffer front end. See framebuffer/framebuffer.c,
where it gets the left most tile position, and the top most tile position,
and then tiles to the extents of the clip region.
Michael Drake (tlsa) http://www.netsurf-browser.org/