|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.batik.apps.regsvggen.Main
A regression checking tool for SVG generator test cases.
Field Summary | |
static java.lang.String |
CSS_PARSER_CLASS_NAME
The CSS parser class name key. |
Constructor Summary | |
Main()
|
Method Summary | |
static void |
cleanUp()
|
static java.lang.String |
compileTestClass(java.lang.String testFileName)
This method will do the following: 1. |
static java.lang.String |
computeTimeStamp()
|
static void |
createBufImage(java.lang.String className,
java.lang.String testImageName)
This method will generate PNG file directly from the BufferedImage, the image files will be stored in the "new" directory |
static void |
createSvgFile(java.lang.String className,
java.lang.String testImageName)
This method will generate SVG files using the SVGGraphics2D, SVG files will be in "svg" directory |
static void |
diffBufferedImage(java.awt.image.Raster ref,
java.awt.image.Raster cmp,
java.awt.image.Raster diff)
This is the core method to calculate the difference of the two input images and save the comparison into the output image |
static void |
diffImage()
|
static boolean |
diffImage(java.lang.String refInputURI,
java.lang.String newInputURI)
Returns true if the specified images are the same, false otherwise. |
static void |
display(java.lang.String msg)
Display the specified message. |
static void |
error(java.lang.String msg)
Display the specified error message. |
static void |
exit(int code)
Exits the application with the specified code. |
static void |
generateGraphics()
|
static void |
generateRefImages()
This method will generate PNG files from corresponding SVG files under "svg" directory, the image files will be in "ref" directory |
static void |
generateReport()
|
static void |
generateReport(java.io.File[] refImages,
int[] badIndex,
int bi)
|
static java.lang.String |
getClassesDirectory()
Returns the directory where temporary classes are stored. |
static java.lang.String |
getDiffDirectory()
Returns the directory where the difference images are stored. |
static java.lang.String |
getNewDirectory()
Returns the directory where the new images are stored. |
static java.lang.String |
getRefDirectory()
Returns the directory where the reference images are stored. |
static java.lang.String |
getSvgDirectory()
Returns the directory where the svg files are stored. |
static Transcoder |
getTranscoder()
Returns the transcoder to use. |
static java.lang.String |
getXmlDirectory()
Returns the directory where the XML test cases are stored. |
static void |
init()
INITILIZATION Creates the regsvggen directory and its sub directories. |
static void |
main(java.lang.String[] args)
MAIN |
static void |
reset()
|
static void |
setUp()
GO The main processing unit, devided into four parts: 1. |
static void |
usage(java.io.PrintStream out)
Shows the usage message. |
static void |
writeImage(Transcoder transcoder,
java.lang.String inputURI,
java.lang.String output)
Writes an image. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String CSS_PARSER_CLASS_NAME
Constructor Detail |
public Main()
Method Detail |
public static void main(java.lang.String[] args)
public static void init()
public static void setUp()
public static void generateGraphics()
public static java.lang.String compileTestClass(java.lang.String testFileName) throws java.lang.Exception
public static void createBufImage(java.lang.String className, java.lang.String testImageName) throws java.lang.Exception
public static void createSvgFile(java.lang.String className, java.lang.String testImageName) throws java.lang.Exception
public static void generateRefImages()
public static void diffImage()
public static void generateReport()
public static void generateReport(java.io.File[] refImages, int[] badIndex, int bi)
public static void reset()
public static void cleanUp()
public static void writeImage(Transcoder transcoder, java.lang.String inputURI, java.lang.String output)
transcoder
- the transcoder to use to generate the imageinputURI
- the URI of the SVG fileoutputURI
- the URI of the image to generatepublic static boolean diffImage(java.lang.String refInputURI, java.lang.String newInputURI)
refInputURI
- the reference imagenewInputURI
- the new produced imagepublic static void diffBufferedImage(java.awt.image.Raster ref, java.awt.image.Raster cmp, java.awt.image.Raster diff)
ref
- the reference image in BufferedImagenew
- the new image in BufferedImagediff
- the difference image in BufferedImagepublic static java.lang.String computeTimeStamp()
public static Transcoder getTranscoder()
public static void error(java.lang.String msg)
msg
- the error message to displaypublic static void display(java.lang.String msg)
msg
- the message to displaypublic static void usage(java.io.PrintStream out)
out
- the stream where to write the usage messagepublic static void exit(int code)
code
- the exit codepublic static java.lang.String getXmlDirectory()
public static java.lang.String getRefDirectory()
public static java.lang.String getNewDirectory()
public static java.lang.String getClassesDirectory()
public static java.lang.String getDiffDirectory()
public static java.lang.String getSvgDirectory()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |