Neco/LandView/GraphicsEngine.cs
/// <summary>Draws the outline of a given Plot</summary>
/// <param name="P">Plot to draw</param>
/// <param name="GRM">Graphcis to draw onto</param>
/// <param name="Origin">Point that defines 0,0 on the given graphcis</param>
/// <param name="PlotPen">Pen to draw the outline with</param>
Draws the outline of a given Plot
Draws the outline of a given Plot
public static void DrawPlotOutline(Plot P, Graphics GRM, Point Origin, Pen PlotPen) {
            if (P.GraphicalPoints.Length < 2) { return; } 
            for (int i = 0; i < P.GraphicalPoints.Length - 1; i++) {
                GRM.DrawLine(PlotPen, OffsetPoint(Origin, P.GraphicalPoints[i]), OffsetPoint(Origin, P.GraphicalPoints[i + 1]));
            }
            GRM.DrawLine(PlotPen, OffsetPoint(Origin, P.GraphicalPoints.First()), OffsetPoint(Origin, P.GraphicalPoints.Last()));
        }
public static void DrawPlotOutline ( Plot P , Graphics GRM , Point Origin , Pen PlotPen ) { if ( P . GraphicalPoints . Length < 2 ) { return ; } for ( int i = 0 ; i < P . GraphicalPoints . Length - 1 ; i ++ ) { GRM . DrawLine ( PlotPen , OffsetPoint ( Origin , P . GraphicalPoints [ i ] ) , OffsetPoint ( Origin , P . GraphicalPoints [ i + 1 ] ) ) ; } GRM . DrawLine ( PlotPen , OffsetPoint ( Origin , P . GraphicalPoints . First ( ) ) , OffsetPoint ( Origin , P . GraphicalPoints . Last ( ) ) ) ; }
Draws the outline of a given Plot
Draws the outline of a given Plot
//If it's less than 2 then we can't //Draw a line from the last point to the first point
P
Plot
Plot to draw
Plot to draw
GRM
Graphics
Graphcis to draw onto
Graphcis to draw onto
Origin
Point
Point that defines 0,0 on the given graphcis
Point that defines 0 0 on the given graphcis
PlotPen
Pen
Pen to draw the outline with
Pen to draw the outline with