VintaSoft Twain .NET SDK 15.1: Documentation for .NET developer
Vintasoft.WpfTwain Namespace / Fix32 Class / ToPositiveFloat() Method
Syntax Remarks Requirements SeeAlso
In This Topic
    ToPositiveFloat() Method (Fix32)
    In This Topic
    Returns a positive float value that represents the current object.
    Syntax
    'Declaration
    
    Public Function ToPositiveFloat() As Single
    
    
    public float ToPositiveFloat()
    
    
    public: float ToPositiveFloat()
    
    
    public:
    float ToPositiveFloat()

    Return Value

    A positive float value because method interprets the Whole property as UInt16 value.
    Remarks

    TWAIN specification specifies that resolution must be a positive value. Also specification specifies that resolution value is stored in Fix32 value and this means that resolution value cannot be greater than Int16.MaxValue (32767) because the Whole property has UInt16 type. Sometimes resolution can be greater than 32767 if resolution is specified in Points or Twips.

    This method must be used if you know that this object represents the positive value, for example, for getting correct value of resolution.

    Requirements

    Target Platforms: .NET 9; .NET 8; .NET 7; .NET 6; .NET Framework 4.8, 4.7, 4.6, 4.5, 4.0, 3.5

    See Also