Back to Website
Show / Hide Table of Contents

Class Utils

Inheritance
System.Object
Utils
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: Aurigma.DesignAtoms.Model.Math
Assembly: Aurigma.DesignAtoms.Model.dll
Syntax
public class Utils

Constructors

Utils()

Declaration
public Utils()

Methods

ConvertDegreeToRadian(Double)

Declaration
public static double ConvertDegreeToRadian(double angle)
Parameters
Type Name Description
System.Double angle
Returns
Type Description
System.Double

ConvertPixelsToPoints(Single, IEnumerable<Single>)

Declaration
public static IEnumerable<float> ConvertPixelsToPoints(float dpi, IEnumerable<float> pixels)
Parameters
Type Name Description
System.Single dpi
System.Collections.Generic.IEnumerable<System.Single> pixels
Returns
Type Description
System.Collections.Generic.IEnumerable<System.Single>

ConvertPixelsToPoints(Single, RectangleF)

Declaration
public static RectangleF ConvertPixelsToPoints(float dpi, RectangleF pixelRect)
Parameters
Type Name Description
System.Single dpi
System.Drawing.RectangleF pixelRect
Returns
Type Description
System.Drawing.RectangleF

ConvertPixelsToPoints(Single, Int32)

Declaration
public static float ConvertPixelsToPoints(float dpi, int pixels)
Parameters
Type Name Description
System.Single dpi
System.Int32 pixels
Returns
Type Description
System.Single

ConvertPixelsToPoints(Single, Single)

Declaration
public static float ConvertPixelsToPoints(float dpi, float pixels)
Parameters
Type Name Description
System.Single dpi
System.Single pixels
Returns
Type Description
System.Single

ConvertPointsToPixels(Single, Path)

Declaration
public static Path ConvertPointsToPixels(float dpi, Path path)
Parameters
Type Name Description
System.Single dpi
Path path
Returns
Type Description
Path

ConvertPointsToPixels(Single, RotatedRectangleF)

Declaration
public static RotatedRectangleF ConvertPointsToPixels(float dpi, RotatedRectangleF rect)
Parameters
Type Name Description
System.Single dpi
RotatedRectangleF rect
Returns
Type Description
RotatedRectangleF

ConvertPointsToPixels(Single, RectangleF)

Declaration
public static RectangleF ConvertPointsToPixels(float dpi, RectangleF pointRect)
Parameters
Type Name Description
System.Single dpi
System.Drawing.RectangleF pointRect
Returns
Type Description
System.Drawing.RectangleF

ConvertPointsToPixels(Single, Single)

Declaration
public static int ConvertPointsToPixels(float dpi, float points)
Parameters
Type Name Description
System.Single dpi
System.Single points
Returns
Type Description
System.Int32

ConvertPointsToPixelsFloat(Single, PointF)

Declaration
public static PointF ConvertPointsToPixelsFloat(float dpi, PointF point)
Parameters
Type Name Description
System.Single dpi
PointF point
Returns
Type Description
PointF

ConvertPointsToPixelsFloat(Single, Single)

Declaration
public static float ConvertPointsToPixelsFloat(float dpi, float points)
Parameters
Type Name Description
System.Single dpi
System.Single points
Returns
Type Description
System.Single

ConvertRadianToDegree(Double)

Declaration
public static double ConvertRadianToDegree(double angle)
Parameters
Type Name Description
System.Double angle
Returns
Type Description
System.Double

EqualsOfFloatNumbers(Double, Double, Double)

Declaration
public static bool EqualsOfFloatNumbers(double f1, double f2, double tolerance = 0.0001)
Parameters
Type Name Description
System.Double f1
System.Double f2
System.Double tolerance
Returns
Type Description
System.Boolean

EqualsOfNullableFloats(Nullable<Single>, Nullable<Single>, Double)

Declaration
public static bool EqualsOfNullableFloats(float? f1, float? f2, double tolerance = 0.0001)
Parameters
Type Name Description
System.Nullable<System.Single> f1
System.Nullable<System.Single> f2
System.Double tolerance
Returns
Type Description
System.Boolean

EqualsOfPointF(PointF, PointF, Double)

Declaration
public static bool EqualsOfPointF(PointF point1, PointF point2, double tolerance = 0.0001)
Parameters
Type Name Description
PointF point1
PointF point2
System.Double tolerance
Returns
Type Description
System.Boolean

EqualsOfPointF(PointF, PointF, Double)

Declaration
public static bool EqualsOfPointF(PointF point1, PointF point2, double tolerance = 0.0001)
Parameters
Type Name Description
System.Drawing.PointF point1
System.Drawing.PointF point2
System.Double tolerance
Returns
Type Description
System.Boolean

EqualsOfRectangleF(RectangleF, RectangleF, Double)

Declaration
public static bool EqualsOfRectangleF(RectangleF rect1, RectangleF rect2, double tolerance = 0.0001)
Parameters
Type Name Description
System.Drawing.RectangleF rect1
System.Drawing.RectangleF rect2
System.Double tolerance
Returns
Type Description
System.Boolean

GetCenter(RectangleF)

Declaration
public static PointF GetCenter(RectangleF rect)
Parameters
Type Name Description
System.Drawing.RectangleF rect
Returns
Type Description
PointF

GetFitSize(Double, Double, Double, Double)

Declaration
public static SizeF GetFitSize(double sourceWidth, double sourceHeight, double targetWidth, double targetHeight)
Parameters
Type Name Description
System.Double sourceWidth
System.Double sourceHeight
System.Double targetWidth
System.Double targetHeight
Returns
Type Description
System.Drawing.SizeF

RoundFloat(Single, Int32)

Declaration
public static float RoundFloat(float value, int digits)
Parameters
Type Name Description
System.Single value
System.Int32 digits
Returns
Type Description
System.Single

ScaleFloat(Single, Single, Nullable<Single>, Nullable<Single>)

Declaration
public static float ScaleFloat(float value, float scale, float? minimum, float? maximum)
Parameters
Type Name Description
System.Single value
System.Single scale
System.Nullable<System.Single> minimum
System.Nullable<System.Single> maximum
Returns
Type Description
System.Single
Was this page helpful?
Thanks for your feedback!
Back to top Copyright © 2001–2025 Aurigma, Inc. All rights reserved.
Loading...
    Thank for your vote
    Your opinion is important to us. To provide details, send feedback.
    Send feedback