diff options
author | Ole Loots <ole@monochrom.net> | 2012-11-22 00:10:55 +0100 |
---|---|---|
committer | Ole Loots <ole@monochrom.net> | 2012-11-22 00:10:55 +0100 |
commit | ccdab30c9a93989df986def422c1ff68d0b80a18 (patch) | |
tree | 3febf906b5ccb522c460caf411e21c937fcdabc3 /atari/plot | |
parent | 0672d5e2c9e66fc12311ad41a566e56cee30f7e3 (diff) | |
download | netsurf-ccdab30c9a93989df986def422c1ff68d0b80a18.tar.gz netsurf-ccdab30c9a93989df986def422c1ff68d0b80a18.tar.bz2 |
Completet scroll preprocessing, Hotlist fully works.
Diffstat (limited to 'atari/plot')
-rwxr-xr-x | atari/plot/plot.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/atari/plot/plot.c b/atari/plot/plot.c index ca3f2b726..9937c0bad 100755 --- a/atari/plot/plot.c +++ b/atari/plot/plot.c @@ -1816,10 +1816,18 @@ bool plot_line(int x0, int y0, int x1, int y1, uint32_t lt; int sw = pstyle->stroke_width; - pxy[0] = view.x + x0; - pxy[1] = view.y + y0; - pxy[2] = view.x + x1; - pxy[3] = view.y + y1; + if((x0 < 0 && x1 < 0) || (y0 < 0 && y1 < 0)){ + return(true); + } + + pxy[0] = view.x + MAX(0,x0); + pxy[1] = view.y + MAX(0,y0); + pxy[2] = view.x + MAX(0,x1); + pxy[3] = view.y + MAX(0,y1); + + + //printf("view: %d,%d,%d,%d\n", view.x, view.y, view.w, view.h); + //printf("line: %d,%d,%d,%d\n", x0, y0, x1, y1); plot_vdi_clip(true); if( sw == 0) @@ -1834,7 +1842,7 @@ bool plot_line(int x0, int y0, int x1, int y1, vsl_rgbcolor(atari_plot_vdi_handle, pstyle->stroke_colour); v_pline(atari_plot_vdi_handle, 2, (short *)&pxy ); plot_vdi_clip(false); - return ( true ); + return (true); } static bool plot_polygon(const int *p, unsigned int n, |