[librsvg] marker.rs: Don't render markers if they are zero-sized, per the spec
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg] marker.rs: Don't render markers if they are zero-sized, per the spec
- Date: Fri, 26 Jan 2018 17:48:21 +0000 (UTC)
commit 556fb62786bab88e4d08ca996e655cf9fb48e3e1
Author: Federico Mena Quintero <federico gnome org>
Date: Tue Oct 3 10:18:29 2017 -0500
marker.rs: Don't render markers if they are zero-sized, per the spec
rust/src/marker.rs | 5 +++++
1 file changed, 5 insertions(+)
---
diff --git a/rust/src/marker.rs b/rust/src/marker.rs
index 908fc14..5e12ef8 100644
--- a/rust/src/marker.rs
+++ b/rust/src/marker.rs
@@ -119,6 +119,11 @@ impl NodeMarker {
let marker_width = self.width.get ().normalize (draw_ctx);
let marker_height = self.height.get ().normalize (draw_ctx);
+ if double_equals(marker_width, 0.0) || double_equals(marker_height, 0.0) {
+ // markerWidth or markerHeight set to 0 disables rendering of the element
+ // https://www.w3.org/TR/SVG/painting.html#MarkerWidthAttribute
+ return;
+ }
let mut affine = drawing_ctx::get_current_state_affine (draw_ctx);
affine.translate (xpos, ypos);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]