using System;
namespace System.Drawing {
///
/// The Dimension2D
class is to encapsulate a width
/// and a height dimension.
///
///
/// This class is only the abstract baseclass for all objects that
/// store a 2D dimension.
/// The actual storage representation of the sizes is left to
/// the subclass.
///
public abstract class Dimension2D : ICloneable {
///
/// This is an abstract class that cannot be instantiated directly.
/// Type-specific implementation subclasses are available for
/// instantiation and provide a number of formats for storing
/// the information necessary to satisfy the various accessor
/// methods below.
///
///
protected Dimension2D() {
}
///
/// Returns the width of this Dimension
in double
/// precision.
///
/// the width
public abstract double Width {get;}
///
/// Returns the height of this Dimension
in double
/// precision.
///
/// the height
public abstract double Height {get;}
///
/// Sets the size of this Dimension
object to the
/// specified width and height.
///
/// the new width for the Dimension
/// object
/// the new height for the Dimension
/// object
public abstract void SetSize(double width, double height);
///
/// Sets the size of this Dimension2D
object to
/// match the specified size.
///
/// the size
public Dimension2D Size {
set {
SetSize(value.Width, value.Height);
}
}
///
/// Creates a new object of the same class as this object.
///
/// a clone of this instance
public Object Clone() {
throw new Exception("not implemented");
}
}
}