summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2018-08-29 21:10:51 +0100
committerVincent Sanders <vince@kyllikki.org>2020-12-11 16:20:57 +0000
commit5c0eca30a3cd711d87bd640af1422c074aeede48 (patch)
treec5e26a972d79a3112ce30f2e4b45dabd39209af1 /include
parenteef5b5ef5aaffe0e3e9d3a3069e85699d6a4e300 (diff)
downloadnetsurf-5c0eca30a3cd711d87bd640af1422c074aeede48.tar.gz
netsurf-5c0eca30a3cd711d87bd640af1422c074aeede48.tar.bz2
fix plot style float to fix path width
Diffstat (limited to 'include')
-rw-r--r--include/netsurf/plot_style.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/netsurf/plot_style.h b/include/netsurf/plot_style.h
index bfc0805ea..8ba79ae1b 100644
--- a/include/netsurf/plot_style.h
+++ b/include/netsurf/plot_style.h
@@ -50,6 +50,9 @@ typedef int32_t plot_style_fixed;
/* Convert an int to fixed point */
#define plot_style_int_to_fixed(v) ((v) << PLOT_STYLE_RADIX)
+/* Convert an float to fixed point */
+#define plot_style_float_to_fixed(v) ((v) * (1<<PLOT_STYLE_RADIX))
+
/* Convert fixed point to int */
#define plot_style_fixed_to_int(v) ((v) >> PLOT_STYLE_RADIX)