C# Class SharpNeat.View.Graph.IOGraphPainter

Paints IOGraphs to a GDI+ Graphics object.
Afficher le fichier Open project: colgreen/sharpneat Class Usage Examples

Protected Properties

Свойство Type Description
__brushBlack System.Drawing.Brush
__brushNodeFill System.Drawing.Brush
__fontNodeTag System.Drawing.Font
__penBlack System.Drawing.Pen
_connectionNegative Color
_connectionPositive Color

Méthodes publiques

Méthode Description
PaintNetwork ( IOGraph graph, Graphics g, Rectangle viewportArea, float zoomFactor ) : void

Paints the provided IOGraph onto the provided GDI+ Graphics drawing surface.

Méthodes protégées

Méthode Description
IsPointWithinViewport ( Point p, PaintState state ) : bool

Indicates if a point is within the graphics area represented by the viewport. That is, does an element at this position need to be painted.

ModelToViewport ( Point p, PaintState state ) : Point

Converts from a model coordinate to a viewport coordinate.

PaintNetwork ( IOGraph graph, PaintState state ) : void

Paints the provided IOGraph onto the current GDI+ Graphics drawing surface.

PaintNode ( GraphNode node, PaintState state ) : void

Paints a single graph node.

Private Methods

Méthode Description
PaintBackConnection ( Pen pen, Point srcPos, Point tgtPos, ConnectionPointInfo srcInfo, ConnectionPointInfo tgtInfo, PaintState state ) : void
PaintConnection ( GraphConnection con, PaintState state ) : void
PaintConnections ( IList nodeList, PaintState state ) : void
PaintNodes ( IList nodeList, PaintState state ) : void

Method Details

IsPointWithinViewport() protected méthode

Indicates if a point is within the graphics area represented by the viewport. That is, does an element at this position need to be painted.
protected IsPointWithinViewport ( Point p, PaintState state ) : bool
p Point
state PaintState
Résultat bool

ModelToViewport() protected méthode

Converts from a model coordinate to a viewport coordinate.
protected ModelToViewport ( Point p, PaintState state ) : Point
p Point
state PaintState
Résultat Point

PaintNetwork() public méthode

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
Résultat void

PaintNetwork() protected méthode

Paints the provided IOGraph onto the current GDI+ Graphics drawing surface.
protected PaintNetwork ( IOGraph graph, PaintState state ) : void
graph IOGraph
state PaintState
Résultat void

PaintNode() protected méthode

Paints a single graph node.
protected PaintNode ( GraphNode node, PaintState state ) : void
node GraphNode
state PaintState
Résultat void

Property Details

__brushBlack protected_oe static_oe property

Black brush
protected static Brush,System.Drawing __brushBlack
Résultat System.Drawing.Brush

__brushNodeFill protected_oe static_oe property

Brush for node fill color.
protected static Brush,System.Drawing __brushNodeFill
Résultat System.Drawing.Brush

__fontNodeTag protected_oe static_oe property

Font for drawing text on the viewport.
protected static Font,System.Drawing __fontNodeTag
Résultat System.Drawing.Font

__penBlack protected_oe static_oe property

Black pen for node borders.
protected static Pen,System.Drawing __penBlack
Résultat System.Drawing.Pen

_connectionNegative protected_oe static_oe property

Pen for drawing connections with negative connection weight.
protected static Color _connectionNegative
Résultat Color

_connectionPositive protected_oe static_oe property

Pen for drawing connections with positive connection weight.
protected static Color _connectionPositive
Résultat Color