PrintDocument for WinForms | ComponentOne
C1.Win.PrintPreview.4.8 Assembly / C1.Win.C1Preview.Design Namespace / SampleC1PrintDocument Class / GetLengthAbsValue Method / GetLengthAbsValue(LengthAbs,Style,IScriptContext) Method
The length to convert. If it is expressed in C1.C1Preview.UnitTypeEnum.Default, the current document's C1.C1Preview.C1PrintDocument.DefaultUnit units are used.
The C1.C1Preview.C1PrintDocument.Style providing the font, required if length is expressed in C1.C1Preview.UnitTypeEnum.Em, C1.C1Preview.UnitTypeEnum.Ex or C1.C1Preview.UnitTypeEnum.LineSpacing (otherwise, it can be null).
C1.C1Preview.Scripting.IScriptContext that should be used to get calculated properties.

In This Topic
    GetLengthAbsValue(LengthAbs,Style,IScriptContext) Method
    In This Topic
    Converts an absolute length represented by a C1.C1Preview.LengthAbs object to a double value expressed in the current document's C1.C1Preview.C1PrintDocument.ResolvedUnit units.
    Syntax
    'Declaration
     
    Public Overloads Function GetLengthAbsValue( _
       ByVal length As LengthAbs, _
       ByVal style As Style, _
       ByVal context As IScriptContext _
    ) As Double
    public double GetLengthAbsValue( 
       LengthAbs length,
       Style style,
       IScriptContext context
    )

    Parameters

    length
    The length to convert. If it is expressed in C1.C1Preview.UnitTypeEnum.Default, the current document's C1.C1Preview.C1PrintDocument.DefaultUnit units are used.
    style
    The C1.C1Preview.C1PrintDocument.Style providing the font, required if length is expressed in C1.C1Preview.UnitTypeEnum.Em, C1.C1Preview.UnitTypeEnum.Ex or C1.C1Preview.UnitTypeEnum.LineSpacing (otherwise, it can be null).
    context
    C1.C1Preview.Scripting.IScriptContext that should be used to get calculated properties.

    Return Value

    The converted double value.
    See Also