[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/svg-lib 303f690389 2/2: Merge remote-tracking branch 'o
From: |
ELPA Syncer |
Subject: |
[elpa] externals/svg-lib 303f690389 2/2: Merge remote-tracking branch 'origin/master' |
Date: |
Wed, 6 Jul 2022 13:58:00 -0400 (EDT) |
branch: externals/svg-lib
commit 303f690389f71fd8efb8f43931e835d8b3db28d4
Merge: a11267c23b 212cc8c8b7
Author: Nicolas P. Rougier <Nicolas.Rougier@inria.fr>
Commit: Nicolas P. Rougier <Nicolas.Rougier@inria.fr>
Merge remote-tracking branch 'origin/master'
---
svg-lib.el | 37 ++++++++++++++++++-------------------
1 file changed, 18 insertions(+), 19 deletions(-)
diff --git a/svg-lib.el b/svg-lib.el
index 42c67edfc6..4b810ab250 100644
--- a/svg-lib.el
+++ b/svg-lib.el
@@ -99,7 +99,6 @@
(error "svg-lib.el requires Emacs to be compiled with svg support.\n"))
(apply #'svg-image args))
-
(defgroup svg-lib nil
"SVG tags, bars & icons."
:group 'convenience
@@ -254,7 +253,7 @@ and style elements ARGS."
(txt-char-height (window-font-height))
(txt-char-height (if line-spacing
(+ txt-char-height line-spacing)
- txt-char-height))
+ txt-char-height))
(font-info (font-info (format "%s-%d" font-family font-size)))
(font-size (aref font-info 2)) ;; redefine font-size
(ascent (aref font-info 8))
@@ -279,9 +278,9 @@ and style elements ARGS."
(svg (svg-create svg-width svg-height)))
- (if (>= stroke 0.25)
- (svg-rectangle svg tag-x 0 tag-width tag-height
- :fill foreground :rx radius))
+ (when (>= stroke 0.25)
+ (svg-rectangle svg tag-x 0 tag-width tag-height
+ :fill foreground :rx radius))
(svg-rectangle svg (+ tag-x (/ stroke 2.0)) (/ stroke 2.0)
(- tag-width stroke) (- tag-height stroke)
:fill background :rx (- radius (/ stroke 2.0)))
@@ -343,11 +342,11 @@ and style elements ARGS."
(x1 (+ cx (* iradius (cos angle1))))
(y1 (+ cy (* iradius (sin angle1))))
- (large-arc (if (>= (- angle1 angle0) pi) t nil))
+ (large-arc (>= (- angle1 angle0) pi))
(svg (svg-create svg-width svg-height)))
- (if (>= stroke 0.25)
- (svg-circle svg cx cy radius :fill foreground))
+ (when (>= stroke 0.25)
+ (svg-circle svg cx cy radius :fill foreground))
(svg-circle svg cx cy (- radius (/ stroke 2.0)) :fill background)
@@ -402,9 +401,9 @@ and style elements ARGS."
(tag-x (/ (- svg-width tag-width) 2))
(svg (svg-create svg-width svg-height)))
- (if (>= stroke 0.25)
- (svg-rectangle svg tag-x 0 tag-width tag-height
- :fill foreground :rx radius))
+ (when (>= stroke 0.25)
+ (svg-rectangle svg tag-x 0 tag-width tag-height
+ :fill foreground :rx radius))
(svg-rectangle svg (+ tag-x (/ stroke 2.0))
(/ stroke 2.0)
(- tag-width stroke)
@@ -498,9 +497,9 @@ given STYLE and style elements ARGS."
(svg (svg-create svg-width svg-height)))
- (if (>= stroke 0.25)
- (svg-rectangle svg box-x box-y box-width box-height
- :fill foreground :rx radius))
+ (when (>= stroke 0.25)
+ (svg-rectangle svg box-x box-y box-width box-height
+ :fill foreground :rx radius))
(svg-rectangle svg (+ box-x (/ stroke 2.0))
(+ box-y (/ stroke 2.0))
(- box-width stroke)
@@ -584,9 +583,9 @@ and style elements ARGS."
(- (/ svg-height 2 scale) (/ icon-height 2))))
(svg (svg-create svg-width svg-height)))
- (if (>= stroke 0.25)
- (svg-rectangle svg tag-x 0 tag-width tag-height
- :fill foreground :rx radius))
+ (when (>= stroke 0.25)
+ (svg-rectangle svg tag-x 0 tag-width tag-height
+ :fill foreground :rx radius))
(svg-rectangle svg (+ tag-x (/ stroke 2.0)) (/ stroke 2.0)
(- tag-width stroke) (- tag-height stroke)
:fill background :rx (- radius (/ stroke 2.0)))
@@ -635,8 +634,8 @@ and style elements ARGS."
(dom-append-child svg child))
(dolist (child children-2)
- (if (not (stringp child))
- (dom-set-attribute child 'transform transform))
+ (unless (stringp child)
+ (dom-set-attribute child 'transform transform))
(dom-append-child svg child))
svg))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/svg-lib 303f690389 2/2: Merge remote-tracking branch 'origin/master',
ELPA Syncer <=