layout: default title: Dimension parent: Core Classes —

dymaptic.GeoBlazor.Core

dymaptic.GeoBlazor.Core.Objects

Dimension Class

Defines a screen measurement in points or pixels. Supports implicit conversion from string, int, or double.
Dimensions can include pt or px units. If no units are specified, pt is assumed.

public class Dimension :
System.IEquatable<dymaptic.GeoBlazor.Core.Objects.Dimension>

Inheritance System.Object 🡒 Dimension

Implements System.IEquatable<Dimension>

Constructors

Dimension(double) Constructor

Constructs a new Dimension from a double. Assumes units are pt.

public Dimension(double pointVal);

Parameters

pointVal System.Double

Dimension(string) Constructor

Constructs a new Dimension from a string. Supports pt or px units. If no units are specified, pt is assumed.

public Dimension(string stringVal);

Parameters

stringVal System.String

Properties

Dimension.Pixels Property

The dimension in pixels.

public double Pixels { get; }

Property Value

System.Double

Dimension.Points Property

The dimension in points.

public double Points { get; set; }

Property Value

System.Double

Methods

Dimension.Equals(Dimension) Method

Determines if two Dimensions are equal to each other in Points.

public bool Equals(dymaptic.GeoBlazor.Core.Objects.Dimension? other);

Parameters

other Dimension

Returns

System.Boolean

Operators

Dimension.operator ==(Dimension, Dimension) Operator

Equality Operator

public static bool operator ==(dymaptic.GeoBlazor.Core.Objects.Dimension? left, dymaptic.GeoBlazor.Core.Objects.Dimension? right);

Parameters

left Dimension

right Dimension

Returns

System.Boolean

Dimension.explicit operator Dimension(Nullable) Operator

Explicit conversion for handling nullable doubles

public static dymaptic.GeoBlazor.Core.Objects.Dimension? explicit operator Dimension?(System.Nullable<double> nullableDoubleVal);

Parameters

nullableDoubleVal System.Nullable<System.Double>

Returns

Dimension

Dimension.explicit operator Nullable(Dimension) Operator

Explicit conversion for handling nullable Dimensions

public static System.Nullable<double> explicit operator Nullable<double>(dymaptic.GeoBlazor.Core.Objects.Dimension? dimension);

Parameters

dimension Dimension

Returns

System.Nullable<System.Double>

Dimension.implicit operator double(Dimension) Operator

Implicit conversion from Dimension to double

public static double implicit operator double(dymaptic.GeoBlazor.Core.Objects.Dimension dimension);

Parameters

dimension Dimension

Returns

System.Double

Dimension.implicit operator Dimension(double) Operator

Implicit conversion from double to Dimension

public static dymaptic.GeoBlazor.Core.Objects.Dimension implicit operator Dimension(double doubleVal);

Parameters

doubleVal System.Double

Returns

Dimension

Dimension.implicit operator Dimension(int) Operator

Implicit conversion from int to Dimension

public static dymaptic.GeoBlazor.Core.Objects.Dimension implicit operator Dimension(int intVal);

Parameters

intVal System.Int32

Returns

Dimension

Dimension.implicit operator Dimension(string) Operator

Implicit conversion from string to Dimension

public static dymaptic.GeoBlazor.Core.Objects.Dimension implicit operator Dimension(string stringVal);

Parameters

stringVal System.String

Returns

Dimension

Dimension.operator !=(Dimension, Dimension) Operator

Inequality Operator

public static bool operator !=(dymaptic.GeoBlazor.Core.Objects.Dimension? left, dymaptic.GeoBlazor.Core.Objects.Dimension? right);

Parameters

left Dimension

right Dimension

Returns

System.Boolean