SharpNeat.View.Graph.IOGraphPainter.PaintNetwork C# (CSharp) Метод

PaintNetwork() публичный Метод

Paints the provided IOGraph onto the provided GDI+ Graphics drawing surface.
public PaintNetwork ( IOGraph graph, Graphics g, Rectangle viewportArea, float zoomFactor ) : void
graph IOGraph
g System.Drawing.Graphics
viewportArea System.Drawing.Rectangle
zoomFactor float
Результат void
        public void PaintNetwork(IOGraph graph, Graphics g, Rectangle viewportArea, float zoomFactor)
        {
            // Create a PaintState object. This holds all temporary state info for the painting routines.
            // Pass the call on to the virtual PaintNetwork. This allows us to override a version of PaintNetwork 
            // that has access to a PaintState object.
            PaintState state = new PaintState(g, viewportArea, zoomFactor, graph.ConnectionWeightRange);
            PaintNetwork(graph, state);
        }

Same methods

IOGraphPainter::PaintNetwork ( IOGraph graph, PaintState state ) : void

Usage Example

 /// <summary>
 /// Paints the wrapped IOGraph onto the specified viewport. Does nothing if no
 /// IOGraph has been provided.
 /// </summary>
 public void Paint(Graphics g, Rectangle viewportArea, float zoomFactor)
 {
     if (null != _graph)
     {
         _layoutManager.Layout(_graph, viewportArea.Size);
         _graphPainter.PaintNetwork(_graph, g, viewportArea, zoomFactor);
     }
 }