[librsvg/librsvg-2.48] rsvg-convert: Accept RGBA colors for the --background-color option
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg/librsvg-2.48] rsvg-convert: Accept RGBA colors for the --background-color option
- Date: Thu, 9 Apr 2020 19:18:44 +0000 (UTC)
commit b2478ba6c4ab3efc99741462792938ed49fa4335
Author: Hao Guan <hguandl gmail com>
Date: Thu Apr 9 14:02:47 2020 -0500
rsvg-convert: Accept RGBA colors for the --background-color option
rsvg-convert.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/rsvg-convert.c b/rsvg-convert.c
index 328059af..547b7972 100644
--- a/rsvg-convert.c
+++ b/rsvg-convert.c
@@ -577,11 +577,12 @@ main (int argc, char **argv)
exit (1);
}
- cairo_set_source_rgb (
+ cairo_set_source_rgba (
cr,
((background_color >> 16) & 0xff) / 255.0,
((background_color >> 8) & 0xff) / 255.0,
- ((background_color >> 0) & 0xff) / 255.0);
+ ((background_color >> 0) & 0xff) / 255.0,
+ ((background_color >> 24) & 0xff) / 255.0);
cairo_rectangle (cr, 0, 0, unscaled_width, unscaled_height);
cairo_fill (cr);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]