Search Results for

    Show / Hide Table of Contents

    Class UnitHelper

    Helper for working with screen, printer and other coordinate systems / units. Sample: inch, mm, cm, ppi, dpi

    Inheritance
    System.Object
    UnitHelper
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Simplic.EPLEditor
    Assembly: Simplic.EPLEditor.dll
    Syntax
    public static class UnitHelper

    Methods

    | Improve this Doc View Source

    CmToPx(Double, Int32)

    Centimeter to pixel

    Declaration
    public static double CmToPx(double cm, int dpi)
    Parameters
    Type Name Description
    System.Double cm

    Centimeter to use which will be turned into pixel

    System.Int32 dpi

    DPI of the screen

    Returns
    Type Description
    System.Double

    Cm -> Pixel

    | Improve this Doc View Source

    DotToPixel(Int32, Double, Double, Int32, Int32)

    Convert dot with dot per millimeter to screen coordinates based on specific dpi

    Declaration
    public static Tuple<double, double> DotToPixel(int dotPerMM, double dotX, double dotY, int targetDPIX, int targetDPIY)
    Parameters
    Type Name Description
    System.Int32 dotPerMM

    Dots / mm

    System.Double dotX

    X coordinate of the dot

    System.Double dotY

    Y coordinate of the dot

    System.Int32 targetDPIX
    System.Int32 targetDPIY
    Returns
    Type Description
    System.Tuple<System.Double, System.Double>

    X/Y coordinates on the screen

    | Improve this Doc View Source

    DotToPixel(Int32, Double, Int32)

    Declaration
    public static double DotToPixel(int dotPerMM, double dot, int targetDPI)
    Parameters
    Type Name Description
    System.Int32 dotPerMM
    System.Double dot
    System.Int32 targetDPI
    Returns
    Type Description
    System.Double
    | Improve this Doc View Source

    PixelToDot(Int32, Double, Int32)

    Declaration
    public static double PixelToDot(int dotPerMM, double pixel, int dpi)
    Parameters
    Type Name Description
    System.Int32 dotPerMM
    System.Double pixel
    System.Int32 dpi
    Returns
    Type Description
    System.Double
    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2018 SIMPLIC GmbH
    Generated by DocFx