Permalink
Browse files

Merged changes from Trunk up to revision 1350697

  • Loading branch information...
2 parents d0ab608 + b50c605 commit 5fbfeb3c9df4c3f56f07088ff1633be2da553d9d @vhennebert vhennebert committed Jun 22, 2012
Showing with 2,473 additions and 474 deletions.
  1. +44 −9 build.xml
  2. +274 −0 checkstyle-5.5.xml
  3. +4 −0 checkstyle-suppressions.xml
  4. +7 −4 src/java/org/apache/xmlgraphics/fonts/Glyphs.java
  5. +22 −3 src/java/org/apache/xmlgraphics/image/GraphicsUtil.java
  6. +184 −0 src/java/org/apache/xmlgraphics/image/codec/png/PNGChunk.java
  7. +2 −0 src/java/org/apache/xmlgraphics/image/codec/png/PNGDecodeParam.java
  8. +13 −6 src/java/org/apache/xmlgraphics/image/codec/png/PNGEncodeParam.java
  9. +47 −153 src/java/org/apache/xmlgraphics/image/codec/png/PNGImageDecoder.java
  10. +11 −1 src/java/org/apache/xmlgraphics/image/codec/png/PNGImageEncoder.java
  11. +9 −1 src/java/org/apache/xmlgraphics/image/codec/png/PNGRed.java
  12. +10 −0 src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFDirectory.java
  13. +5 −0 src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFFaxDecoder.java
  14. +2 −0 src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFField.java
  15. +7 −1 src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFImage.java
  16. +6 −0 src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFImageEncoder.java
  17. +6 −0 src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFLZWDecoder.java
  18. +1 −1 src/java/org/apache/xmlgraphics/image/codec/util/MemoryCacheSeekableStream.java
  19. +6 −2 src/java/org/apache/xmlgraphics/image/codec/util/PropertyUtil.java
  20. +1 −1 src/java/org/apache/xmlgraphics/image/codec/util/SeekableOutputStream.java
  21. +2 −1 src/java/org/apache/xmlgraphics/image/codec/util/SeekableStream.java
  22. +23 −21 src/java/org/apache/xmlgraphics/image/codec/util/SimpleRenderedImage.java
  23. +2 −0 src/java/org/apache/xmlgraphics/image/codec/util/SingleTileRenderedImage.java
  24. +1 −1 src/java/org/apache/xmlgraphics/image/loader/cache/ImageCacheStatistics.java
  25. +1 −1 src/java/org/apache/xmlgraphics/image/loader/cache/ImageKey.java
  26. +2 −3 src/java/org/apache/xmlgraphics/image/loader/impl/ImageConverterBitmap2G2D.java
  27. +59 −0 src/java/org/apache/xmlgraphics/image/loader/impl/ImageLoaderFactoryPNG.java
  28. +2 −0 src/java/org/apache/xmlgraphics/image/loader/impl/ImageLoaderFactoryRaw.java
  29. +75 −0 src/java/org/apache/xmlgraphics/image/loader/impl/ImageLoaderPNG.java
  30. +85 −0 src/java/org/apache/xmlgraphics/image/loader/impl/ImageLoaderRawPNG.java
  31. +144 −0 src/java/org/apache/xmlgraphics/image/loader/impl/ImageRawPNG.java
  32. +47 −0 src/java/org/apache/xmlgraphics/image/loader/impl/PNGConstants.java
  33. +238 −0 src/java/org/apache/xmlgraphics/image/loader/impl/PNGFile.java
  34. +2 −1 src/java/org/apache/xmlgraphics/image/loader/impl/PreloaderTIFF.java
  35. +4 −1 src/java/org/apache/xmlgraphics/image/loader/impl/imageio/ImageIOUtil.java
  36. +18 −8 src/java/org/apache/xmlgraphics/image/loader/impl/imageio/ImageLoaderImageIO.java
  37. +2 −2 src/java/org/apache/xmlgraphics/image/loader/pipeline/ImageProviderPipeline.java
  38. +1 −1 src/java/org/apache/xmlgraphics/image/loader/pipeline/ImageRepresentation.java
  39. +0 −1 src/java/org/apache/xmlgraphics/image/loader/spi/ImageConverter.java
  40. +4 −1 src/java/org/apache/xmlgraphics/image/loader/util/ImageUtil.java
  41. +1 −1 src/java/org/apache/xmlgraphics/image/loader/util/Penalty.java
  42. +1 −1 src/java/org/apache/xmlgraphics/image/loader/util/SoftReferenceWithKey.java
  43. +16 −9 src/java/org/apache/xmlgraphics/image/rendered/AbstractRed.java
  44. +12 −9 src/java/org/apache/xmlgraphics/image/rendered/Any2LsRGBRed.java
  45. +15 −5 src/java/org/apache/xmlgraphics/image/rendered/Any2sRGBRed.java
  46. +7 −2 src/java/org/apache/xmlgraphics/image/rendered/BufferedImageCachableRed.java
  47. +2 −1 src/java/org/apache/xmlgraphics/image/rendered/CachableRed.java
  48. +12 −7 src/java/org/apache/xmlgraphics/image/rendered/FormatRed.java
  49. +5 −1 src/java/org/apache/xmlgraphics/image/rendered/RenderedImageCachableRed.java
  50. +6 −6 src/java/org/apache/xmlgraphics/image/writer/ImageWriter.java
  51. +4 −1 src/java/org/apache/xmlgraphics/image/writer/ImageWriterUtil.java
  52. +2 −2 src/java/org/apache/xmlgraphics/image/writer/MultiImageWriter.java
  53. +2 −0 src/java/org/apache/xmlgraphics/image/writer/imageio/ImageIOTIFFImageWriter.java
  54. +0 −1 src/java/org/apache/xmlgraphics/image/writer/internal/PNGImageWriter.java
  55. +7 −3 src/java/org/apache/xmlgraphics/java2d/AbstractGraphics2D.java
  56. +4 −1 src/java/org/apache/xmlgraphics/java2d/DefaultGraphics2D.java
  57. +1 −1 src/java/org/apache/xmlgraphics/java2d/Dimension2DDouble.java
  58. +6 −2 src/java/org/apache/xmlgraphics/java2d/GraphicContext.java
  59. +1 −1 src/java/org/apache/xmlgraphics/java2d/Graphics2DImagePainter.java
  60. +7 −2 src/java/org/apache/xmlgraphics/java2d/TransformStackElement.java
  61. +4 −2 src/java/org/apache/xmlgraphics/java2d/TransformType.java
  62. +0 −2 src/java/org/apache/xmlgraphics/java2d/color/ColorSpaceOrigin.java
  63. +0 −2 src/java/org/apache/xmlgraphics/java2d/color/DefaultColorConverter.java
  64. +0 −1 src/java/org/apache/xmlgraphics/java2d/color/DeviceCMYKColorSpace.java
  65. +2 −1 src/java/org/apache/xmlgraphics/java2d/color/GrayScaleColorConverter.java
  66. +2 −0 src/java/org/apache/xmlgraphics/java2d/color/profile/ColorProfileUtil.java
  67. +0 −2 src/java/org/apache/xmlgraphics/java2d/color/profile/NamedColorProfile.java
  68. +3 −2 src/java/org/apache/xmlgraphics/java2d/ps/AbstractPSDocumentGraphics2D.java
  69. +2 −1 src/java/org/apache/xmlgraphics/java2d/ps/PSDocumentGraphics2D.java
  70. +2 −1 src/java/org/apache/xmlgraphics/java2d/ps/PSGraphics2D.java
  71. +1 −1 src/java/org/apache/xmlgraphics/java2d/ps/PSGraphicsConfiguration.java
  72. +23 −9 src/java/org/apache/xmlgraphics/java2d/ps/PSTilingPattern.java
  73. +4 −1 src/java/org/apache/xmlgraphics/ps/DSCConstants.java
  74. +29 −4 src/java/org/apache/xmlgraphics/ps/ImageEncodingHelper.java
  75. +2 −0 src/java/org/apache/xmlgraphics/ps/PSDictionary.java
  76. +5 −0 src/java/org/apache/xmlgraphics/ps/PSFontUtils.java
  77. +2 −1 src/java/org/apache/xmlgraphics/ps/PSGenerator.java
  78. +46 −35 src/java/org/apache/xmlgraphics/ps/PSImageUtils.java
  79. +4 −1 src/java/org/apache/xmlgraphics/ps/PSProcSets.java
  80. +4 −1 src/java/org/apache/xmlgraphics/ps/dsc/DSCCommentFactory.java
  81. +5 −5 src/java/org/apache/xmlgraphics/ps/dsc/DSCHandler.java
  82. +1 −1 src/java/org/apache/xmlgraphics/ps/dsc/DSCParser.java
  83. +1 −1 src/java/org/apache/xmlgraphics/ps/dsc/NestedDocumentHandler.java
  84. +1 −1 src/java/org/apache/xmlgraphics/ps/dsc/events/AbstractDSCComment.java
  85. +4 −1 src/java/org/apache/xmlgraphics/ps/dsc/tools/DSCTools.java
  86. +5 −2 src/java/org/apache/xmlgraphics/ps/dsc/tools/PageExtractor.java
  87. +75 −38 src/java/org/apache/xmlgraphics/util/DoubleFormatUtil.java
  88. +4 −1 src/java/org/apache/xmlgraphics/util/ImageIODebugUtil.java
  89. +6 −2 src/java/org/apache/xmlgraphics/util/Service.java
  90. +9 −12 src/java/org/apache/xmlgraphics/util/UnitConv.java
  91. +1 −1 src/java/org/apache/xmlgraphics/util/dijkstra/EdgeDirectory.java
  92. +2 −1 src/java/org/apache/xmlgraphics/util/i18n/ExtendedLocalizable.java
  93. +2 −1 src/java/org/apache/xmlgraphics/util/i18n/LocaleGroup.java
  94. +2 −1 src/java/org/apache/xmlgraphics/util/i18n/Localizable.java
  95. +4 −1 src/java/org/apache/xmlgraphics/util/i18n/LocalizableSupport.java
  96. +11 −11 src/java/org/apache/xmlgraphics/util/io/ASCII85Constants.java
  97. +1 −1 src/java/org/apache/xmlgraphics/util/io/ASCII85InputStream.java
  98. +3 −2 src/java/org/apache/xmlgraphics/util/io/ASCII85OutputStream.java
  99. +1 −1 src/java/org/apache/xmlgraphics/util/io/ASCIIHexOutputStream.java
  100. +12 −6 src/java/org/apache/xmlgraphics/util/io/Base64DecodeStream.java
  101. +11 −4 src/java/org/apache/xmlgraphics/util/io/Base64EncodeStream.java
  102. +15 −13 src/java/org/apache/xmlgraphics/util/io/RunLengthEncodeOutputStream.java
  103. +1 −1 src/java/org/apache/xmlgraphics/util/uri/CommonURIResolver.java
  104. +2 −1 src/java/org/apache/xmlgraphics/util/uri/DataURIResolver.java
  105. +4 −1 src/java/org/apache/xmlgraphics/util/uri/DataURLUtil.java
  106. +1 −1 src/java/org/apache/xmlgraphics/xmp/PropertyAccess.java
  107. +1 −5 src/java/org/apache/xmlgraphics/xmp/XMPHandler.java
  108. +4 −1 src/java/org/apache/xmlgraphics/xmp/XMPPacketParser.java
  109. +4 −1 src/java/org/apache/xmlgraphics/xmp/XMPParser.java
  110. +1 −1 src/java/org/apache/xmlgraphics/xmp/XMPSchemaRegistry.java
  111. +4 −1 src/java/org/apache/xmlgraphics/xmp/XMPSerializer.java
  112. +2 −1 src/resources/META-INF/services/org.apache.xmlgraphics.image.loader.spi.ImageLoaderFactory
  113. +21 −0 status.xml
  114. BIN test/images/basi2c08.png
  115. BIN test/images/basn0g08.png
  116. BIN test/images/basn2c08.png
  117. BIN test/images/basn3p08.png
  118. BIN test/images/basn4a08.png
  119. BIN test/images/basn6a08.png
  120. BIN test/images/f00n2c08.png
  121. BIN test/images/f04n2c08.png
  122. BIN test/images/pp0n6a08.png
  123. BIN test/images/tbbn3p08.png
  124. BIN test/images/tbrn2c08.png
  125. +10 −3 test/java/org/apache/xmlgraphics/image/loader/ImageLoaderTestCase.java
  126. +64 −0 test/java/org/apache/xmlgraphics/image/loader/impl/ImageLoaderFactoryPNGTestCase.java
  127. +64 −0 test/java/org/apache/xmlgraphics/image/loader/impl/ImageLoaderImageIOTestCase.java
  128. +62 −0 test/java/org/apache/xmlgraphics/image/loader/impl/ImageLoaderPNGTestCase.java
  129. +76 −0 test/java/org/apache/xmlgraphics/image/loader/impl/ImageLoaderRawPNGTestCase.java
  130. +119 −0 test/java/org/apache/xmlgraphics/image/loader/impl/PNGFileTestCase.java
  131. BIN test/java/org/apache/xmlgraphics/image/loader/impl/gray-vs-cmyk-profile.png
  132. +0 −1 test/java/org/apache/xmlgraphics/java2d/ps/PSGraphics2DTestCase.java
  133. +78 −0 test/java/org/apache/xmlgraphics/ps/ImageEncodingHelperTestCase.java
  134. +160 −2 test/java/org/apache/xmlgraphics/util/DoubleFormatUtilTest.java
View
@@ -19,9 +19,9 @@
<!-- See build.properties and build-local.properties for overriding build settings. -->
<!-- build-local.properties is not stored in SVN and overrides values from build.properties -->
+ <property environment="env"/>
<property file="${basedir}/build-local.properties"/>
<property file="${basedir}/build.properties"/>
- <property environment="env"/>
<property name="Name" value="Apache XML Graphics Commons"/>
<property name="name" value="xmlgraphics-commons"/>
@@ -47,6 +47,7 @@
<property name="src.java.dir" value="${src.dir}/java"/>
<property name="src.res.dir" value="${src.dir}/resources"/>
<property name="lib.dir" value="${basedir}/lib"/>
+ <property name="optional.lib.dir" value="${lib.dir}/build" />
<property name="build.dir" value="${basedir}/build"/>
<property name="build.classes.dir" value="${build.dir}/classes"/>
@@ -56,6 +57,7 @@
<property name="dist.src.dir" value="${basedir}/dist-src"/>
<property name="dist.bin.result.dir" value="${dist.bin.dir}/${name}-${version}"/>
<property name="dist.src.result.dir" value="${dist.src.dir}/${name}-${version}"/>
+ <property name="samedir" value="${basedir}"/>
<!-- .NET support (using IKVM) -->
<property name="ikvm.dir" value="."/>
@@ -69,18 +71,13 @@
<fileset dir="${lib.dir}">
<include name="*.jar"/>
</fileset>
- </path>
-
- <path id="libs-tools-build-classpath">
<fileset dir="${lib.dir}/build">
<include name="*.jar"/>
</fileset>
</path>
<path id="libs-run-classpath">
- <fileset dir="${lib.dir}">
- <include name="*.jar"/>
- </fileset>
+ <path refid="libs-build-classpath"/>
<fileset dir="${build.dir}">
<include name="${name}.jar"/>
</fileset>
@@ -300,7 +297,6 @@
<patternset refid="compile-pattern"/>
<classpath>
<path refid="libs-build-classpath"/>
- <path refid="libs-tools-build-classpath"/>
<fileset dir="${build.dir}">
<include name="${name}-${version}.jar"/>
</fileset>
@@ -326,7 +322,6 @@
<classpath>
<pathelement location="${build.dir}/test-classes"/>
<path refid="libs-build-classpath"/>
- <path refid="libs-tools-build-classpath"/>
<fileset dir="build">
<include name="${name}-${version}.jar"/>
</fileset>
@@ -445,6 +440,45 @@ NOTE:
<!-- =================================================================== -->
<!-- Checkstyle -->
<!-- =================================================================== -->
+ <property name="checkstyle.location" value="${optional.lib.dir}/checkstyle-5.5-all.jar" />
+ <property name="checkstyle.noframes.xslt" value="${basedir}/checkstyle-noframes.xsl" />
+ <property name="checkstyle.config" value="${basedir}/checkstyle-5.5.xml" />
+ <path id="checkstyle-classpath">
+ <path refid="libs-build-classpath"/>
+ <pathelement location="${checkstyle.location}"/>
+ </path>
+ <condition property="checkstyle.avail">
+ <and>
+ <available classname="com.puppycrawl.tools.checkstyle.CheckStyleTask">
+ <classpath refid="checkstyle-classpath"/>
+ </available>
+ <available file="${checkstyle.noframes.xslt}"/>
+ <available file="${checkstyle.config}"/>
+ </and>
+ </condition>
+ <target name="checkstyle-avail" unless="checkstyle.avail">
+ <echo message="Checkstyle support NOT present. Please download it from http://checkstyle.sf.net/ and"/>
+ <echo message="... please provide ${checkstyle.location}"/>
+ <echo message="... please provide ${checkstyle.noframes.xslt}"/>
+ <echo message="... please provide ${checkstyle.config}"/>
+ </target>
+ <target name="checkstyle" depends="package, checkstyle-avail" if="checkstyle.avail" description="Runs Checkstyle for a code quality report">
+ <taskdef name="checkstyle" classname="com.puppycrawl.tools.checkstyle.CheckStyleTask" classpathref="checkstyle-classpath"/>
+ <mkdir dir="${build.dir}"/>
+ <checkstyle config="${checkstyle.config}" failonviolation="false">
+ <classpath>
+ <path refid="checkstyle-classpath"/>
+ <pathelement location="${build.classes.dir}"/>
+ <pathelement location="${build.sandbox-classes.dir}"/>
+ <pathelement location="${build.codegen-classes.dir}"/>
+ </classpath>
+ <fileset dir="${src.dir}" includes="**/*.java"/>
+ <formatter type="xml" toFile="${build.dir}/report_checkstyle.xml"/>
+ </checkstyle>
+ <xslt in="${build.dir}/report_checkstyle.xml" out="${build.dir}/report_checkstyle.html" style="${checkstyle.noframes.xslt}"/>
+ </target>
+
+ <!--
<property name="checkstyle.home.dir" value="${optional.lib.dir}"/>
<property name="checkstyle.noframes.xslt" value="${checkstyle.home.dir}/contrib/checkstyle-noframes.xsl"/>
@@ -518,6 +552,7 @@ NOTE:
</target>
<target name="checkstyle" depends="checkstyle-avail, checkstyle-check, checkstyle-html" description="Runs Checkstyle for a code quality report"/>
+ -->
<!-- =================================================================== -->
<!-- Creates the documentation -->
Oops, something went wrong.

0 comments on commit 5fbfeb3

Please sign in to comment.