chemaxon.marvin.util
Class MolImageSize

java.lang.Object
  extended by chemaxon.marvin.util.MolImageSize
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class MolImageSize
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable

Class that stores the size and magnification of a molecule image.

Since:
Marvin 2.9.11
Version:
4.1, 03/06/2006
Author:
Peter Csizmadia
See Also:
Serialized Form

Field Summary
 int height
          Height.
 double scale
          Scaling factor.
 int width
          Width.
 
Constructor Summary
MolImageSize()
          Constructs an object with zero width, height and scale.
MolImageSize(int w, int h, double s)
          Constructs an object with the specified width, height and scale.
MolImageSize(MolImageSize other)
          Copy constructor.
 
Method Summary
 java.lang.Object clone()
          Creates an identical copy.
 java.lang.String toString()
          Returns a string representation of the image size and scale.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

width

public int width
Width.


height

public int height
Height.


scale

public double scale
Scaling factor.

Constructor Detail

MolImageSize

public MolImageSize()
Constructs an object with zero width, height and scale.


MolImageSize

public MolImageSize(int w,
                    int h,
                    double s)
Constructs an object with the specified width, height and scale.


MolImageSize

public MolImageSize(MolImageSize other)
Copy constructor.

Method Detail

toString

public java.lang.String toString()
Returns a string representation of the image size and scale. The returned string has the same format as the image export options:

Overrides:
toString in class java.lang.Object
Returns:
a string in "wWIDTH,hHEIGHT,scaleSCALE" format Example:
 MolImageSize g = new MolImageSize(200, 200, scale);
 byte[] png = mol.toBinFormat("png:"+g);
 

clone

public java.lang.Object clone()
Creates an identical copy.

Overrides:
clone in class java.lang.Object
Returns:
a MolImageSize object with the same width, height and scale