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.

    public static class GraphicsTypeExtensions
    Inheritance
    object
    GraphicsTypeExtensions

    Methods

    View Source

    DpToPt(float)

    Converter float font dp size to point size. 16.0f.DpToPt() = 7.2f.

    Declaration
    public static float DpToPt(this float dp)
    Parameters
    Type Name Description
    float dp

    The float dp unit value to be converted point unit.

    Returns
    Type Description
    float

    The float point unit value.

    View Source

    DpToPx(int)

    Converter int dp to pixel.

    Declaration
    public static int DpToPx(this int dp)
    Parameters
    Type Name Description
    int dp

    The int dp unit value to be converted pixel unit.

    Returns
    Type Description
    int

    The int pixel unit value.

    View Source

    DpToPx(float)

    Converter float dp to pixel.

    Declaration
    public static float DpToPx(this float dp)
    Parameters
    Type Name Description
    float dp

    The float dp unit value to be converted pixel unit.

    Returns
    Type Description
    float

    The float pixel unit value.

    View Source

    DpToPx(Extents)

    Converter Extents dp to pixel.

    Declaration
    public 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.

    View Source

    DpToPx(Position)

    Converter Position dp to pixel.

    Declaration
    public 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.

    View Source

    DpToPx(Position2D)

    Converter Position2D dp to pixel.

    Declaration
    public 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.

    View Source

    DpToPx(Rectangle)

    Converter Rectangle dp to pixel.

    Declaration
    public 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.

    View Source

    DpToPx(Size)

    Converter Size dp to pixel.

    Declaration
    public 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.

    View Source

    DpToPx(Size2D)

    Converter Size2D dp to pixel.

    Declaration
    public 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.

    View Source

    PtToDp(float)

    Converter float font point size to dp size. 7.2f.PtToDp() = 16.0f.

    Declaration
    public static float PtToDp(this float pt)
    Parameters
    Type Name Description
    float pt

    The float point unit value to be converted dp unit.

    Returns
    Type Description
    float

    The float dp unit value.

    View Source

    PtToPx(float)

    Converter float font point size to pixel size.

    Declaration
    public static float PtToPx(this float pt)
    Parameters
    Type Name Description
    float pt

    The float point unit value to be converted pixel unit.

    Returns
    Type Description
    float

    The float pixel unit value.

    View Source

    PtToSp(float)

    Converter float font point size to sp size.

    Declaration
    public static float PtToSp(this float pt)
    Parameters
    Type Name Description
    float pt

    The float point unit value to be converted sp unit.

    Returns
    Type Description
    float

    The float dp unit value.

    View Source

    PxToDp(int)

    Converter int pixel to dp.

    Declaration
    public static int PxToDp(this int pixel)
    Parameters
    Type Name Description
    int pixel

    The int pixel unit value to be converted dp unit.

    Returns
    Type Description
    int

    The int dp unit value.

    View Source

    PxToDp(float)

    Converter float pixel to dp.

    Declaration
    public static float PxToDp(this float pixel)
    Parameters
    Type Name Description
    float pixel

    The float pixel unit value to be converted dp unit.

    Returns
    Type Description
    float

    The float dp unit value.

    View Source

    PxToDp(Extents)

    Converter Extents pixel to dp.

    Declaration
    public 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.

    View Source

    PxToDp(Position)

    Converter Position pixel to dp.

    Declaration
    public 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.

    View Source

    PxToDp(Position2D)

    Converter Position2D pixel to dp.

    Declaration
    public 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.

    View Source

    PxToDp(Rectangle)

    Converter Rectangle pixel to dp.

    Declaration
    public 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.

    View Source

    PxToDp(Size)

    Converter Size pixel to dp.

    Declaration
    public 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.

    View Source

    PxToDp(Size2D)

    Converter Size2D pixel to dp.

    Declaration
    public 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.

    View Source

    PxToPt(float)

    Converter float font pixel size to point size.

    Declaration
    public static float PxToPt(this float pixel)
    Parameters
    Type Name Description
    float pixel

    The float pixel unit value to be converted point unit.

    Returns
    Type Description
    float

    The float point unit value.

    View Source

    PxToSp(int)

    Converter int pixel to sp.

    Declaration
    public static int PxToSp(this int pixel)
    Parameters
    Type Name Description
    int pixel

    The int pixel unit value to be converted sp unit.

    Returns
    Type Description
    int

    The int sp unit value.

    View Source

    PxToSp(float)

    Converter float pixel to sp.

    Declaration
    public static float PxToSp(this float pixel)
    Parameters
    Type Name Description
    float pixel

    The float pixel unit value to be converted sp unit.

    Returns
    Type Description
    float

    The float sp unit value.

    View Source

    PxToSp(Extents)

    Converter Extents pixel to sp.

    Declaration
    public 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.

    View Source

    PxToSp(Position)

    Converter Position pixel to sp.

    Declaration
    public 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.

    View Source

    PxToSp(Position2D)

    Converter Position2D pixel to sp.

    Declaration
    public 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.

    View Source

    PxToSp(Rectangle)

    Converter Rectangle pixel to sp.

    Declaration
    public 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.

    View Source

    PxToSp(Size)

    Converter Size pixel to sp.

    Declaration
    public 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.

    View Source

    PxToSp(Size2D)

    Converter Size2D pixel to sp.

    Declaration
    public 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.

    View Source

    SpToPt(float)

    Converter float font sp size to point size.

    Declaration
    public static float SpToPt(this float sp)
    Parameters
    Type Name Description
    float sp

    The float sp unit value to be converted point unit.

    Returns
    Type Description
    float

    The float point unit value.

    View Source

    SpToPx(int)

    Converter int dp to pixel.

    Declaration
    public static int SpToPx(this int sp)
    Parameters
    Type Name Description
    int sp

    The int sp unit value to be converted pixel unit.

    Returns
    Type Description
    int

    The int pixel unit value.

    View Source

    SpToPx(float)

    Converter float sp to pixel.

    Declaration
    public static float SpToPx(this float sp)
    Parameters
    Type Name Description
    float sp

    The float sp unit value to be converted pixel unit.

    Returns
    Type Description
    float

    The float pixel unit value.

    View Source

    SpToPx(Extents)

    Converter Extents sp to pixel.

    Declaration
    public 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.

    View Source

    SpToPx(Position)

    Converter Position sp to pixel.

    Declaration
    public 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.

    View Source

    SpToPx(Position2D)

    Converter Position2D sp to pixel.

    Declaration
    public 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.

    View Source

    SpToPx(Rectangle)

    Converter Rectangle sp to pixel.

    Declaration
    public 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.

    View Source

    SpToPx(Size)

    Converter Size sp to pixel.

    Declaration
    public 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.

    View Source

    SpToPx(Size2D)

    Converter Size2D sp to pixel.

    Declaration
    public 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.

    • View Source
    Back to top Copyright © 2016-2025 Samsung
    Generated by DocFX