diff options
author | Mattias Andrée <maandree@operamail.com> | 2014-09-05 04:25:24 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2014-09-05 04:25:24 +0200 |
commit | 972dc59b6fb1af69c79fd7c0d1ed1342e2f0c9b3 (patch) | |
tree | 775ba644ddd4fc980ce49e1243c658ea74e78a1f /src/libgamma/GammaRamps.java | |
parent | derp (diff) | |
download | jlibgamma-972dc59b6fb1af69c79fd7c0d1ed1342e2f0c9b3.tar.gz jlibgamma-972dc59b6fb1af69c79fd7c0d1ed1342e2f0c9b3.tar.bz2 jlibgamma-972dc59b6fb1af69c79fd7c0d1ed1342e2f0c9b3.tar.xz |
m + add toString for classes
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src/libgamma/GammaRamps.java')
-rw-r--r-- | src/libgamma/GammaRamps.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/libgamma/GammaRamps.java b/src/libgamma/GammaRamps.java index 895ea2e..35f9d4b 100644 --- a/src/libgamma/GammaRamps.java +++ b/src/libgamma/GammaRamps.java @@ -147,6 +147,22 @@ public class GammaRamps<T extends Ramp> /** + * {@inheritDoc} + */ + public String toString() + { + String depth_str = Integer.toString(this.depth); + if (this.depth == -1) depth_str = "float"; + if (this.depth == -1) depth_str = "double"; + + return "<GammaRamps: depth = " + depth_str + ", " + + "red = " + this.red.toString() + + "green = " + this.green.toString() + + "blue = " + this.blue.toString() + ">"; + } + + + /** * Create and initialise a gamma ramp in the proper way that allows all adjustment * methods to read from and write to it without causing segmentation violation. * |