CodeCarvings.Piczard
GetRoundedValue Method
See Also  Send Feedback
CodeCarvings.Piczard Namespace > RelMeasure Class : GetRoundedValue Method

baseValue
The base value to which the percent rate of the Value is applied.
baseUnit
The graphics unit in which the base value is expressed.
unit
The graphics unit in which the value must be converted.
resolution
The resolution expressed in DPI (Dots Per Inch).
Computes the absolute value of the RelMeasure, converts it to the specified graphics unit and then round it to the nearest integer.

Syntax

Visual Basic (Declaration)  
Public Function GetRoundedValue( _
   ByVal baseValue As Single, _
   ByVal baseUnit As GfxUnit, _
   ByVal unit As GfxUnit, _
   ByVal resolution As Single _
) As Integer
C#  
public int GetRoundedValue( 
   float baseValue,
   GfxUnit baseUnit,
   GfxUnit unit,
   float resolution
)

Parameters

baseValue
The base value to which the percent rate of the Value is applied.
baseUnit
The graphics unit in which the base value is expressed.
unit
The graphics unit in which the value must be converted.
resolution
The resolution expressed in DPI (Dots Per Inch).

Return Value

The calculated measurement converted to the chosen graphics unit and then rounded it to the nearest integer.

Requirements

Platforms: Windows 8, Windows 7, Windows Vista, Windows XP Professional, Windows 2000 - Windows Server family: 2012, 2008.R2, 2008, 2003, 2000

See Also

©2013 Sergio Turolla. All Rights Reserved.