[mcclim-devel] Drawing graphs & scaling
Andy Hefner
ahefner at gmail.com
Thu Apr 21 03:38:24 UTC 2005
This should be fixed. Let me know if you have any further problems.
On 3/22/05, Thibault Langlois <tl at di.fc.ul.pt> wrote:
>
>
> Hello,
>
> I would like to be able to scale a graph:
>
> (defmethod plot ((object tree) stream)
> (with-scaling (stream 0.7)
> (draw-graph (list (root-node object))
> #'draw-node-colors
> :stream stream)))
>
> where draw-graph is directly inspired from an example
> in allegro CLIM manual:
>
> (defun draw-graph (root-nodes draw-node-function &rest keys)
> (apply #'format-graph-from-roots
> root-nodes
> #'(lambda (node s)
> (multiple-value-bind ()
> (with-output-as-presentation (s node 'node)
> (funcall draw-node-function node s))))
> #'(lambda (n)
> (if (visible-p n)
> (children n)))
> keys))
> and draw-node-colors draws a node using draw-rectangle*.
>
> The problem is that when the scaling factor is not 1 the nodes are not
> correctly placed (although they are correctly scaled) with respect to
> arcs.
>
> Any ideas ?
>
> Thanks.
>
> Thibault
>
> _______________________________________________
> mcclim-devel mailing list
> mcclim-devel at common-lisp.net
> http://common-lisp.net/cgi-bin/mailman/listinfo/mcclim-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/mcclim-devel/attachments/20050420/150a7c1e/attachment.html>
More information about the mcclim-devel
mailing list