From b445ddd6ca01d943a72888b4851da1d51d3dc2ed Mon Sep 17 00:00:00 2001 From: Ole Loots Date: Mon, 21 Feb 2011 23:23:31 +0000 Subject: Fixed drawing of dotted lines. svn path=/trunk/netsurf/; revision=11751 --- atari/plot/plotter_vdi.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'atari/plot/plotter_vdi.c') diff --git a/atari/plot/plotter_vdi.c b/atari/plot/plotter_vdi.c index ab16c7838..f4cee9559 100755 --- a/atari/plot/plotter_vdi.c +++ b/atari/plot/plotter_vdi.c @@ -31,12 +31,13 @@ /* assign vdi line style to dst ( netsurf type ) */ #define NSLT2VDI(dst, src) \ + dst = 0;\ switch( src->stroke_type ) {\ case PLOT_OP_TYPE_DOT: \ - dst = 3; \ + dst = (0xAAAA00 | 7);\ break;\ case PLOT_OP_TYPE_DASH:\ - dst = 5; \ + dst = 3; \ break;\ case PLOT_OP_TYPE_SOLID:\ case PLOT_OP_TYPE_NONE:\ @@ -534,7 +535,7 @@ static int disc(GEM_PLOTTER self,int x, int y, int radius, const plot_style_t * static int line(GEM_PLOTTER self,int x0, int y0, int x1, int y1, const plot_style_t * pstyle) { short pxy[4]; - short lt; + uint32_t lt; int sw = pstyle->stroke_width; pxy[0] = CURFB(self).x + x0; @@ -546,7 +547,10 @@ static int line(GEM_PLOTTER self,int x0, int y0, int x1, int y1, const plot_styl if( sw == 0) sw = 1; NSLT2VDI(lt, pstyle) - vsl_type( self->vdi_handle, lt ); + vsl_type( self->vdi_handle, (lt&0x0F) ); + if( (lt&0x0F) == 7 ){ + vsl_udsty(self->vdi_handle, ((lt&0xFFFF00) >> 8) ); + } vsl_width( self->vdi_handle, (short)sw ); vsl_rgbcolor( self->vdi_handle, pstyle->stroke_colour ); v_pline(self->vdi_handle, 2, (short *)&pxy ); -- cgit v1.2.3