Table of Contents

Class Extensions

Namespace
LightningChartLib.WinForms.Charting.Extensions
Assembly
LightningChart.WinForms.Charting.NET4.dll

Public extensions methods.

public static class Extensions
Inheritance
Extensions
Inherited Members

Methods

DegToRad(double)

Convert given angle in degrees to radians.

public static double DegToRad(this double Deg)

Parameters

Deg double

Angle in degrees

Returns

double

Corresponding angle in radians.

DegToRad(float)

Convert given angle in degrees to radians.

public static float DegToRad(this float Deg)

Parameters

Deg float

Angle in degrees

Returns

float

Corresponding angle in radians.

DipToPx(PointFloat)

Converts given coordinates defined in DIP (Device Independent Pixels) to PX (Screen pixels) values using system DPI settings.

public static PointFloat DipToPx(this PointFloat dip)

Parameters

dip PointFloat

Coordinates to convert, defined in DIPs.

Returns

PointFloat

Converted coordinates in PX.

DipToPx(RectangleF)

Converts given rectangle size and position defined in DIP (Device Independent Pixels) to PX (Screen pixels) values using system DPI settings.

public static RectangleF DipToPx(this RectangleF Dip)

Parameters

Dip RectangleF

Rectangle to convert, defined in DIPs.

Returns

RectangleF

Converted rectangle in PX.

DipToPx(int, bool)

Converts given DIP (Device Independent Pixels) values to PX (Screen pixels) using system DPI settings.

public static float DipToPx(this int DIP, bool UseXDirection = true)

Parameters

DIP int

Value to convert in DIPs

UseXDirection bool

If true, the screen width direction DPI factor is used. Height direction otherwise

Returns

float

Converted value in PX.

Remarks

The UseXDirection has default value of true as the width and height direction DPI factors are usually the same.

DipToPx(float, bool)

Converts given DIP (Device Independent Pixels) values to PX (Screen pixels) using system DPI settings.

public static float DipToPx(this float DIP, bool UseXDirection = true)

Parameters

DIP float

Value to convert in DIPs

UseXDirection bool

If true, the screen width direction DPI factor is used. Height direction otherwise

Returns

float

Converted value in PX.

Remarks

The UseXDirection has default value of true as the width and height direction DPI factors are usually the same.

ItemsToString(IList)

Convert GetLastEngineInitResults to string to help reporting of it's contents.

public static string ItemsToString(this IList list)

Parameters

list IList
param list M:LightningChartLib.WinForms.Charting.Extensions.Extensions.ItemsToString(System.Collections.IList)

Returns

string
returns M:LightningChartLib.WinForms.Charting.Extensions.Extensions.ItemsToString(System.Collections.IList)

PxToDip(PointFloat)

Converts given coordinates defined in PX (Screen pixels) to DIP (Device Independent Pixels) values using system DPI settings.

public static PointFloat PxToDip(this PointFloat px)

Parameters

px PointFloat

Coordinates to convert, defined in pixels.

Returns

PointFloat

Converted coordinates in DPIs.

PxToDip(double, bool)

Converts given PX (Screen pixels) to DIP (Device Independent Pixels) values using system DPI settings.

public static double PxToDip(this double PX, bool UseXDirection = true)

Parameters

PX double

Value to convert in pixels.

UseXDirection bool

If true, the screen width direction DPI factor is used. Height direction otherwise

Returns

double

Converted value in DPIs.

Remarks

The UseXDirection has default value of true as the width and height direction DPI factors are usually the same.

PxToDip(RectangleF)

Converts given rectangle size and position defined in PX (Screen pixels) to DIP (Device Independent Pixels) values using system DPI settings.

public static RectangleF PxToDip(this RectangleF PX)

Parameters

PX RectangleF

Rectangle to convert, defined in pixels.

Returns

RectangleF

Converted rectangle in DPIs.

PxToDip(int, bool)

Converts given PX (Screen pixels) to DIP (Device Independent Pixels) values using system DPI settings.

public static float PxToDip(this int PX, bool UseXDirection = true)

Parameters

PX int

Value to convert in pixels.

UseXDirection bool

If true, the screen width direction DPI factor is used. Height direction otherwise

Returns

float

Converted value in DPIs.

Remarks

The UseXDirection has default value of true as the width and height direction DPI factors are usually the same.

PxToDip(float, bool)

Converts given PX (Screen pixels) to DIP (Device Independent Pixels) values using system DPI settings.

public static float PxToDip(this float PX, bool UseXDirection = true)

Parameters

PX float

Value to convert in pixels.

UseXDirection bool

If true, the screen width direction DPI factor is used. Height direction otherwise

Returns

float

Converted value in DPIs.

Remarks

The UseXDirection has default value of true as the width and height direction DPI factors are usually the same.

RadToDeg(double)

Convert given angle in radians to degrees.

public static double RadToDeg(this double Rad)

Parameters

Rad double

Angle in radians

Returns

double

Corresponding angle in degrees.

RadToDeg(float)

Convert given angle in radians to degrees.

public static float RadToDeg(this float Rad)

Parameters

Rad float

Angle in radians

Returns

float

Corresponding angle in degrees.