PurplePen.DescriptionCourseObj.GetRect C# (CSharp) Method

GetRect() static private method

static private GetRect ( PointF topLeft, float cellSize, SymbolDB symbolDB, DescriptionLine description, DescriptionKind kind, int numColumns ) : RectangleF
topLeft System.Drawing.PointF
cellSize float
symbolDB SymbolDB
description DescriptionLine
kind DescriptionKind
numColumns int
return System.Drawing.RectangleF
        static RectangleF GetRect(PointF topLeft, float cellSize, SymbolDB symbolDB, DescriptionLine[] description, DescriptionKind kind, int numColumns)
        {
            // Create the renderer.
            DescriptionRenderer renderer = new DescriptionRenderer(symbolDB);
            renderer.Description = description;
            renderer.DescriptionKind = kind;
            renderer.Margin = cellSize / 20;   // about the thickness of the thick lines.
            renderer.CellSize = cellSize;
            renderer.NumberOfColumns = numColumns;

            SizeF size = renderer.Measure();
            return new RectangleF(topLeft.X, topLeft.Y - size.Height, size.Width, size.Height);
        }