/// <summary> /// Generate the headquarters rendering for the passed in symbol. /// </summary> /// <param name="ms"> /// The military symbol for which to provide the headquarters rendering. /// </param> /// <returns> /// The graphics Shape object that represents the headquarters rendering. /// </returns> private static Shape GenerateHeadquarters(MilSymbol ms) { Rect b = ms.BaseRect; double headquartersFactor = SymbolData.GetHqFactor(ms.SymbolCode); return(new Path { Style = SymbolData.GetStyle("BS10"), Data = new PathGeometry { Figures = new PathFigureCollection { new PathFigure { // The +/- HalfWidth accounts for the Bounds being on the outside of the symbol StartPoint = new Point(b.Left + SymbolData.HalfWidth, b.Top + (headquartersFactor * b.Height)), Segments = new PathSegmentCollection { new LineSegment { Point = new Point(b.Left + SymbolData.HalfWidth, b.Bottom + (0.3 * b.Width)) } } } } } }); }