Dimensions Structure
Represents the linear dimensions (width and height) of one raster rectangular image in arbitrary unit. Immutable struct.

Namespace: GroupDocs.Editor.HtmlCss.Resources.Images
Assembly: GroupDocs.Editor (in GroupDocs.Editor.dll) Version: 21.10.0.0
Syntax
public struct Dimensions

The Dimensions type exposes the following members.

Constructors
  NameDescription
Public methodDimensions
Creates a new instance from specified width and height
Properties
  NameDescription
Public propertyArea
Returns an area (Width x Height)
Public propertyAspectRatio
Aspect ratio of this dimensions as width/height
Public propertyStatic memberEmpty
Returns an empty Dimensions instance
Public propertyHeight
Returns height of the image
Public propertyIsEmpty
Determines whether this "Dimensions" instance is empty and default, i.e. it doesn't store correct width and height
Public propertyIsSquare
Determines whether specified 'Dimensions' represents square, i.e. if width is equal to height
Public propertyWidth
Returns width of the image
Methods
  NameDescription
Public methodClone
Returns a full copy of this instance
Public methodEquals(Object)
Determines whether this instance is equal with specified uncasted object, which presumably is another "Dimensions" instance
(Overrides ValueTypeEquals(Object).)
Public methodEquals(Dimensions)
Determines whether this instance is equal with specified "Dimensions" instance
Public methodStatic memberFromSize
Generates and returns a new instance from specified System.Drawing.Size instance
Public methodGetHashCode
Returns a hashcode for this instance, which cannot be changed during its lifetime
(Overrides ValueTypeGetHashCode.)
Public methodProportionallyResizeForNewHeight
Creates and returns new "Dimensions" instance, which is proportionally resized from current, based on specified height
Public methodProportionallyResizeForNewWidth
Creates and returns new "Dimensions" instance, which is proportionally resized from current, based on specified width
Public methodCode exampleToString
Returns a string representation of this "Dimensions"
(Overrides ValueTypeToString.)
Operators
  NameDescription
Public operatorStatic memberEquality
Checks whether two "Dimensions" values are equal, i.e. they have equal width and height, or both are empty
Public operatorStatic memberInequality
Checks whether two "Dimensions" values are not equal, i.e. their corresponding width and/or height are different
See Also