Subject: bug#26953: closed (Re: bug#26953: [PATCH] 26.0.50; svg-line uses incorrect parameters)

From: [email-masked] (GNU bug Tracking System)
Date: Sun, 21 May 2017 00:16:02 +0000

Your bug report

#26953: [PATCH] 26.0.50; svg-line uses incorrect parameters

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
26953: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=26953
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#26953: [PATCH] 26.0.50; svg-line uses incorrect parameters
From: Glenn Morris <[email-masked]>
To: [email-masked]
Date: Sat, 20 May 2017 20:15:17 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

Version: 26.1

Thanks; applied as 547f78c813c.

Subject: [PATCH] 26.0.50; svg-line uses incorrect parameters
From: Ari Roponen <[email-masked]>
To: [email-masked]
Date: Tue, 16 May 2017 18:02:35 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

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)))))