branch: externals/sketch-mode commit d42f84a975bf35d687224ca023749f46ee576492 Author: Daniel Nicolai <dalanico...@gmail.com> Commit: Daniel Nicolai <dalanico...@gmail.com>
Add svg and sketch group definitions --- sketch-mode.el | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/sketch-mode.el b/sketch-mode.el index 9379efd..16b9774 100644 --- a/sketch-mode.el +++ b/sketch-mode.el @@ -129,6 +129,9 @@ default: (800 . 600)." (const :tag "Arrow" 'arrow) (const :tag "Point" 'point))) + +;;; SVG-definitions + (defun svg-marker (svg id width height &optional color reverse) "Add a gradient with ID to SVG. TYPE is `linear' or `radial'. @@ -161,6 +164,20 @@ STOPS is a list of percentage/color pairs." (r . 5) (fill . ,(or color "black")))))))))) +(defun svg-group (&rest args) + (apply #'dom-node + 'g + `(,(svg--arguments nil args)))) + + +;;; Resume sketch-code + +(defun sketch-group (id &rest args) + (apply #'svg-group + :id id + :transform "translate(0 0)" + args)) + (define-minor-mode sketch-mode "Create svg images using the mouse. In sketch-mode buffer press \\[sketch-transient] to activate the