[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.IGraphicsInfo

IGraphicsInfo Interface

Provides graphics measurement information required for workbook layout calculations.

Implement this interface when you need to provide custom text measurement information for workbook layout calculations.

Namespace: GrapeCity.Documents.Excel
Assembly: DS.Documents.Excel.dll
Syntax
public interface IGraphicsInfo
Public Interface IGraphicsInfo
Examples
class CustomGraphicsInfo : IGraphicsInfo
{
    public double GetDigitWidth(TextFormatInfo textFormat)
    {
        if ("Calibri" == textFormat.FontFamily)
        {
            return 8 * textFormat.FontSize / 11;
        }
        return 7 * textFormat.FontSize / 11;
    }
}
IGraphicsInfo graphicsInfo = new CustomGraphicsInfo();
workbook.GraphicsInfo = graphicsInfo;

Methods

Name Description
GetDigitWidth(TextFormatInfo)

Gets the maximum width of the digits 0 through 9, in device-independent pixels. Useful formulas for wrapping a native implementation that returns pixels:

[Device independent pixel] = Pixel / [DPI Scale]

[DPI Scale] = DPI / 96.