summaryrefslogtreecommitdiff
path: root/atari/plot
diff options
context:
space:
mode:
authorOle Loots <ole@monochrom.net>2012-01-05 22:38:02 +0000
committerOle Loots <ole@monochrom.net>2012-01-05 22:38:02 +0000
commit097800ff4774d444a5561943850c120c1950f3a3 (patch)
treeb178ff624b8b28532efd2d9933e681924f39053d /atari/plot
parent1beb016c47d22925149dbbc227f562d63914977d (diff)
downloadnetsurf-097800ff4774d444a5561943850c120c1950f3a3.tar.gz
netsurf-097800ff4774d444a5561943850c120c1950f3a3.tar.bz2
Fix rectangle fill, only add/subtract stroke_width when the rectangle has an outline.
svn path=/trunk/netsurf/; revision=13374
Diffstat (limited to 'atari/plot')
-rwxr-xr-xatari/plot/plotter_vdi.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/atari/plot/plotter_vdi.c b/atari/plot/plotter_vdi.c
index 4bf211d47..6557c4240 100755
--- a/atari/plot/plotter_vdi.c
+++ b/atari/plot/plotter_vdi.c
@@ -641,15 +641,21 @@ static int rectangle(GEM_PLOTTER self,int x0, int y0, int x1, int y1, const plo
v_pline(self->vdi_handle, 2, (short *)&pxy );
}
}
+
if( pstyle->fill_type != PLOT_OP_TYPE_NONE ){
+
+ short stroke_width = (short)(pstyle->stroke_type != PLOT_OP_TYPE_NONE) ?
+ pstyle->stroke_width : 0;
+
vsf_rgbcolor( self->vdi_handle, pstyle->fill_colour );
vsf_perimeter( self->vdi_handle, 0);
vsf_interior( self->vdi_handle, FIS_SOLID );
- pxy[0] = CURFB(self).x + r.g_x+pstyle->stroke_width;
- pxy[1] = CURFB(self).y + r.g_y+pstyle->stroke_width;
- pxy[2] = CURFB(self).x + r.g_x + r.g_w -1 - pstyle->stroke_width ;
- pxy[3] = CURFB(self).y + r.g_y + r.g_h -1 - pstyle->stroke_width;
+
+ pxy[0] = CURFB(self).x + r.g_x + stroke_width;
+ pxy[1] = CURFB(self).y + r.g_y + stroke_width;
+ pxy[2] = CURFB(self).x + r.g_x + r.g_w -1 - stroke_width ;
+ pxy[3] = CURFB(self).y + r.g_y + r.g_h -1 - stroke_width;
vsf_style( self->vdi_handle, 1);
v_bar( self->vdi_handle, (short*)&pxy );