summaryrefslogtreecommitdiff
path: root/css/utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'css/utils.h')
-rw-r--r--css/utils.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/css/utils.h b/css/utils.h
index 11403b5da..9d40aba7b 100644
--- a/css/utils.h
+++ b/css/utils.h
@@ -39,6 +39,15 @@ extern css_fixed nscss_screen_dpi;
((color) & 0xff00) | \
(((color) & 0xff) << 16)
+/**
+ * Determine if a CSS color primitive is transparent
+ *
+ * \param color The CSS color to consider
+ * \return True if the color is transparent, false otherwise
+ */
+#define nscss_color_is_transparent(color) \
+ (((color) >> 24) == 0)
+
css_fixed nscss_len2pt(css_fixed length, css_unit unit);
css_fixed nscss_len2px(css_fixed length, css_unit unit,
const css_computed_style *style);