GNU bug report logs - #26953
[PATCH] 26.0.50; svg-line uses incorrect parameters

Previous Next

Package: emacs;

Reported by: Ari Roponen <ari.roponen <at> gmail.com>

Date: Tue, 16 May 2017 15:03:01 UTC

Severity: normal

Tags: patch

Fixed in version 26.1

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Ari Roponen <ari.roponen <at> gmail.com>
To: 26953 <at> debbugs.gnu.org
Subject: bug#26953: [PATCH] 26.0.50; svg-line uses incorrect parameters
Date: Tue, 16 May 2017 18:02:35 +0300
This code should draw a horizontal line:

  (require 'svg)
  (let ((svg (svg-create 50 50 :stroke-color "black")))
    (svg-line svg 0 25 50 25)
    (svg-insert-image svg))

but it draws a diagonal one instead. The following patch fixes the
problem.

* lisp/svg.el (svg-line): Use correct parameters.

diff --git a/lisp/svg.el b/lisp/svg.el
index cb924f8163..fc1a6d60e1 100644
--- a/lisp/svg.el
+++ b/lisp/svg.el
@@ -107,8 +107,8 @@ svg-line
    svg
    (dom-node 'line
 	     `((x1 . ,x1)
-	       (x2 . ,y1)
-	       (y1 . ,x2)
+	       (x2 . ,x2)
+	       (y1 . ,y1)
 	       (y2 . ,y2)
 	       ,@(svg--arguments svg args)))))
 




This bug report was last modified 8 years and 6 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.