Clone in a terminal:
Commit 20c551d
Johan Mattsson - 2016-07-01T18:36:46+00:00
20c551d07a062d92a2c40496a34a7a6d6c080537johan.mattsson.m@gmail.com

SVG padding

Changed files (1)

Diff

diff --git a/libsvgbird/SvgStyle.vala b/libsvgbird/SvgStyle.valaindex c6ebc87..d1f7b76 100644--- a/libsvgbird/SvgStyle.vala+++ b/libsvgbird/SvgStyle.vala@@ -26,11 +26,16 @@ public class SvgStyle : GLib.Object { 	public Gradient? fill_gradient = null; 	public LineCap line_cap = LineCap.BUTT; +	public double padding_top = 0;+	public double padding_right = 0;+	public double padding_bottom = 0;+	public double padding_left = 0;+ 	public double stroke_width = 0;  	private static Gee.HashMap<string, string>? inheritance; 	private static Mutex inheritance_mutex = new Mutex ();-	+			 	public SvgStyle () { 	} 	@@ -271,7 +276,12 @@ public class SvgStyle : GLib.Object { 		if (s.stroke != null) { 			Color color = (!) s.stroke; 			color.a = stroke_opacity;-		}		+		}+		+		s.padding_bottom = SvgFile.parse_number (s.get_css_property ("padding-bottom"));+		s.padding_top = SvgFile.parse_number (s.get_css_property ("padding-top"));+		s.padding_left = SvgFile.parse_number (s.get_css_property ("padding-left"));+		s.padding_right = SvgFile.parse_number (s.get_css_property ("padding-right")); 	} 	 	void parse_key_value_pairs (string svg_style) {

Contact

Email: johan.mattsson.m@gmail.com
Mastodon: typo.social/@birdfont
GitHub: johanmattssonm
LinkedIn: johan-mattsson-2ab324112