File tree 2 files changed +20
-1
lines changed
2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -351,7 +351,22 @@ Args:
351
351
; ; fname finished with '.pdf', remove it
352
352
(setq fname (subseq str 0 (1- (length str))))
353
353
)))
354
- (send self :write-to-file fname result-path title))
354
+ (send self :write-to-file fname result-path title " pdf" ))
355
+ (:write-to-png (fname &optional result-path
356
+ (title (string-right-trim " .png" fname)))
357
+ " write graph structure to png
358
+ Args:
359
+ fname: filename for output
360
+ result-path: list of solver-node, it's result of (send solver :solve graph)
361
+ title: title of graph
362
+ "
363
+ (when (substringp " .png" fname)
364
+ (let ((str (string-right-trim " png" fname)))
365
+ (when (= (elt str (1- (length str))) #\. )
366
+ ; ; fname finished with '.png', remove it
367
+ (setq fname (subseq str 0 (1- (length str))))
368
+ )))
369
+ (send self :write-to-file fname result-path title " png" ))
355
370
(:original-draw-mode ()
356
371
" change draw-mode to original mode"
357
372
(send self :draw-both-arc nil )
Original file line number Diff line number Diff line change 267
267
; ; write graph to pdf file
268
268
(warning-message 2 " write to /tmp/robots_in_jsk.pdf~% " )
269
269
(send g :write-to-pdf " /tmp/robots_in_jsk.pdf" nil " robots_in_jsk" )
270
+
271
+ ; ; write graph to png file
272
+ (warning-message 2 " write to /tmp/robots_in_jsk.png~% " )
273
+ (send g :write-to-png " /tmp/robots_in_jsk.png" nil " robots_in_jsk" )
270
274
g))
271
275
272
276
(eval-when (load eval )
You can’t perform that action at this time.
0 commit comments