summaryrefslogtreecommitdiff
path: root/framebuffer
diff options
context:
space:
mode:
authorJohn Tytgat <joty@netsurf-browser.org>2009-02-03 01:27:54 +0000
committerJohn Tytgat <joty@netsurf-browser.org>2009-02-03 01:27:54 +0000
commitfbf6d4cd4116dac4287403c52233f62bac88f3c0 (patch)
tree7f05710df78ef24f788fdeaa0cb186df5a3e77b6 /framebuffer
parent9a1751020684c410d7ad8824dd3cab7c5dd90733 (diff)
downloadnetsurf-fbf6d4cd4116dac4287403c52233f62bac88f3c0.tar.gz
netsurf-fbf6d4cd4116dac4287403c52233f62bac88f3c0.tar.bz2
- Constify parameters of struct plotter_table::polygon and struct plotter_table::path
- riscos/save_draw.c(ro_save_draw_plotters): Make it static. - desktop/save_pdf/pdf_plotters.c(pdf_plot_path): fix broken implementation (coordinates path were wrong, no clip/text mode update, transformation matrix was overwritten); only update fill and/or stroke color when fill and/or stroke is done. (pdf_begin): disable compression when PDF_DEBUG is set svn path=/trunk/netsurf/; revision=6361
Diffstat (limited to 'framebuffer')
-rw-r--r--framebuffer/fb_16bpp_plotters.c6
-rw-r--r--framebuffer/fb_1bpp_plotters.c6
-rw-r--r--framebuffer/fb_32bpp_plotters.c6
-rw-r--r--framebuffer/fb_8bpp_plotters.c6
-rw-r--r--framebuffer/fb_plotters.c4
-rw-r--r--framebuffer/fb_plotters.h2
6 files changed, 15 insertions, 15 deletions
diff --git a/framebuffer/fb_16bpp_plotters.c b/framebuffer/fb_16bpp_plotters.c
index 78d7cc2aa..a7afefd53 100644
--- a/framebuffer/fb_16bpp_plotters.c
+++ b/framebuffer/fb_16bpp_plotters.c
@@ -147,7 +147,7 @@ static bool fb_16bpp_rectangle(int x0, int y0, int width, int height,
return true;
}
-static bool fb_16bpp_polygon(int *p, unsigned int n, colour fill)
+static bool fb_16bpp_polygon(const int *p, unsigned int n, colour fill)
{
return fb_plotters_polygon(p, n, fill, fb_16bpp_line);
}
@@ -386,8 +386,8 @@ static bool fb_16bpp_flush(void)
return true;
}
-static bool fb_16bpp_path(float *p, unsigned int n, colour fill, float width,
- colour c, float *transform)
+static bool fb_16bpp_path(const float *p, unsigned int n, colour fill, float width,
+ colour c, const float transform[6])
{
LOG(("%f, %d, 0x%lx, %f, 0x%lx, %f",
*p, n, fill, width, c, *transform));
diff --git a/framebuffer/fb_1bpp_plotters.c b/framebuffer/fb_1bpp_plotters.c
index f0abfef85..bd511e7ff 100644
--- a/framebuffer/fb_1bpp_plotters.c
+++ b/framebuffer/fb_1bpp_plotters.c
@@ -50,7 +50,7 @@ static bool fb_1bpp_line(int x0, int y0, int x1, int y1, int width,
return true;
}
-static bool fb_1bpp_polygon(int *p, unsigned int n, colour fill)
+static bool fb_1bpp_polygon(const int *p, unsigned int n, colour fill)
{
LOG(("%s(%p, %d, 0x%lx)\n", __func__, p,n,fill));
return true;
@@ -235,8 +235,8 @@ static bool fb_1bpp_flush(void)
return true;
}
-static bool fb_1bpp_path(float *p, unsigned int n, colour fill, float width,
- colour c, float *transform)
+static bool fb_1bpp_path(const float *p, unsigned int n, colour fill, float width,
+ colour c, const float transform[6])
{
LOG(("%s(%f, %d, 0x%lx, %f, 0x%lx, %f)\n", __func__,
*p, n, fill, width, c, *transform));
diff --git a/framebuffer/fb_32bpp_plotters.c b/framebuffer/fb_32bpp_plotters.c
index 3805ff753..c4dc42807 100644
--- a/framebuffer/fb_32bpp_plotters.c
+++ b/framebuffer/fb_32bpp_plotters.c
@@ -135,7 +135,7 @@ static bool fb_32bpp_rectangle(int x0, int y0, int width, int height,
}
-static bool fb_32bpp_polygon(int *p, unsigned int n, colour fill)
+static bool fb_32bpp_polygon(const int *p, unsigned int n, colour fill)
{
return fb_plotters_polygon(p, n, fill, fb_32bpp_line);
}
@@ -367,8 +367,8 @@ static bool fb_32bpp_flush(void)
return true;
}
-static bool fb_32bpp_path(float *p, unsigned int n, colour fill, float width,
- colour c, float *transform)
+static bool fb_32bpp_path(const float *p, unsigned int n, colour fill, float width,
+ colour c, const float transform[6])
{
printf("path\n");
return true;
diff --git a/framebuffer/fb_8bpp_plotters.c b/framebuffer/fb_8bpp_plotters.c
index 9f0498db2..15804a9ed 100644
--- a/framebuffer/fb_8bpp_plotters.c
+++ b/framebuffer/fb_8bpp_plotters.c
@@ -55,7 +55,7 @@ static bool fb_8bpp_line(int x0, int y0, int x1, int y1, int width,
return true;
}
-static bool fb_8bpp_polygon(int *p, unsigned int n, colour fill)
+static bool fb_8bpp_polygon(const int *p, unsigned int n, colour fill)
{
/*LOG(("%p, %d, 0x%lx", p,n,fill));*/
return fb_plotters_polygon(p, n, fill, fb_8bpp_line);
@@ -266,8 +266,8 @@ static bool fb_8bpp_flush(void)
return true;
}
-static bool fb_8bpp_path(float *p, unsigned int n, colour fill, float width,
- colour c, float *transform)
+static bool fb_8bpp_path(const float *p, unsigned int n, colour fill, float width,
+ colour c, const float transform[6])
{
LOG(("%s(%f, %d, 0x%lx, %f, 0x%lx, %f)\n", __func__,
*p, n, fill, width, c, *transform));
diff --git a/framebuffer/fb_plotters.c b/framebuffer/fb_plotters.c
index 87a179425..28f64177f 100644
--- a/framebuffer/fb_plotters.c
+++ b/framebuffer/fb_plotters.c
@@ -221,10 +221,10 @@ colour fb_plotters_ablend(colour pixel, colour scrpixel)
}
bool
-fb_plotters_polygon(int *p, unsigned int n, colour fill,bool (linefn)(int x0, int y0, int x1, int y1, int width, colour c, bool dotted, bool dashed))
+fb_plotters_polygon(const int *p, unsigned int n, colour fill,bool (linefn)(int x0, int y0, int x1, int y1, int width, colour c, bool dotted, bool dashed))
{
unsigned int pnt;
- int *cur = p;
+ const int *cur = p;
for (pnt = 1; pnt < n; pnt++) {
cur = p + (pnt << 1);
diff --git a/framebuffer/fb_plotters.h b/framebuffer/fb_plotters.h
index f9f528336..c06ad2961 100644
--- a/framebuffer/fb_plotters.h
+++ b/framebuffer/fb_plotters.h
@@ -34,7 +34,7 @@ bool fb_plotters_clip_rect(const bbox_t *clip, int *x0, int *y0, int *x1, int *y
bool fb_plotters_clip_line_ctx(int *x0, int *y0, int *x1, int *y1);
bool fb_plotters_clip_line(const bbox_t *clip, int *x0, int *y0, int *x1, int *y1);
-bool fb_plotters_polygon(int *p, unsigned int n, colour fill, bool (linefn)(int x0, int y0, int x1, int y1, int width, colour c, bool dotted, bool dashed));
+bool fb_plotters_polygon(const int *p, unsigned int n, colour fill, bool (linefn)(int x0, int y0, int x1, int y1, int width, colour c, bool dotted, bool dashed));
bool fb_plotters_bitmap_tile(int x, int y,
int width, int height,