Skip to main content

DXGraphicsUnitConverter Class

Graphics unit conversion utilities.

Declaration

public class DXGraphicsUnitConverter extends JavaObject

Inherited Members

com.devexpress.system.JavaObject.clone()
com.devexpress.system.JavaObject.equals(java.lang.Object)
com.devexpress.system.JavaObject.hashCode()
com.devexpress.system.JavaObject.initFields()
com.devexpress.system.JavaObject.memberwiseClone()
com.devexpress.system.JavaObject.toString()
java.lang.Object.finalize()
java.lang.Object.getClass()
java.lang.Object.notify()
java.lang.Object.notifyAll()
java.lang.Object.wait()
java.lang.Object.wait(long)
java.lang.Object.wait(long,int)

Inheritance

Object
com.devexpress.system.JavaObject
DXGraphicsUnitConverter

DXGraphicsUnitConverter()

Initializes a new instance of the DXGraphicsUnitConverter class.

Declaration

public DXGraphicsUnitConverter()

Methods

convert(DXMargins margins, float fromDpi, float toDpi) Method

Converts the specified margins from one DPI to another.

Declaration

public static DXMargins convert(DXMargins margins, float fromDpi, float toDpi)

Parameters

Name Type Description
margins DXMargins

The margins.

fromDpi float

The source DPI value.

toDpi float

The target DPI value.

Returns

Type Description
DXMargins

The converted DXMargins object.

convert(float val, DXGraphicsUnit fromUnit, DXGraphicsUnit toUnit) Method

Converts the specified value to another graphics unit.

Declaration

public static float convert(float val, DXGraphicsUnit fromUnit, DXGraphicsUnit toUnit)

Parameters

Name Type Description
val float

The value.

fromUnit DXGraphicsUnit

The source graphics unit.

toUnit DXGraphicsUnit

The target graphics unit.

Returns

Type Description
float

The converted value.

convert(float val, float fromDpi, float toDpi) Method

Converts the specified value from one DPI to another.

Declaration

public static float convert(float val, float fromDpi, float toDpi)

Parameters

Name Type Description
val float

The value.

fromDpi float

The source DPI value.

toDpi float

The target DPI value.

Returns

Type Description
float

The converted value.

convert(int val, float fromDpi, float toDpi) Method

Converts the specified value from one DPI to another.

Declaration

public static int convert(int val, float fromDpi, float toDpi)

Parameters

Name Type Description
val int

The value.

fromDpi float

The source DPI value.

toDpi float

The target DPI value.

Returns

Type Description
int

The converted value.

convert(PointF point, DXGraphicsUnit fromUnit, DXGraphicsUnit toUnit) Method

Converts the specified point to another graphics unit.

Declaration

public static PointF convert(PointF point, DXGraphicsUnit fromUnit, DXGraphicsUnit toUnit)

Parameters

Name Type Description
point com.devexpress.system.drawing.PointF

The point.

fromUnit DXGraphicsUnit

The source graphics unit.

toUnit DXGraphicsUnit

The target graphics unit.

Returns

Type Description
com.devexpress.system.drawing.PointF

The converted PointF value.

convert(PointF point, float fromDpi, float toDpi) Method

Converts the specified point from one DPI to another.

Declaration

public static PointF convert(PointF point, float fromDpi, float toDpi)

Parameters

Name Type Description
point com.devexpress.system.drawing.PointF

The point.

fromDpi float

The source DPI value.

toDpi float

The target DPI value.

Returns

Type Description
com.devexpress.system.drawing.PointF

The converted PointF value.

convert(RectangleF rect, DXGraphicsUnit fromUnit, DXGraphicsUnit toUnit) Method

Converts the specified rectangle to another graphics unit.

Declaration

public static RectangleF convert(RectangleF rect, DXGraphicsUnit fromUnit, DXGraphicsUnit toUnit)

Parameters

Name Type Description
rect RectangleF

The rectangle.

fromUnit DXGraphicsUnit

The source graphics unit.

toUnit DXGraphicsUnit

The target graphics unit.

Returns

Type Description
RectangleF

The converted RectangleF value.

convert(RectangleF rect, float fromDpi, float toDpi) Method

Converts the specified rectangle from one DPI to another.

Declaration

public static RectangleF convert(RectangleF rect, float fromDpi, float toDpi)

Parameters

Name Type Description
rect RectangleF

The rectangle.

fromDpi float

The source DPI value.

toDpi float

The target DPI value.

Returns

Type Description
RectangleF

The converted RectangleF value.

convert(Size size, float fromDpi, float toDpi) Method

Converts the specified size from one DPI to another.

Declaration

public static Size convert(Size size, float fromDpi, float toDpi)

Parameters

Name Type Description
size Size

The size.

fromDpi float

The source DPI value.

toDpi float

The target DPI value.

Returns

Type Description
Size

The converted Size value.

convert(SizeF size, DXGraphicsUnit fromUnit, DXGraphicsUnit toUnit) Method

Converts the specified size to another graphics unit.

Declaration

public static SizeF convert(SizeF size, DXGraphicsUnit fromUnit, DXGraphicsUnit toUnit)

Parameters

Name Type Description
size

The size.

fromUnit DXGraphicsUnit

The source graphics unit.

toUnit DXGraphicsUnit

The target graphics unit.

Returns

Type Description

The converted SizeF value.

convert(SizeF size, float fromDpi, float toDpi) Method

Converts the specified size from one DPI to another.

Declaration

public static SizeF convert(SizeF size, float fromDpi, float toDpi)

Parameters

Name Type Description
size

The size.

fromDpi float

The source DPI value.

toDpi float

The target DPI value.

Returns

Type Description

The converted SizeF value.