edu.rit.swing
Class DisplayableIO
- java.lang.Object
-
- edu.rit.swing.DisplayableIO
-
public class DisplayableIO extends java.lang.ObjectClass DisplayableIO provides static methods for writing displayable objects as image files. You can write PNG files and PostScript files.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static voidwriteBilevelPNGFile(Displayable theDisplayable, java.io.File theFile)Write the given displayable object to a PNG file in the form of a bilevel (black and white) image.static voidwriteBilevelPNGFile(Displayable theDisplayable, java.io.File theFile, double theScale)Write the given displayable object to a PNG file in the form of a bilevel (black and white) image with the given scale factor.static voidwriteColorPNGFile(Displayable theDisplayable, java.io.File theFile)Write the given displayable object to a PNG file in the form of a 24-bit color image.static voidwriteColorPNGFile(Displayable theDisplayable, java.io.File theFile, double theScale)Write the given displayable object to a PNG file in the form of a 24-bit color image with the given scale factor.static voidwriteGrayscalePNGFile(Displayable theDisplayable, java.io.File theFile)Write the given displayable object to a PNG file in the form of a grayscale image.static voidwriteGrayscalePNGFile(Displayable theDisplayable, java.io.File theFile, double theScale)Write the given displayable object to a PNG file in the form of a grayscale image with the given scale factor.static voidwritePostScriptFile(Displayable theDisplayable, java.io.File theFile)Write the given displayable object to a PostScript file.
-
-
-
Method Detail
-
writeBilevelPNGFile
public static void writeBilevelPNGFile(Displayable theDisplayable, java.io.File theFile) throws java.io.IOException
Write the given displayable object to a PNG file in the form of a bilevel (black and white) image. The default scale factor (one display unit = one pixel) is used.- Parameters:
theDisplayable- Displayable object to write.theFile- Image file.- Throws:
java.io.IOException- Thrown if an I/O error occurred.
-
writeBilevelPNGFile
public static void writeBilevelPNGFile(Displayable theDisplayable, java.io.File theFile, double theScale) throws java.io.IOException
Write the given displayable object to a PNG file in the form of a bilevel (black and white) image with the given scale factor. One display unit = theScale pixels.- Parameters:
theDisplayable- Displayable object to write.theFile- Image file.theScale- Scale factor for converting display units to pixels.- Throws:
java.io.IOException- Thrown if an I/O error occurred.
-
writeGrayscalePNGFile
public static void writeGrayscalePNGFile(Displayable theDisplayable, java.io.File theFile) throws java.io.IOException
Write the given displayable object to a PNG file in the form of a grayscale image. The default scale factor (one display unit = one pixel) is used.- Parameters:
theDisplayable- Displayable object to write.theFile- Image file.- Throws:
java.io.IOException- Thrown if an I/O error occurred.
-
writeGrayscalePNGFile
public static void writeGrayscalePNGFile(Displayable theDisplayable, java.io.File theFile, double theScale) throws java.io.IOException
Write the given displayable object to a PNG file in the form of a grayscale image with the given scale factor. One display unit = theScale pixels.- Parameters:
theDisplayable- Displayable object to write.theFile- Image file.theScale- Scale factor for converting display units to pixels.- Throws:
java.io.IOException- Thrown if an I/O error occurred.
-
writeColorPNGFile
public static void writeColorPNGFile(Displayable theDisplayable, java.io.File theFile) throws java.io.IOException
Write the given displayable object to a PNG file in the form of a 24-bit color image. The default scale factor (one display unit = one pixel) is used.- Parameters:
theDisplayable- Displayable object to write.theFile- Image file.- Throws:
java.io.IOException- Thrown if an I/O error occurred.
-
writeColorPNGFile
public static void writeColorPNGFile(Displayable theDisplayable, java.io.File theFile, double theScale) throws java.io.IOException
Write the given displayable object to a PNG file in the form of a 24-bit color image with the given scale factor. One display unit = theScale pixels.- Parameters:
theDisplayable- Displayable object to write.theFile- Image file.theScale- Scale factor for converting display units to pixels.- Throws:
java.io.IOException- Thrown if an I/O error occurred.
-
writePostScriptFile
public static void writePostScriptFile(Displayable theDisplayable, java.io.File theFile) throws java.io.IOException
Write the given displayable object to a PostScript file.- Parameters:
theDisplayable- Displayable object to write.theFile- PostScript file.- Throws:
java.io.IOException- Thrown if an I/O error occurred.
-
-
DMelt 3.0 © DataMelt by jWork.ORG