diff options
author | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2015-02-02 18:10:43 +0000 |
---|---|---|
committer | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2015-02-02 18:10:43 +0000 |
commit | 7d41e04b61162d3cb1f0032100d29ef7897b2d83 (patch) | |
tree | 5587b322d516c96049105e923be95fbfa9a663e3 /amiga/plotters.c | |
parent | 54a966f6ff1b2d09d3db94560b67a2343e8684e1 (diff) | |
download | netsurf-7d41e04b61162d3cb1f0032100d29ef7897b2d83.tar.gz netsurf-7d41e04b61162d3cb1f0032100d29ef7897b2d83.tar.bz2 |
We don't need to use P96 for RectFill
Diffstat (limited to 'amiga/plotters.c')
-rw-r--r--[-rwxr-xr-x] | amiga/plotters.c | 46 |
1 files changed, 28 insertions, 18 deletions
diff --git a/amiga/plotters.c b/amiga/plotters.c index 88021ee29..81bee058a 100755..100644 --- a/amiga/plotters.c +++ b/amiga/plotters.c @@ -89,20 +89,6 @@ bool palette_mapped = false; /* Define the below to get additional debug */ #undef AMI_PLOTTER_DEBUG -struct plotter_table plot; -const struct plotter_table amiplot = { - .rectangle = ami_rectangle, - .line = ami_line, - .polygon = ami_polygon, - .clip = ami_clip, - .text = ami_text, - .disc = ami_disc, - .arc = ami_arc, - .bitmap = ami_bitmap_tile, - .path = ami_path, - .option_knockout = true, -}; - void ami_init_layers(struct gui_globals *gg, ULONG width, ULONG height) { /* init shared bitmaps * @@ -243,13 +229,14 @@ void ami_plot_release_pens(struct MinList *shared_pens) static void ami_plot_setapen(ULONG colr) { - if(palette_mapped == false) { #ifdef __amigaos4__ + if(palette_mapped == false) { SetRPAttrs(glob->rp, RPTAG_APenColor, ns_color_to_nscss(colr), TAG_DONE); + } else #endif - } else { + { LONG pen = ami_plot_obtain_pen(glob->shared_pens, colr); if(pen != -1) SetAPen(glob->rp, pen); } @@ -257,18 +244,27 @@ static void ami_plot_setapen(ULONG colr) static void ami_plot_setopen(ULONG colr) { - if(palette_mapped == false) { #ifdef __amigaos4__ + if(palette_mapped == false) { SetRPAttrs(glob->rp, RPTAG_OPenColor, ns_color_to_nscss(colr), TAG_DONE); + } else #endif - } else { + { LONG pen = ami_plot_obtain_pen(glob->shared_pens, colr); if(pen != -1) SetOPen(glob->rp, pen); } } +void ami_plot_clear_bbox(struct RastPort *rp, struct IBox *bbox) +{ + ami_plot_setapen(0xffffffff); + RectFill(rp, bbox->Left, bbox->Top, + bbox->Width+bbox->Left, bbox->Height+bbox->Top); +} + + bool ami_rectangle(int x0, int y0, int x1, int y1, const plot_style_t *style) { #ifdef AMI_PLOTTER_DEBUG @@ -864,3 +860,17 @@ bool ami_plot_screen_is_palettemapped(void) return palette_mapped; } +struct plotter_table plot; +const struct plotter_table amiplot = { + .rectangle = ami_rectangle, + .line = ami_line, + .polygon = ami_polygon, + .clip = ami_clip, + .text = ami_text, + .disc = ami_disc, + .arc = ami_arc, + .bitmap = ami_bitmap_tile, + .path = ami_path, + .option_knockout = true, +}; + |