;; Copyright (C) 2014 Free Software Foundation, Inc.
+;; Author: Thien-Thi Nguyen <ttn@gnu.org>
+;; Maintainer: Thien-Thi Nguyen <ttn@gnu.org>
+
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
X -3 6 10
Y 0 7 8
-The span is always an even number. As a special case,
-if RX or RY is less than 1, the value is nil."
- (assert (not (integerp cx)))
- (assert (not (integerp cy)))
+The span is always an even number. As a special case, if the
+absolute value of RX or RY is less than 1, the value is nil."
+ (cl-assert (and (not (integerp cx))
+ (not (integerp cy)))
+ nil "Integer component in center coordinate: (%S,%S)"
+ cx cy)
(unless (or (> 1 (abs rx))
(> 1 (abs ry)))
(cl-flet*
(placed (origin scale n)
(truncate (+ origin (* scale n))))
(orient (coords quadrant)
- (loop with (sx . sy) = quadrant
- for (x . y) in coords
- collect (cons (placed cx sx x)
- (placed cy sy y)))))
+ (cl-loop
+ with (sx . sy) = quadrant
+ for (x . y) in coords
+ collect (cons (placed cx sx x)
+ (placed cy sy y)))))
(delete-dups
- (loop with coords = (mapcar
- #'normal
- (artist-ellipse-generate-quadrant
- ;; Specify row first; artist.el is like that.
- ;; (That's why ‘normal’ does what it does...)
- ry rx))
- for quadrant ; these are in order: I-IV
- in '(( 1 . 1) ; todo: "manually" remove single
- (-1 . 1) ; (border point) overlaps;
- (-1 . -1) ; avoid ‘delete-dups’
- ( 1 . -1))
- append (orient coords quadrant))))))
+ (cl-loop
+ with coords = (mapcar
+ #'normal
+ (artist-ellipse-generate-quadrant
+ ;; Specify row first; artist.el is like that.
+ ;; (That's why ‘normal’ does what it does...)
+ ry rx))
+ for quadrant ; these are in order: I-IV
+ in '(( 1 . 1) ; todo: "manually" remove single
+ (-1 . 1) ; (border point) overlaps;
+ (-1 . -1) ; avoid ‘delete-dups’
+ ( 1 . -1))
+ append (orient coords quadrant))))))
;;;###autoload
(defun xpm-m2z-circle (cx cy radius)