GitHubDashboard/FDG/Diagram.cs
/// <summary>
/// Determines the logical bounds of the diagram. This is used to center and scale the diagram when drawing.
/// </summary>
/// <returns>A System.Drawing.Rectangle that fits exactly around every node in the diagram.</returns>
Determines the logical bounds of the diagram. This is used to center and scale the diagram when drawing.
Determines the logical bounds of the diagram . This is used to center and scale the diagram when drawing .
private Rectangle GetDiagramBounds()
		{
			int minX = Int32.MaxValue, minY = Int32.MaxValue;
			int maxX = Int32.MinValue, maxY = Int32.MinValue;
			foreach (Node node in nodes)
			{
				if (node.X < minX) minX = (int)node.X;
				if (node.X > maxX) maxX = (int)node.X;
				if (node.Y < minY) minY = (int)node.Y;
				if (node.Y > maxY) maxY = (int)node.Y;
			}
			return Rectangle.FromLTRB(minX, minY, maxX, maxY);
		}
private Rectangle GetDiagramBounds ( ) { int minX = Int32 . MaxValue , minY = Int32 . MaxValue ; int maxX = Int32 . MinValue , maxY = Int32 . MinValue ; foreach ( Node node in nodes ) { if ( node . X < minX ) minX = ( int ) node . X ; if ( node . X > maxX ) maxX = ( int ) node . X ; if ( node . Y < minY ) minY = ( int ) node . Y ; if ( node . Y > maxY ) maxY = ( int ) node . Y ; } return Rectangle . FromLTRB ( minX , minY , maxX , maxY ) ; }
Determines the logical bounds of the diagram.
Determines the logical bounds of the diagram .
A System.Drawing.Rectangle that fits exactly around every node in the diagram.
A System . Drawing . Rectangle that fits exactly around every node in the diagram .