X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=dev%2Fgraphviz%2Fgraphviz-support.lisp;h=4b3bbd33384642ec7ac61d57249cc94d4915375e;hb=dfe1ca9987337cf9e8ad32aa44d6a55c0d8a7c75;hp=e07e661cbe829be5176ad2f820c40e6fb91e2430;hpb=b621ac7a68fbf0d4ee562c4b2eeb7b6d707efa81;p=cl-graph.git diff --git a/dev/graphviz/graphviz-support.lisp b/dev/graphviz/graphviz-support.lisp index e07e661..4b3bbd3 100644 --- a/dev/graphviz/graphviz-support.lisp +++ b/dev/graphviz/graphviz-support.lisp @@ -321,7 +321,7 @@ B--D [] (defclass* dot-edge-mixin (dot-attributes-mixin) () (:export-p t)) -(defclass* dot-graph (graph-container dot-graph-mixin) +(defclass* dot-graph (dot-graph-mixin graph-container) () (:default-initargs :vertex-class 'dot-vertex @@ -329,18 +329,18 @@ B--D [] :undirected-edge-class 'dot-edge) (:export-p t)) -(defclass* dot-vertex (graph-container-vertex dot-vertex-mixin) () +(defclass* dot-vertex (dot-vertex-mixin graph-container-vertex) () (:export-p t)) -(defclass* dot-edge (graph-container-edge dot-edge-mixin) () +(defclass* dot-edge (dot-edge-mixin graph-container-edge) () (:export-p t)) -(defclass* dot-directed-edge (directed-edge-mixin dot-edge) () +(defclass* dot-directed-edge (dot-edge directed-edge-mixin) () (:export-p t)) -(defmethod (setf dot-attribute) :before (value (attr symbol) (thing dot-attributes-mixin)) +(defmethod (setf dot-attribute-value) :before (value (attr symbol) (thing dot-attributes-mixin)) (ensure-valid-dot-attribute attr thing)) -(defmethod (setf dot-attribute) (value (attr symbol) (thing dot-attributes-mixin)) +(defmethod (setf dot-attribute-value) (value (attr symbol) (thing dot-attributes-mixin)) (setf (getf (dot-attributes thing) attr) value)) (defmethod dot-attribute-value ((attr symbol) (thing dot-attributes-mixin)) @@ -392,7 +392,7 @@ B--D [] (princ el str) (setf first nil))) (princ "\"" str))) - ((member spline bounding-box) + ((member spline) (with-output-to-string (str) (princ "\"" str) (let ((first t)) @@ -404,6 +404,18 @@ B--D [] (princ (second el) str) (setf first nil))) (princ "\"" str))) + ((member bounding-box) + (with-output-to-string (str) + (princ "\"" str) + (let ((first t)) + (dolist (el value) + (unless first + (princ ", " str)) + (princ (first el) str) + (princ "," str) + (princ (second el) str) + (setf first nil))) + (princ "\"" str))) ((member integer) (unless (typep value 'integer) (error "Invalid value for ~S: ~S is not an integer"