Class GraphicsTypeExtensions
Definition
- Namespace:
- Tizen.NUI
- Assembly:
- Tizen.NUI.dll
The GraphicTypeExtensions class is graphics type converter for pixel based object. Density independent pixel(dp) unit is our basic target type and you can get converted value by PxToDp(), and you can get original pixel by PxToDp(). One dp is a virtual pixel unit that's roughly equal to one pixel on a medium-density(160dpi) screen. See GraphicsTypeManager and GraphicsTypeConverter also.
C#Copypublic static class GraphicsTypeExtensions : object
- Inheritance
-
GraphicsTypeExtensions
Methods
Declaration
C#Copypublic static float DpToPt(this float dp)
Parameters
Type | Name | Description |
---|---|---|
Single | dp | The float dp unit value to be converted point unit. |
Returns
Type | Description |
---|---|
Single | The float point unit value. |
Declaration
C#Copypublic static int DpToPx(this int dp)
Parameters
Type | Name | Description |
---|---|---|
Int32 | dp | The int dp unit value to be converted pixel unit. |
Returns
Type | Description |
---|---|
Int32 | The int pixel unit value. |
Declaration
C#Copypublic static float DpToPx(this float dp)
Parameters
Type | Name | Description |
---|---|---|
Single | dp | The float dp unit value to be converted pixel unit. |
Returns
Type | Description |
---|---|
Single | The float pixel unit value. |
Declaration
C#Copypublic static Extents DpToPx(this Extents dp)
Parameters
Type | Name | Description |
---|---|---|
Extents | dp | The Extents dp unit value to be converted pixel unit. |
Returns
Type | Description |
---|---|
Extents | The Extents pixel unit value. |
Declaration
C#Copypublic static Position DpToPx(this Position dp)
Parameters
Type | Name | Description |
---|---|---|
Position | dp | The Position dp unit value to be converted pixel unit. |
Returns
Type | Description |
---|---|
Position | The Position pixel unit value. |
Declaration
C#Copypublic static Position2D DpToPx(this Position2D dp)
Parameters
Type | Name | Description |
---|---|---|
Position2D | dp | The Position2D dp unit value to be converted pixel unit. |
Returns
Type | Description |
---|---|
Position2D | The Position2D pixel unit value. |
Declaration
C#Copypublic static Rectangle DpToPx(this Rectangle dp)
Parameters
Type | Name | Description |
---|---|---|
Rectangle | dp | The Rectangle dp unit value to be converted pixel unit. |
Returns
Type | Description |
---|---|
Rectangle | The Rectangle pixel unit value. |
Declaration
C#Copypublic static Size DpToPx(this Size dp)
Parameters
Type | Name | Description |
---|---|---|
Size | dp | The Size dp unit value to be converted pixel unit. |
Returns
Type | Description |
---|---|
Size | The Size pixel unit value. |
Declaration
C#Copypublic static Size2D DpToPx(this Size2D dp)
Parameters
Type | Name | Description |
---|---|---|
Size2D | dp | The Size2D dp unit value to be converted pixel unit. |
Returns
Type | Description |
---|---|
Size2D | The Size2D pixel unit value. |
Declaration
C#Copypublic static float PtToDp(this float pt)
Parameters
Type | Name | Description |
---|---|---|
Single | pt | The float point unit value to be converted dp unit. |
Returns
Type | Description |
---|---|
Single | The float dp unit value. |
Declaration
C#Copypublic static float PtToPx(this float pt)
Parameters
Type | Name | Description |
---|---|---|
Single | pt | The float point unit value to be converted pixel unit. |
Returns
Type | Description |
---|---|
Single | The float pixel unit value. |
Declaration
C#Copypublic static float PtToSp(this float pt)
Parameters
Type | Name | Description |
---|---|---|
Single | pt | The float point unit value to be converted sp unit. |
Returns
Type | Description |
---|---|
Single | The float dp unit value. |
Declaration
C#Copypublic static int PxToDp(this int pixel)
Parameters
Type | Name | Description |
---|---|---|
Int32 | pixel | The int pixel unit value to be converted dp unit. |
Returns
Type | Description |
---|---|
Int32 | The int dp unit value. |
Declaration
C#Copypublic static float PxToDp(this float pixel)
Parameters
Type | Name | Description |
---|---|---|
Single | pixel | The float pixel unit value to be converted dp unit. |
Returns
Type | Description |
---|---|
Single | The float dp unit value. |
Declaration
C#Copypublic static Extents PxToDp(this Extents pixel)
Parameters
Type | Name | Description |
---|---|---|
Extents | pixel | The Extents pixel unit value to be converted dp unit. |
Returns
Type | Description |
---|---|
Extents | The Extents dp unit value. |
Declaration
C#Copypublic static Position PxToDp(this Position pixel)
Parameters
Type | Name | Description |
---|---|---|
Position | pixel | The Position pixel unit value to be converted dp unit. |
Returns
Type | Description |
---|---|
Position | The Position dp unit value. |
Declaration
C#Copypublic static Position2D PxToDp(this Position2D pixel)
Parameters
Type | Name | Description |
---|---|---|
Position2D | pixel | The Position2D pixel unit value to be converted dp unit. |
Returns
Type | Description |
---|---|
Position2D | The Position2D dp unit value. |
Declaration
C#Copypublic static Rectangle PxToDp(this Rectangle pixel)
Parameters
Type | Name | Description |
---|---|---|
Rectangle | pixel | The Rectangle pixel unit value to be converted dp unit. |
Returns
Type | Description |
---|---|
Rectangle | The Rectangle dp unit value. |
Declaration
C#Copypublic static Size PxToDp(this Size pixel)
Parameters
Type | Name | Description |
---|---|---|
Size | pixel | The Size pixel unit value to be converted dp unit. |
Returns
Type | Description |
---|---|
Size | The Size dp unit value. |
Declaration
C#Copypublic static Size2D PxToDp(this Size2D pixel)
Parameters
Type | Name | Description |
---|---|---|
Size2D | pixel | The Size2D pixel unit value to be converted dp unit. |
Returns
Type | Description |
---|---|
Size2D | The Size2D dp unit value. |
Declaration
C#Copypublic static float PxToPt(this float pixel)
Parameters
Type | Name | Description |
---|---|---|
Single | pixel | The float pixel unit value to be converted point unit. |
Returns
Type | Description |
---|---|
Single | The float point unit value. |
Declaration
C#Copypublic static int PxToSp(this int pixel)
Parameters
Type | Name | Description |
---|---|---|
Int32 | pixel | The int pixel unit value to be converted sp unit. |
Returns
Type | Description |
---|---|
Int32 | The int sp unit value. |
Declaration
C#Copypublic static float PxToSp(this float pixel)
Parameters
Type | Name | Description |
---|---|---|
Single | pixel | The float pixel unit value to be converted sp unit. |
Returns
Type | Description |
---|---|
Single | The float sp unit value. |
Declaration
C#Copypublic static Extents PxToSp(this Extents pixel)
Parameters
Type | Name | Description |
---|---|---|
Extents | pixel | The Extents pixel unit value to be converted sp unit. |
Returns
Type | Description |
---|---|
Extents | The Extents sp unit value. |
Declaration
C#Copypublic static Position PxToSp(this Position pixel)
Parameters
Type | Name | Description |
---|---|---|
Position | pixel | The Position pixel unit value to be converted sp unit. |
Returns
Type | Description |
---|---|
Position | The Position sp unit value. |
Declaration
C#Copypublic static Position2D PxToSp(this Position2D pixel)
Parameters
Type | Name | Description |
---|---|---|
Position2D | pixel | The Position2D pixel unit value to be converted sp unit. |
Returns
Type | Description |
---|---|
Position2D | The Position2D sp unit value. |
Declaration
C#Copypublic static Rectangle PxToSp(this Rectangle pixel)
Parameters
Type | Name | Description |
---|---|---|
Rectangle | pixel | The Rectangle pixel unit value to be converted sp unit. |
Returns
Type | Description |
---|---|
Rectangle | The Rectangle sp unit value. |
Declaration
C#Copypublic static Size PxToSp(this Size pixel)
Parameters
Type | Name | Description |
---|---|---|
Size | pixel | The Size pixel unit value to be converted sp unit. |
Returns
Type | Description |
---|---|
Size | The Size sp unit value. |
Declaration
C#Copypublic static Size2D PxToSp(this Size2D pixel)
Parameters
Type | Name | Description |
---|---|---|
Size2D | pixel | The Size2D pixel unit value to be converted sp unit. |
Returns
Type | Description |
---|---|
Size2D | The Size2D sp unit value. |
Declaration
C#Copypublic static float SpToPt(this float sp)
Parameters
Type | Name | Description |
---|---|---|
Single | sp | The float sp unit value to be converted point unit. |
Returns
Type | Description |
---|---|
Single | The float point unit value. |
Declaration
C#Copypublic static int SpToPx(this int sp)
Parameters
Type | Name | Description |
---|---|---|
Int32 | sp | The int sp unit value to be converted pixel unit. |
Returns
Type | Description |
---|---|
Int32 | The int pixel unit value. |
Declaration
C#Copypublic static float SpToPx(this float sp)
Parameters
Type | Name | Description |
---|---|---|
Single | sp | The float sp unit value to be converted pixel unit. |
Returns
Type | Description |
---|---|
Single | The float pixel unit value. |
Declaration
C#Copypublic static Extents SpToPx(this Extents sp)
Parameters
Type | Name | Description |
---|---|---|
Extents | sp | The Extents sp unit value to be converted pixel unit. |
Returns
Type | Description |
---|---|
Extents | The Extents pixel unit value. |
Declaration
C#Copypublic static Position SpToPx(this Position sp)
Parameters
Type | Name | Description |
---|---|---|
Position | sp | The Position sp unit value to be converted pixel unit. |
Returns
Type | Description |
---|---|
Position | The Position pixel unit value. |
Declaration
C#Copypublic static Position2D SpToPx(this Position2D sp)
Parameters
Type | Name | Description |
---|---|---|
Position2D | sp | The Position2D sp unit value to be converted pixel unit. |
Returns
Type | Description |
---|---|
Position2D | The Position2D pixel unit value. |
Declaration
C#Copypublic static Rectangle SpToPx(this Rectangle sp)
Parameters
Type | Name | Description |
---|---|---|
Rectangle | sp | The Rectangle sp unit value to be converted pixel unit. |
Returns
Type | Description |
---|---|
Rectangle | The Rectangle pixel unit value. |
Declaration
C#Copypublic static Size SpToPx(this Size sp)
Parameters
Type | Name | Description |
---|---|---|
Size | sp | The Size sp unit value to be converted pixel unit. |
Returns
Type | Description |
---|---|
Size | The Size pixel unit value. |
Declaration
C#Copypublic static Size2D SpToPx(this Size2D sp)
Parameters
Type | Name | Description |
---|---|---|
Size2D | sp | The Size2D sp unit value to be converted pixel unit. |
Returns
Type | Description |
---|---|
Size2D | The Size2D pixel unit value. |