summaryrefslogtreecommitdiff
path: root/include/netsurf/plot_style.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/netsurf/plot_style.h')
-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)