summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xamiga/plotters.c1
-rw-r--r--beos/beos_plotters.cpp23
-rw-r--r--desktop/knockout.c16
-rw-r--r--desktop/plotters.h2
-rw-r--r--desktop/save_pdf/pdf_plotters.c7
-rw-r--r--framebuffer/framebuffer.c1
-rw-r--r--gtk/gtk_plotters.c7
-rw-r--r--gtk/gtk_print.c7
-rw-r--r--render/html_redraw.c2
-rw-r--r--render/textplain.c2
-rw-r--r--riscos/plotters.c20
-rw-r--r--riscos/print.c9
-rw-r--r--riscos/save_draw.c11
-rw-r--r--riscos/window.c2
14 files changed, 7 insertions, 103 deletions
diff --git a/amiga/plotters.c b/amiga/plotters.c
index 92ada4c6a..7c9158285 100755
--- a/amiga/plotters.c
+++ b/amiga/plotters.c
@@ -60,7 +60,6 @@ struct bfbitmap {
struct plotter_table plot;
const struct plotter_table amiplot = {
- .clg = ami_clg,
.rectangle = ami_rectangle,
.line = ami_line,
.polygon = ami_polygon,
diff --git a/beos/beos_plotters.cpp b/beos/beos_plotters.cpp
index 754c0d75d..dabd95821 100644
--- a/beos/beos_plotters.cpp
+++ b/beos/beos_plotters.cpp
@@ -61,7 +61,6 @@ cairo_t *current_cr;
* the right-bottom pixel is actually part of the BRect!
*/
-static bool nsbeos_plot_clg(colour c);
static bool nsbeos_plot_rectangle(int x0, int y0, int width, int height,
int line_width, colour c, bool dotted, bool dashed);
static bool nsbeos_plot_line(int x0, int y0, int x1, int y1, int width,
@@ -95,7 +94,6 @@ static const rgb_color kBlackColor = { 0, 0, 0, 255 };
struct plotter_table plot;
const struct plotter_table nsbeos_plotters = {
- nsbeos_plot_clg,
nsbeos_plot_rectangle,
nsbeos_plot_line,
nsbeos_plot_polygon,
@@ -141,27 +139,6 @@ void nsbeos_current_gc_set(BView *view)
current_view = view;
}
-
-bool nsbeos_plot_clg(colour c)
-{
-#warning BView::Invalidate() ?
-
- BView *view;
-
- view = nsbeos_current_gc/*_lock*/();
- if (view == NULL) {
- warn_user("No GC", 0);
- return false;
- }
-
- nsbeos_set_colour(c);
- view->FillRect(view->Bounds());
-
- //nsbeos_current_gc_unlock();
-
- return true;
-}
-
bool nsbeos_plot_rectangle(int x0, int y0, int width, int height,
int line_width, colour c, bool dotted, bool dashed)
{
diff --git a/desktop/knockout.c b/desktop/knockout.c
index 4df32bb50..1fbb67968 100644
--- a/desktop/knockout.c
+++ b/desktop/knockout.c
@@ -86,7 +86,6 @@ static bool knockout_plot_fill_recursive(struct knockout_box *box, colour c);
static bool knockout_plot_bitmap_recursive(struct knockout_box *box,
struct knockout_entry *entry);
-static bool knockout_plot_clg(colour c);
static bool knockout_plot_rectangle(int x0, int y0, int width, int height,
int line_width, colour c, bool dotted, bool dashed);
static bool knockout_plot_line(int x0, int y0, int x1, int y1, int width,
@@ -111,7 +110,6 @@ static bool knockout_plot_path(const float *p, unsigned int n, colour fill,
const struct plotter_table knockout_plotters = {
- .clg = knockout_plot_clg,
.rectangle = knockout_plot_rectangle,
.line = knockout_plot_line,
.polygon = knockout_plot_polygon,
@@ -130,7 +128,6 @@ const struct plotter_table knockout_plotters = {
typedef enum {
- KNOCKOUT_PLOT_CLG, /* translated to _FILL */
KNOCKOUT_PLOT_RECTANGLE,
KNOCKOUT_PLOT_LINE,
KNOCKOUT_PLOT_POLYGON,
@@ -163,9 +160,6 @@ struct knockout_entry {
struct knockout_box *box; /* relating series of knockout clips */
union {
struct {
- colour c;
- } clg;
- struct {
int x0;
int y0;
int width;
@@ -270,7 +264,7 @@ bool knockout_plot_start(struct plotter_table *plotter)
/* check if we're recursing */
if (nested_depth++ > 0) {
/* we should already have the knockout renderer as default */
- assert(plotter->clg == knockout_plotters.clg);
+ assert(plotter->rectangle == knockout_plotters.rectangle);
return true;
}
@@ -323,10 +317,6 @@ bool knockout_plot_flush(void)
for (i = 0; i < knockout_entry_cur; i++) {
switch (knockout_entries[i].type) {
- case KNOCKOUT_PLOT_CLG:
- success &= plot.clg(
- knockout_entries[i].data.clg.c);
- break;
case KNOCKOUT_PLOT_RECTANGLE:
success &= plot.rectangle(
knockout_entries[i].data.rectangle.x0,
@@ -634,10 +624,6 @@ bool knockout_plot_bitmap_recursive(struct knockout_box *box,
return success;
}
-bool knockout_plot_clg(colour c)
-{
- return knockout_plot_fill(clip_x0_cur, clip_y0_cur, clip_x1_cur, clip_y1_cur, c);
-}
bool knockout_plot_rectangle(int x0, int y0, int width, int height,
diff --git a/desktop/plotters.h b/desktop/plotters.h
index 7feae4929..8a7183f89 100644
--- a/desktop/plotters.h
+++ b/desktop/plotters.h
@@ -38,7 +38,6 @@ typedef unsigned long bitmap_flags_t;
/** Set of target specific plotting functions.
*
* The functions are:
- * clg - Clears plotting area to a flat colour (if needed)
* arc - Plots an arc, around (x,y), from anticlockwise from angle1 to
* angle2. Angles are measured anticlockwise from horizontal, in
* degrees.
@@ -95,7 +94,6 @@ typedef unsigned long bitmap_flags_t;
* 3 | | | | | |
*/
struct plotter_table {
- bool (*clg)(colour c);
bool (*rectangle)(int x0, int y0, int width, int height,
int line_width, colour c, bool dotted, bool dashed);
bool (*line)(int x0, int y0, int x1, int y1, int width,
diff --git a/desktop/save_pdf/pdf_plotters.c b/desktop/save_pdf/pdf_plotters.c
index 92ede016a..74c36925b 100644
--- a/desktop/save_pdf/pdf_plotters.c
+++ b/desktop/save_pdf/pdf_plotters.c
@@ -45,7 +45,6 @@
/* #define PDF_DEBUG */
/* #define PDF_DEBUG_DUMPGRID */
-static bool pdf_plot_clg(colour c);
static bool pdf_plot_rectangle(int x0, int y0, int width, int height,
int line_width, colour c, bool dotted, bool dashed);
static bool pdf_plot_line(int x0, int y0, int x1, int y1, int width,
@@ -124,7 +123,6 @@ static int last_clip_x0, last_clip_y0, last_clip_x1, last_clip_y1;
static const struct print_settings *settings;
static const struct plotter_table pdf_plotters = {
- .clg = pdf_plot_clg,
.rectangle = pdf_plot_rectangle,
.line = pdf_plot_line,
.polygon = pdf_plot_polygon,
@@ -148,11 +146,6 @@ const struct printer pdf_printer = {
static char *owner_pass;
static char *user_pass;
-bool pdf_plot_clg(colour c)
-{
- return true;
-}
-
bool pdf_plot_rectangle(int x0, int y0, int width, int height,
int line_width, colour c, bool dotted, bool dashed)
{
diff --git a/framebuffer/framebuffer.c b/framebuffer/framebuffer.c
index 45f4eebc9..0e536698e 100644
--- a/framebuffer/framebuffer.c
+++ b/framebuffer/framebuffer.c
@@ -217,7 +217,6 @@ framebuffer_plot_path(const float *p,
}
struct plotter_table plot = {
- .clg = nsfb_lplot_clg,
.rectangle = nsfb_lplot_rectangle,
.line = nsfb_lplot_line,
.polygon = nsfb_lplot_polygon,
diff --git a/gtk/gtk_plotters.c b/gtk/gtk_plotters.c
index 66f088034..c746483c2 100644
--- a/gtk/gtk_plotters.c
+++ b/gtk/gtk_plotters.c
@@ -49,7 +49,6 @@ GdkDrawable *current_drawable;
GdkGC *current_gc;
cairo_t *current_cr;
-static bool nsgtk_plot_clg(colour c);
static bool nsgtk_plot_rectangle(int x0, int y0, int width, int height,
int line_width, colour c, bool dotted, bool dashed);
static bool nsgtk_plot_line(int x0, int y0, int x1, int y1, int width,
@@ -78,7 +77,6 @@ static float nsgtk_plot_scale = 1.0;
struct plotter_table plot;
const struct plotter_table nsgtk_plotters = {
- .clg = nsgtk_plot_clg,
.rectangle = nsgtk_plot_rectangle,
.line = nsgtk_plot_line,
.polygon = nsgtk_plot_polygon,
@@ -93,11 +91,6 @@ const struct plotter_table nsgtk_plotters = {
};
-bool nsgtk_plot_clg(colour c)
-{
- return true;
-}
-
bool nsgtk_plot_rectangle(int x0, int y0, int width, int height,
int line_width, colour c, bool dotted, bool dashed)
{
diff --git a/gtk/gtk_print.c b/gtk/gtk_print.c
index 7c403d498..cb86f93a8 100644
--- a/gtk/gtk_print.c
+++ b/gtk/gtk_print.c
@@ -45,7 +45,6 @@
#include "utils/log.h"
#include "utils/utils.h"
-static bool nsgtk_print_plot_clg(colour c);
static bool nsgtk_print_plot_rectangle(int x0, int y0, int width, int height,
int line_width, colour c, bool dotted, bool dashed);
static bool nsgtk_print_plot_line(int x0, int y0, int x1, int y1, int width,
@@ -89,7 +88,6 @@ struct content *content_to_print;
static GdkRectangle cliprect;
static const struct plotter_table nsgtk_print_plotters = {
- .clg = nsgtk_print_plot_clg,
.rectangle = nsgtk_print_plot_rectangle,
.line = nsgtk_print_plot_line,
.polygon = nsgtk_print_plot_polygon,
@@ -110,11 +108,6 @@ static const struct printer gtk_printer = {
gtk_print_end
};
-bool nsgtk_print_plot_clg(colour c)
-{
- return true;
-}
-
bool nsgtk_print_plot_rectangle(int x0, int y0, int width, int height,
int line_width, colour c, bool dotted, bool dashed)
{
diff --git a/render/html_redraw.c b/render/html_redraw.c
index b9d6e84f1..b31c98e64 100644
--- a/render/html_redraw.c
+++ b/render/html_redraw.c
@@ -147,7 +147,7 @@ bool html_redraw(struct content *c, int x, int y,
result = plot.clip(clip_x0, clip_y0, clip_x1, clip_y1);
if (c->data.html.background_colour != TRANSPARENT)
background_colour = c->data.html.background_colour;
- result &= plot.clg(background_colour);
+ result &= plot.fill(clip_x0, clip_y0, clip_x1, clip_y1, background_colour);
result &= html_redraw_box(box, x, y,
clip_x0, clip_y0, clip_x1, clip_y1,
diff --git a/render/textplain.c b/render/textplain.c
index a5a148617..48e1626cf 100644
--- a/render/textplain.c
+++ b/render/textplain.c
@@ -358,7 +358,7 @@ bool textplain_redraw(struct content *c, int x, int y,
if (line1 < line0)
line1 = line0;
- if (!plot.clg(0xffffff))
+ if (!plot.fill(clip_x0, clip_y0, clip_x1, clip_y1, 0xffffff))
return false;
if (!line)
diff --git a/riscos/plotters.c b/riscos/plotters.c
index 63a44bf26..8ff46ad0a 100644
--- a/riscos/plotters.c
+++ b/riscos/plotters.c
@@ -34,7 +34,6 @@
#include "utils/log.h"
-static bool ro_plot_clg(colour c);
static bool ro_plot_rectangle(int x0, int y0, int width, int height,
int line_width, colour c, bool dotted, bool dashed);
static bool ro_plot_line(int x0, int y0, int x1, int y1, int width,
@@ -60,7 +59,6 @@ static bool ro_plot_bitmap(int x, int y, int width, int height,
struct plotter_table plot;
const struct plotter_table ro_plotters = {
- .clg = ro_plot_clg,
.rectangle = ro_plot_rectangle,
.line = ro_plot_line,
.polygon = ro_plot_polygon,
@@ -82,24 +80,6 @@ float ro_plot_scale = 1.0;
bool ro_plot_patterned_lines = true;
-bool ro_plot_clg(colour c)
-{
- os_error *error;
- error = xcolourtrans_set_gcol(c << 8,
- colourtrans_SET_BG_GCOL | colourtrans_USE_ECFS_GCOL,
- os_ACTION_OVERWRITE, 0, 0);
- if (error) {
- LOG(("xcolourtrans_set_gcol: 0x%x: %s",
- error->errnum, error->errmess));
- return false;
- }
- error = xos_clg();
- if (error) {
- LOG(("xos_clg: 0x%x: %s", error->errnum, error->errmess));
- return false;
- }
- return true;
-}
bool ro_plot_rectangle(int x0, int y0, int width, int height,
diff --git a/riscos/print.c b/riscos/print.c
index a663b3d1c..8742f40b6 100644
--- a/riscos/print.c
+++ b/riscos/print.c
@@ -97,7 +97,6 @@ static void print_send_printsave(struct content *c);
static bool print_send_printtypeknown(wimp_message *m);
static bool print_document(struct gui_window *g, const char *filename);
static const char *print_declare_fonts(struct content *content);
-static bool print_fonts_plot_clg(colour c);
static bool print_fonts_plot_rectangle(int x0, int y0, int width, int height,
int line_width, colour c, bool dotted, bool dashed);
static bool print_fonts_plot_line(int x0, int y0, int x1, int y1, int width,
@@ -126,7 +125,6 @@ static void print_fonts_callback(void *context,
/** Plotter for print_declare_fonts(). All the functions do nothing except for
* print_fonts_plot_text, which records the fonts used. */
static const struct plotter_table print_fonts_plotters = {
- .clg = print_fonts_plot_clg,
.rectangle = print_fonts_plot_rectangle,
.line = print_fonts_plot_line,
.polygon = print_fonts_plot_polygon,
@@ -809,24 +807,23 @@ end:
}
-bool print_fonts_plot_clg(colour c)
-{
- return true;
-}
bool print_fonts_plot_rectangle(int x0, int y0, int width, int height,
int line_width, colour c, bool dotted, bool dashed)
{
return true;
}
+
bool print_fonts_plot_line(int x0, int y0, int x1, int y1, int width,
colour c, bool dotted, bool dashed)
{
return true;
}
+
bool print_fonts_plot_polygon(const int *p, unsigned int n, colour fill)
{
return true;
}
+
bool print_fonts_plot_fill(int x0, int y0, int x1, int y1, colour c)
{
return true;
diff --git a/riscos/save_draw.c b/riscos/save_draw.c
index 7c76210c2..320f7bfb9 100644
--- a/riscos/save_draw.c
+++ b/riscos/save_draw.c
@@ -37,8 +37,6 @@
#include "utils/log.h"
#include "utils/utils.h"
-
-static bool ro_save_draw_clg(colour c);
static bool ro_save_draw_rectangle(int x0, int y0, int width, int height,
int line_width, colour c, bool dotted, bool dashed);
static bool ro_save_draw_line(int x0, int y0, int x1, int y1, int width,
@@ -63,7 +61,6 @@ static bool ro_save_draw_error(pencil_code code);
static const struct plotter_table ro_save_draw_plotters = {
- .clg = ro_save_draw_clg,
.rectangle = ro_save_draw_rectangle,
.line = ro_save_draw_line,
.polygon = ro_save_draw_polygon,
@@ -146,14 +143,6 @@ bool save_as_draw(struct content *c, const char *path)
return true;
}
-
-bool ro_save_draw_clg(colour c)
-{
- return ro_save_draw_fill(0, 0, ro_save_draw_width, ro_save_draw_height,
- c);
-}
-
-
bool ro_save_draw_rectangle(int x0, int y0, int width, int height,
int line_width, colour c, bool dotted, bool dashed)
{
diff --git a/riscos/window.c b/riscos/window.c
index 8e0a8b8d6..09b191ed1 100644
--- a/riscos/window.c
+++ b/riscos/window.c
@@ -1483,7 +1483,7 @@ void ro_gui_window_redraw(wimp_draw *redraw)
plot.clip(clip_x0, clip_y0, clip_x1, clip_y1);
if (c->type != CONTENT_HTML)
- plot.clg(0x00ffffff);
+ plot.fill(clip_x0, clip_y0, clip_x1, clip_y1, 0x00ffffff);
/* Redraw the clip rectangle area of the content */
content_redraw(c, 0, 0,