Smrf.NodeXL.ExcelTemplate.LegendControlBase.MeasureTextWidth C# (CSharp) Method

MeasureTextWidth() protected method

protected MeasureTextWidth ( DrawingObjects oDrawingObjects, String sText ) : Int32
oDrawingObjects DrawingObjects
sText String
return System.Int32
    MeasureTextWidth
    (
        DrawingObjects oDrawingObjects,
        String sText
    )
    {
        Debug.Assert(oDrawingObjects != null);
        Debug.Assert( !String.IsNullOrEmpty(sText) );
        AssertValid();

        return ( (Int32)Math.Ceiling(oDrawingObjects.Graphics.MeasureString(
            sText, oDrawingObjects.Font).Width) );
    }