Neco/LandView/GraphicsEngine.cs
/// <summary>Draws a district label for a given district</summary>
/// <param name="D">District to draw</param>
/// <param name="GRM">Graphcis to draw onto</param>
/// <param name="Origin">Point that defines 0,0 on the given graphics</param>
/// <param name="Background">Background color of the label</param>
/// <param name="Foreground">Foreground color of the label</param>
/// <param name="NameFont">Font used to draw the name</param>
/// <param name="InfoFont">Font used to draw the info</param>
Draws a district label for a given district
Draws a district label for a given district
public static void DrawDistrictLabel(District D, Graphics GRM, Point Origin, Color Background, Color Foreground, Font NameFont, Font InfoFont) {
            if (D.GraphicalPoints.Length == 0) { return; } 
            Point DCenter = new(
                D.LeftmostX() + Origin.X + D.Width() / 2,
                D.TopmostY() + Origin.Y + D.Height() / 2);
            DrawLabel(GRM, DCenter, D.Name, $"{D.Plots.Count} Plot(s) | {D.Area():n0}m²", Foreground, Background, NameFont, InfoFont, 2, 4);
        }
public static void DrawDistrictLabel ( District D , Graphics GRM , Point Origin , Color Background , Color Foreground , Font NameFont , Font InfoFont ) { if ( D . GraphicalPoints . Length == 0 ) { return ; } Point DCenter = new ( D . LeftmostX ( ) + Origin . X + D . Width ( ) / 2 , D . TopmostY ( ) + Origin . Y + D . Height ( ) / 2 ) ; DrawLabel ( GRM , DCenter , D . Name , $" { D . Plots . Count }  Plot(s) |  { D . Area ( ) : } m²" , oreground, ackground, ameFont, nfoFont, , ) ; }
Draws a district label for a given district
Draws a district label for a given district
//If there aren't any points then we can't do it! //Find the center of this thing
D
District
District to draw
District to draw
GRM
Graphics
Graphcis to draw onto
Graphcis to draw onto
Origin
Point
Point that defines 0,0 on the given graphics
Point that defines 0 0 on the given graphics
Background
Color
Background color of the label
Background color of the label
Foreground
Color
Foreground color of the label
Foreground color of the label
NameFont
Font
Font used to draw the name
Font used to draw the name
InfoFont
Font
Font used to draw the info
Font used to draw the info