Closed ghost closed 4 years ago
`open System open Microsoft.Msagl.Drawing open Microsoft.Msagl.Layout.Layered open Microsoft.Msagl.Core.Geometry
[
edge.SourceNode.Attr.Shape <- Shape.DrawFromGeometry; edge.TargetNode.Attr.Shape <- Shape.DrawFromGeometry; edge.GeometryEdge.Source.BoundaryCurve <- Microsoft.Msagl.Core.Geometry.Curves.CurveFactory.CreateCircle(10.0, new Point()) edge.TargetNode.GeometryNode.BoundaryCurve <- Microsoft.Msagl.Core.Geometry.Curves.CurveFactory.CreateCircle(10., new Point()) use stream = new System.IO.StreamWriter(@"c:\tmp\s.svg", false) let layout = new LayeredLayout(graph.GeometryGraph, new SugiyamaLayoutSettings()) layout.Run(); let svgWriter = new SvgGraphWriter(stream.BaseStream, graph) svgWriter.Write() 0 `
This seems working, but more code needed to create the label. Usually the viewers take care of filling the geometry.
<?xml version="1.0" encoding="utf-8"?>
Ahhhh! Ok this makes sense now, a little hand-raulic but that's ok! Thank you!
On Sat, 25 Jul 2020, 3:52 am Lev Nachmanson, notifications@github.com wrote:
`open System open Microsoft.Msagl.Drawing open Microsoft.Msagl.Layout.Layered open Microsoft.Msagl.Core.Geometry
[] let main argv = let graph = new Graph("Test") let mutable edge = graph.AddEdge("a", "a to b", "b") graph.CreateGeometryGraph() // otherwise NRE in SvgGraphWriter.TransformGraphByFlippingY
edge.SourceNode.Attr.Shape <- Shape.DrawFromGeometry; edge.TargetNode.Attr.Shape <- Shape.DrawFromGeometry; edge.GeometryEdge.Source.BoundaryCurve <- Microsoft.Msagl.Core.Geometry.Curves.CurveFactory.CreateCircle(10.0, new Point()) edge.TargetNode.GeometryNode.BoundaryCurve <- Microsoft.Msagl.Core.Geometry.Curves.CurveFactory.CreateCircle(10., new Point()) use stream = new System.IO.StreamWriter(@"c:\tmp\s.svg", false) let layout = new LayeredLayout(graph.GeometryGraph, new SugiyamaLayoutSettings()) layout.Run(); let svgWriter = new SvgGraphWriter(stream.BaseStream, graph) svgWriter.Write() 0 ` This seem working, but more code needed to create the label. Usually the viewers take care of filling the geometry.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/microsoft/automatic-graph-layout/issues/248#issuecomment-663658274, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMAM73EN4EMEGOX6HLF4YA3R5HC5BANCNFSM4PGL2HTQ .
I am trying to create the simplest possible SVG rendering of a graph, using a single edge with two nodes, I have been reading sample code for the last hour, and hitting walls. Was hoping that some guidance could be provided.
This generates the following exception when svgWriter.Write() is called: