summaryrefslogtreecommitdiff
path: root/frontends/riscos
diff options
context:
space:
mode:
authorMichael Drake <michael.drake@codethink.co.uk>2018-05-23 15:46:39 +0100
committerMichael Drake <michael.drake@codethink.co.uk>2018-05-23 15:46:39 +0100
commita40dca49e8493802d7064bd8e6aaab03436568ee (patch)
tree5a036a8ddc33423d3564b046837ff42bd46d8f61 /frontends/riscos
parent6cabd4cd628833afa32aeb7c614ef153b4a1c985 (diff)
parent8a931f01b958ad5862433ece6024bbde0aa4ecb8 (diff)
downloadnetsurf-a40dca49e8493802d7064bd8e6aaab03436568ee.tar.gz
netsurf-a40dca49e8493802d7064bd8e6aaab03436568ee.tar.bz2
Merge branch 'tlsa/plotter-polish'
Diffstat (limited to 'frontends/riscos')
-rw-r--r--frontends/riscos/font.c2
-rw-r--r--frontends/riscos/plotters.c20
-rw-r--r--frontends/riscos/print.c1
-rw-r--r--frontends/riscos/save_draw.c9
4 files changed, 15 insertions, 17 deletions
diff --git a/frontends/riscos/font.c b/frontends/riscos/font.c
index 8913efeeb..2ff309043 100644
--- a/frontends/riscos/font.c
+++ b/frontends/riscos/font.c
@@ -469,7 +469,7 @@ void nsfont_read_style(const plot_font_style_t *fstyle,
rufl_WEIGHT_900
};
- *font_size = (fstyle->size * 16) / FONT_SIZE_SCALE;
+ *font_size = (fstyle->size * 16) / PLOT_STYLE_SCALE;
if (1600 < *font_size)
*font_size = 1600;
diff --git a/frontends/riscos/plotters.c b/frontends/riscos/plotters.c
index 2fbd12aeb..2b306827d 100644
--- a/frontends/riscos/plotters.c
+++ b/frontends/riscos/plotters.c
@@ -324,9 +324,9 @@ ro_plot_line(const struct redraw_context *ctx,
dashed = true;
return ro_plot_draw_path((const draw_path *)path,
- style->stroke_width,
- style->stroke_colour,
- dotted, dashed);
+ plot_style_fixed_to_int(style->stroke_width),
+ style->stroke_colour,
+ dotted, dashed);
}
return NSERROR_OK;
}
@@ -412,10 +412,10 @@ ro_plot_rectangle(const struct redraw_context *ctx,
dashed = true;
ro_plot_draw_path((const draw_path *)path,
- style->stroke_width,
- style->stroke_colour,
- dotted,
- dashed);
+ plot_style_fixed_to_int(style->stroke_width),
+ style->stroke_colour,
+ dotted,
+ dashed);
}
return NSERROR_OK;
@@ -483,7 +483,6 @@ ro_plot_polygon(const struct redraw_context *ctx,
* \param pstyle Style controlling the path plot.
* \param p elements of path
* \param n nunber of elements on path
- * \param width The width of the path
* \param transform A transform to apply to the path.
* \return NSERROR_OK on success else error code.
*/
@@ -492,7 +491,6 @@ ro_plot_path(const struct redraw_context *ctx,
const plot_style_t *pstyle,
const float *p,
unsigned int n,
- float width,
const float transform[6])
{
static const draw_line_style line_style = {
@@ -591,7 +589,9 @@ ro_plot_path(const struct redraw_context *ctx,
}
error = xdraw_stroke((draw_path *) path, 0, &trfm, 0,
- width * 2 * 256, &line_style, 0);
+ plot_style_fixed_to_int(
+ pstyle->stroke_width) * 2 * 256,
+ &line_style, 0);
if (error) {
NSLOG(netsurf, INFO, "xdraw_stroke: 0x%x: %s",
error->errnum, error->errmess);
diff --git a/frontends/riscos/print.c b/frontends/riscos/print.c
index d965baff4..b390c693d 100644
--- a/frontends/riscos/print.c
+++ b/frontends/riscos/print.c
@@ -831,7 +831,6 @@ print_fonts_plot_path(const struct redraw_context *ctx,
const plot_style_t *pstyle,
const float *p,
unsigned int n,
- float width,
const float transform[6])
{
return NSERROR_OK;
diff --git a/frontends/riscos/save_draw.c b/frontends/riscos/save_draw.c
index 9ee730434..28880e530 100644
--- a/frontends/riscos/save_draw.c
+++ b/frontends/riscos/save_draw.c
@@ -168,7 +168,7 @@ ro_save_draw_line(const struct redraw_context *ctx,
sizeof path / sizeof path[0],
pencil_TRANSPARENT,
style->stroke_colour << 8,
- style->stroke_width,
+ plot_style_fixed_to_int(style->stroke_width),
pencil_JOIN_MITRED,
pencil_CAP_BUTT,
pencil_CAP_BUTT,
@@ -235,7 +235,7 @@ ro_save_draw_rectangle(const struct redraw_context *ctx,
sizeof path / sizeof path[0],
pencil_TRANSPARENT,
style->stroke_colour << 8,
- style->stroke_width,
+ plot_style_fixed_to_int(style->stroke_width),
pencil_JOIN_MITRED,
pencil_CAP_BUTT,
pencil_CAP_BUTT,
@@ -312,7 +312,6 @@ ro_save_draw_polygon(const struct redraw_context *ctx,
* \param pstyle Style controlling the path plot.
* \param p elements of path
* \param n nunber of elements on path
- * \param width The width of the path
* \param transform A transform to apply to the path.
* \return NSERROR_OK on success else error code.
*/
@@ -321,7 +320,6 @@ ro_save_draw_path(const struct redraw_context *ctx,
const plot_style_t *pstyle,
const float *p,
unsigned int n,
- float width,
const float transform[6])
{
pencil_code code;
@@ -409,7 +407,8 @@ ro_save_draw_path(const struct redraw_context *ctx,
pstyle->stroke_colour == NS_TRANSPARENT ?
pencil_TRANSPARENT :
pstyle->stroke_colour << 8,
- width, pencil_JOIN_MITRED,
+ plot_style_fixed_to_int(style->stroke_width),
+ pencil_JOIN_MITRED,
pencil_CAP_BUTT,
pencil_CAP_BUTT,
0,