You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xmlgraphics.apache.org by je...@apache.org on 2006/02/26 19:12:49 UTC

svn commit: r381133 [1/2] - in /xmlgraphics/commons/trunk: ./ lib/ src/ src/java-1.3/ src/java-1.4/ src/java/ src/java/org/ src/java/org/apache/ src/java/org/apache/xmlgraphics/ src/java/org/apache/xmlgraphics/image/ src/java/org/apache/xmlgraphics/ima...

Author: jeremias
Date: Sun Feb 26 10:12:43 2006
New Revision: 381133

URL: http://svn.apache.org/viewcvs?rev=381133&view=rev
Log:
Finally starting to get some meat on the bone:
Ported internal codecs from Batik.
Ported ImageWriter SPI from Batik. No implementations, yet!
Ported Base64 utility classes as they are used by FOP, too.
Ported those GraphicsUtil methods from Batik which are used by either the codecs or FOP, i.e. should be universally usable. The same applies for some support classes from the ext.awt.image.rendered package.
Ported the Service class from Batik (used by ImageWriter SPI and FOP has a copy which can later be removed).
Initial build script added.

Added:
    xmlgraphics/commons/trunk/build.xml   (with props)
    xmlgraphics/commons/trunk/lib/
    xmlgraphics/commons/trunk/src/
    xmlgraphics/commons/trunk/src/java/
    xmlgraphics/commons/trunk/src/java-1.3/
    xmlgraphics/commons/trunk/src/java-1.4/
    xmlgraphics/commons/trunk/src/java/org/
    xmlgraphics/commons/trunk/src/java/org/apache/
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/GraphicsUtil.java
      - copied, changed from r381105, xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/GraphicsUtil.java
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/png/
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/png/PNGDecodeParam.java
      - copied, changed from r379725, xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/png/PNGDecodeParam.java
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/png/PNGEncodeParam.java
      - copied, changed from r379725, xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/png/PNGEncodeParam.java
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/png/PNGImageDecoder.java
      - copied, changed from r379725, xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/png/PNGImageDecoder.java
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/png/PNGImageEncoder.java
      - copied, changed from r379725, xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/png/PNGImageEncoder.java
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/png/PNGRed.java
      - copied, changed from r379725, xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/png/PNGRed.java
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/png/PNGSuggestedPaletteEntry.java
      - copied, changed from r379725, xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/png/PNGSuggestedPaletteEntry.java
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFDecodeParam.java
      - copied, changed from r381100, xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/tiff/TIFFDecodeParam.java
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFDirectory.java
      - copied, changed from r381100, xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/tiff/TIFFDirectory.java
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFEncodeParam.java
      - copied, changed from r381100, xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/tiff/TIFFEncodeParam.java
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFFaxDecoder.java
      - copied, changed from r381100, xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/tiff/TIFFFaxDecoder.java
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFField.java
      - copied, changed from r381100, xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/tiff/TIFFField.java
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFImage.java
      - copied, changed from r381100, xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/tiff/TIFFImage.java
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFImageDecoder.java
      - copied, changed from r381100, xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/tiff/TIFFImageDecoder.java
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFImageEncoder.java
      - copied, changed from r381100, xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/tiff/TIFFImageEncoder.java
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFLZWDecoder.java
      - copied, changed from r381100, xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/tiff/TIFFLZWDecoder.java
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/FileCacheSeekableStream.java
      - copied, changed from r381102, xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/util/FileCacheSeekableStream.java
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/ForwardSeekableStream.java
      - copied, changed from r381102, xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/util/ForwardSeekableStream.java
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/ImageDecodeParam.java
      - copied, changed from r381103, xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/util/ImageDecodeParam.java
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/ImageDecoder.java
      - copied, changed from r381103, xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/util/ImageDecoder.java
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/ImageDecoderImpl.java
      - copied, changed from r381103, xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/util/ImageDecoderImpl.java
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/ImageEncodeParam.java
      - copied, changed from r381103, xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/util/ImageEncodeParam.java
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/ImageEncoder.java
      - copied, changed from r381103, xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/util/ImageEncoder.java
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/ImageEncoderImpl.java
      - copied, changed from r381103, xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/util/ImageEncoderImpl.java
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/MemoryCacheSeekableStream.java
      - copied, changed from r381102, xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/util/MemoryCacheSeekableStream.java
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/PropertyUtil.java
      - copied, changed from r379726, xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/util/PropertyUtil.java
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/SeekableOutputStream.java
      - copied, changed from r381105, xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/util/SeekableOutputStream.java
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/SeekableStream.java
      - copied, changed from r381101, xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/util/SeekableStream.java
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/SimpleRenderedImage.java
      - copied, changed from r381103, xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/util/SimpleRenderedImage.java
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/SingleTileRenderedImage.java
      - copied, changed from r381103, xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/util/SingleTileRenderedImage.java
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/package.html
      - copied, changed from r381123, xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/package.html
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/rendered/
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/rendered/AbstractRed.java
      - copied, changed from r381105, xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/rendered/AbstractRed.java
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/rendered/Any2sRGBRed.java
      - copied, changed from r381114, xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/rendered/Any2sRGBRed.java
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/rendered/BufferedImageCachableRed.java
      - copied, changed from r381120, xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/rendered/BufferedImageCachableRed.java
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/rendered/CachableRed.java
      - copied, changed from r381105, xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/rendered/CachableRed.java
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/rendered/FormatRed.java
      - copied, changed from r381120, xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/rendered/FormatRed.java
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/rendered/RenderedImageCachableRed.java
      - copied, changed from r381120, xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/rendered/RenderedImageCachableRed.java
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/spi/
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/spi/ImageWriter.java
      - copied, changed from r381105, xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/spi/ImageWriter.java
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/spi/ImageWriterParams.java
      - copied, changed from r381105, xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/spi/ImageWriterParams.java
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/spi/ImageWriterRegistry.java
      - copied, changed from r381105, xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/spi/ImageWriterRegistry.java
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/overview.html   (with props)
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/util/
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/util/Service.java
      - copied, changed from r381107, xmlgraphics/batik/trunk/sources/org/apache/batik/util/Service.java
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/util/i18n/
      - copied from r379730, xmlgraphics/batik/trunk/sources/org/apache/batik/i18n/
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/util/io/
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/util/io/Base64DecodeStream.java
      - copied, changed from r381118, xmlgraphics/batik/trunk/sources/org/apache/batik/util/Base64DecodeStream.java
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/util/io/Base64EncodeStream.java
      - copied, changed from r381119, xmlgraphics/batik/trunk/sources/org/apache/batik/util/Base64EncoderStream.java
    xmlgraphics/commons/trunk/src/resources/
    xmlgraphics/commons/trunk/src/resources/META-INF/
    xmlgraphics/commons/trunk/src/resources/META-INF/services/
    xmlgraphics/commons/trunk/src/resources/META-INF/services/org.apache.xmlgraphics.image.spi.ImageWriter
    xmlgraphics/commons/trunk/src/resources/org/
    xmlgraphics/commons/trunk/src/resources/org/apache/
    xmlgraphics/commons/trunk/src/resources/org/apache/xmlgraphics/
Modified:
    xmlgraphics/commons/trunk/   (props changed)
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/util/i18n/ExtendedLocalizable.java
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/util/i18n/LocaleGroup.java
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/util/i18n/Localizable.java
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/util/i18n/LocalizableSupport.java

Propchange: xmlgraphics/commons/trunk/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sun Feb 26 10:12:43 2006
@@ -0,0 +1,3 @@
+build
+.classpath
+.project

Added: xmlgraphics/commons/trunk/build.xml
URL: http://svn.apache.org/viewcvs/xmlgraphics/commons/trunk/build.xml?rev=381133&view=auto
==============================================================================
--- xmlgraphics/commons/trunk/build.xml (added)
+++ xmlgraphics/commons/trunk/build.xml Sun Feb 26 10:12:43 2006
@@ -0,0 +1,369 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 2006 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<project default="all" basedir="." name="xmlgraphics-commons">
+
+  <!-- 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 file="${basedir}/build-local.properties"/>
+  <property file="${basedir}/build.properties"/>
+  <property environment="env"/>
+
+  <path id="libs-build-classpath">
+    <fileset dir="${basedir}/lib">
+      <include name="*.jar"/>
+    </fileset>
+  </path>
+
+  <path id="libs-run-classpath">
+    <fileset dir="${basedir}/lib">
+      <include name="*.jar"/>
+    </fileset>
+    <fileset dir="${basedir}/build">
+      <include name="xmlgraphics-commons.jar"/>
+    </fileset>
+  </path>
+
+  <property name="Name" value="Apache XML Graphics Commons"/>
+  <property name="name" value="xmlgraphics-commons"/>
+  <property name="version" value="0.1svn"/>
+  <property name="year" value="1999-2006"/>
+
+  <property name="javac.debug" value="on"/>
+  <property name="javac.optimize" value="off"/>
+  <property name="javac.deprecation" value="on"/>
+  <property name="javac.source" value="1.3"/>
+  <property name="javac.target" value="1.3"/>
+  <property name="javac.fork" value="no"/>
+
+  <property name="junit.fork" value="on"/>
+
+  <property name="javadoc.packages" value="org.apache.xmlgraphics.*"/>
+  
+  <property name="src.dir" value="${basedir}/src"/>
+  <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="build.dir" value="${basedir}/build"/>
+  <property name="build.classes.dir" value="${build.dir}/classes"/>
+  <property name="build.javadocs.dir" value="${build.dir}/javadocs"/>
+
+  <!-- =================================================================== -->
+  <!-- Initialization target                                               -->
+  <!-- =================================================================== -->
+  <target name="info">
+    <echo message="------------------- ${Name} ${version} [${year}] ----------------"/>
+    <echo message="See build.properties and build-local.properties for additional build settings"/>
+    <echo message="${ant.version}"/>
+    <echo message="VM: ${java.vm.version}, ${java.vm.vendor}"/>
+    <echo message="JAVA_HOME: ${env.JAVA_HOME}"/>
+  </target>
+  
+  <target name="init" depends="info, init-avail, init-filters-jdk14, init-filters-jdk13"/>
+
+  <target name="init-avail">
+    <available property="jdk14.present" classname="java.lang.CharSequence"/>
+
+    <available property="junit.present" classname="junit.framework.TestCase"
+        classpathref="libs-build-classpath"/>
+    <condition property="junit.message" value="JUnit Support PRESENT">
+      <equals arg1="${junit.present}" arg2="true"/>
+    </condition>
+    <condition property="junit.message" value="JUnit Support NOT Present - Committers are required to have JUnit working">
+      <not>
+        <equals arg1="${junit.present}" arg2="true"/>
+      </not>
+    </condition>
+    <echo message="${junit.message}"/>
+  </target>
+
+  <target name="init-filters-jdk13" depends="init-avail" unless="jdk14.present">
+    <echo message="Use GraphicsConfiguration adapter for JDK 1.3 or earlier."/>
+    <path id="graphics-configuration-adapter">
+      <pathelement location="src/java-1.3"/>
+    </path>
+  </target>
+
+  <target name="init-filters-jdk14" depends="init-avail" if="jdk14.present">
+    <echo message="Use GraphicsConfiguration adapter for JDK 1.4."/>
+    <path id="graphics-configuration-adapter">
+      <pathelement location="src/java-1.4"/>
+    </path>
+  </target>
+
+  <!-- =================================================================== -->
+  <!-- Help on usage                                                       -->
+  <!-- =================================================================== -->
+  <target name="usage">
+    <echo message="Use the -projecthelp option instead"/>
+  </target>
+
+  <!-- =================================================================== -->
+  <!-- Compiles the source directory                                       -->
+  <!-- =================================================================== -->
+  <target name="compile-java" depends="init" description="Compiles the source code">
+    <!-- create directories -->
+    <mkdir dir="${build.classes.dir}"/>
+    <javac destdir="${build.classes.dir}" fork="${javac.fork}" debug="${javac.debug}"
+           deprecation="${javac.deprecation}" optimize="${javac.optimize}"
+           source="${javac.source}" target="${javac.target}">
+      <src path="${src.java.dir}"/>
+      <src refid="graphics-configuration-adapter"/>
+      <patternset includes="**/*.java"/>
+      <classpath refid="libs-build-classpath"/>
+    </javac>
+    <copy todir="${build.classes.dir}">
+      <fileset dir="${src.res.dir}"/>
+    </copy>
+  </target>
+
+  <!-- =================================================================== -->
+  <!-- Creates JAR files                                                   -->
+  <!-- =================================================================== -->
+
+  <target name="uptodate-jar-main" depends="compile-java">
+    <uptodate property="jar.main.uptodate" targetfile="${build.dir}/${name}.jar">
+      <srcfiles dir= "${build.classes.dir}"/>
+    </uptodate>
+  </target>
+
+  <target name="jar-main" depends="compile-java,uptodate-jar-main" description="Generates the main jar file" unless="jar.main.uptodate">
+    <tstamp>
+      <format property="ts" pattern="yyyyMMdd-HHmmss-z"/>
+    </tstamp>
+    <jar jarfile="${build.dir}/${name}.jar" basedir="${build.classes.dir}">
+      <manifest>
+        <attribute name="Implementation-Title" value="${Name}"/>
+        <attribute name="Implementation-Version" value="${version}"/>
+        <attribute name="Implementation-Vendor" value="The Apache Software Foundation (http://xmlgraphics.apache.org/)"/>
+        <attribute name="Build-Id" value="${ts} (${user.name} [${os.name} ${os.version} ${os.arch}, Java ${java.runtime.version}])"/>
+      </manifest>
+    </jar>
+  </target>
+
+  <target name="package" depends="jar-main" description="Generates the jar files"/>
+
+  <!-- =================================================================== -->
+  <!-- Default Target                                                      -->
+  <!-- =================================================================== -->
+
+  <target name="all" depends="package"/> <!-- "all" target for us Makefile converts ;-) -->
+
+  <!-- =================================================================== -->
+  <!-- Special target for Gump                                             -->
+  <!-- =================================================================== -->
+
+  <target name="gump" depends="all, javadocs"/>
+
+  <!-- =================================================================== -->
+  <!-- Testing                                                             -->
+  <!-- =================================================================== -->
+  <!--target name="junit-with-xmlunit" depends="init-avail" if="xmlunit.present">
+    <patternset id="test-sources"/>
+  </target>
+  <target name="junit-without-xmlunit" depends="init-avail" unless="xmlunit.present">
+    <patternset id="test-sources">
+      <exclude name="**/intermediate/*"/>
+    </patternset>
+  </target>
+  <target name="junit-compile" depends="package, transcoder-pkg, junit-with-xmlunit, junit-without-xmlunit" description="Runs FOP's JUnit tests" if="junit.present">
+    <mkdir dir="${build.dir}/test-classes"/>
+    <javac destdir="${build.dir}/test-classes" fork="${javac.fork}"
+           debug="${javac.debug}" deprecation="${javac.deprecation}"
+           optimize="${javac.optimize}" source="${javac.source}"
+           target="${javac.target}">
+      <src path="${basedir}/test/java"/>
+      <patternset refid="test-sources"/>
+      <classpath>
+        <path refid="libs-build-classpath"/>
+        <fileset dir="${build.dir}">
+          <include name="${name}.jar"/>
+        </fileset>
+      </classpath>
+    </javac>
+  </target>
+
+  <target name="junit" depends="junit-basic, junit-transcoder, junit-layout, junit-fotree, junit-intermediate-format" description="Runs all of FOP's JUnit tests" if="junit.present">
+    <fail>
+      <condition>
+        <or>
+          <isset property="fop.junit.error"/>
+          <isset property="fop.junit.failure"/>
+          <not>
+            <isset property="hyphenation.present"/>
+          </not>
+        </or>
+      </condition>
+NOTE:
+**************************************************************************
+* One or more of the Junit tests had Failures or Errors or were skipped! *
+*         Please check the output above for relevant messages.           *
+**************************************************************************
+    </fail>
+    <echo>All Junit tests passed!</echo>
+  </target-->
+
+  <!-- =================================================================== -->
+  <!-- Creates the API documentation                                       -->
+  <!-- =================================================================== -->
+  <target name="javadocs" depends="init" description="Generates javadocs">
+    <property name="javadoc.public"  value="false"/>
+    <property name="javadoc.package" value="false"/>
+    <property name="javadoc.private" value="false"/>
+    <condition property="javadoc.level" value=" (level: private)">
+      <equals arg1="${javadoc.private}" arg2="true"/>
+    </condition>
+    <condition property="javadoc.level" value=" (level: package)">
+      <equals arg1="${javadoc.package}" arg2="true"/>
+    </condition>
+    <condition property="javadoc.level" value=" (level: public)">
+      <equals arg1="${javadoc.public}" arg2="true"/>
+    </condition>
+    <property name="javadoc.level" value=""/>
+    <echo message="Producing the javadoc files${javadoc.level}"/>
+    <mkdir dir="${build.javadocs.dir}"/>
+
+    <javadoc
+        packagenames="${javadoc.packages}"
+        destdir="${build.javadocs.dir}"
+        author="true"
+        version="true"
+        windowtitle="${Name} ${version} API"
+        doctitle="Apache XML Graphics Commons"
+        bottom="Copyright ${year} The Apache Software Foundation. All Rights Reserved."
+        overview="${src.dir}/java/org/apache/xmlgraphics/overview.html"
+        use="true"
+        failonerror="true"
+        public="${javadoc.public}"
+        package="${javadoc.package}"
+        private="${javadoc.private}">
+      <header><![CDATA[${name} ${version}]]></header>
+      <footer><![CDATA[${name} ${version}]]></footer>
+      <classpath>
+        <path refid="libs-build-classpath"/>
+        <pathelement path="${java.class.path}"/>
+      </classpath>
+      <sourcepath>
+        <pathelement path="${src.java.dir}"/>
+        <path refid="graphics-configuration-adapter"/>
+      </sourcepath>
+      <tag name="todo" scope="all" description="To do:"/>
+      <group title="Images">
+        <package name="org.apache.xmlgraphics.image"/>
+        <package name="org.apache.xmlgraphics.image.*"/>
+      </group>
+      <group title="Utility">
+        <package name="org.apache.xmlgraphics.util"/>
+        <package name="org.apache.xmlgraphics.util.*"/>
+      </group>
+    </javadoc>
+  </target>
+
+  <!-- =================================================================== -->
+  <!-- Checkstyle                                                          -->
+  <!-- =================================================================== -->
+  <property name="checkstyle.home.dir" value="${optional.lib.dir}"/>
+  <property name="checkstyle.noframes.xslt" value="${checkstyle.home.dir}/contrib/checkstyle-noframes.xsl"/>
+
+  <path id="checkstyle-path">
+    <fileset dir="${checkstyle.home.dir}">
+      <include name="checkstyle-all-*.jar"/>
+      <include name="checkstyle-*.jar"/>
+      <include name="antlr*.jar"/>
+      <include name="commons-beanutils*.jar"/>
+      <include name="commons-collections*.jar"/>
+      <include name="commons-logging*.jar"/>
+      <include name="jakarta-regexp*.jar"/>      
+    </fileset>
+  </path>
+
+  <path id="checkstyle-runpath">
+    <path refid="checkstyle-path"/>
+  </path>
+
+  <target name="checkstyle-avail" depends="init">
+    <available property="checkstyle.available" classname="com.puppycrawl.tools.checkstyle.CheckStyleTask" classpathref="checkstyle-path"/>
+    <available property="checkstyle.4.x" classname="com.puppycrawl.tools.checkstyle.checks.coding.ModifiedControlVariableCheck" classpathref="checkstyle-path"/>
+    <available property="checkstyle.noframes.xslt.available" file="${checkstyle.noframes.xslt}"/>
+    <condition property="checkstyle.message" value="Checkstyle 4.x Support PRESENT">
+      <and>
+        <equals arg1="${checkstyle.available}" arg2="true"/>
+        <equals arg1="${checkstyle.4.x}" arg2="true"/>
+      </and>
+    </condition>
+    <condition property="checkstyle.message" value="Checkstyle 3.x Support PRESENT">
+      <equals arg1="${checkstyle.available}" arg2="true"/>
+    </condition>
+    <condition property="checkstyle.message" value="Checkstyle Support NOT Present">
+      <not>
+        <equals arg1="${checkstyle.available}" arg2="true"/>
+      </not>
+    </condition>
+    <echo message="${checkstyle.message}"/>
+    <condition property="checkstyle.config" value="checkstyle-4.0.xml">
+      <equals arg1="${checkstyle.4.x}" arg2="true"/>
+    </condition>
+    <condition property="checkstyle.config" value="checkstyle-3.5-fop-head.xml">
+      <not>
+        <equals arg1="${checkstyle.4.x}" arg2="true"/>
+      </not>
+    </condition>
+    <condition property="checkstyle.noframes.xslt.message" value="Checkstyle HTML style sheet support PRESENT">
+      <equals arg1="${checkstyle.noframes.xslt.available}" arg2="true"/>
+    </condition>
+    <condition property="checkstyle.noframes.xslt.message" value="Checkstyle HTML style sheet support NOT Present">
+      <not>
+        <equals arg1="${checkstyle.noframes.xslt.available}" arg2="true"/>
+      </not>
+    </condition>
+    <echo message="${checkstyle.noframes.xslt.message}"/>
+  </target>
+
+  <target name="checkstyle-check" depends="checkstyle-avail, init" if="checkstyle.available">
+    
+    <taskdef name="checkstyle" classname="com.puppycrawl.tools.checkstyle.CheckStyleTask" classpathref="checkstyle-runpath"/>
+    <checkstyle config="${checkstyle.config}" failonviolation="false"
+                classpathref="checkstyle-runpath">
+      <fileset dir="${src.java.dir}" includes="**/*.java"/>
+      <formatter type="plain" toFile="${build.dir}/checkstyle_report.txt"/>
+      <formatter type="xml" toFile="${build.dir}/checkstyle_report.xml"/>
+    </checkstyle>
+  </target>
+
+  <target name="checkstyle-html" depends="checkstyle-avail, checkstyle-check" if="checkstyle.noframes.xslt.available">
+    <style in="${build.dir}/checkstyle_report.xml" out="${build.dir}/checkstyle_report.html" style="${checkstyle.noframes.xslt}"/>
+  </target>
+
+  <target name="checkstyle" depends="checkstyle-avail, checkstyle-check, checkstyle-html" description="Runs Checkstyle for a code quality report"/>
+
+  <!-- =================================================================== -->
+  <!-- Clean targets                                                       -->
+  <!-- =================================================================== -->
+  <target name="clean" description="Cleans the build directory">
+    <delete dir="${build.dir}"/>
+  </target>
+
+  <target name="distclean" depends="clean" description="Cleans the distribution target directories">
+    <delete dir="${dist.src.dir}"/>
+    <delete dir="${dist.bin.dir}"/>
+    <delete>
+      <fileset dir="${basedir}" includes="${name}-*.tar.gz"/>
+      <fileset dir="${basedir}" includes="${name}-*.zip"/>
+    </delete>
+  </target>
+  
+</project>

Propchange: xmlgraphics/commons/trunk/build.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: xmlgraphics/commons/trunk/build.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Copied: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/GraphicsUtil.java (from r381105, xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/GraphicsUtil.java)
URL: http://svn.apache.org/viewcvs/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/GraphicsUtil.java?p2=xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/GraphicsUtil.java&p1=xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/GraphicsUtil.java&r1=381105&r2=381133&rev=381133&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/GraphicsUtil.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/GraphicsUtil.java Sun Feb 26 10:12:43 2006
@@ -1,6 +1,6 @@
 /*
 
-   Copyright 2001-2004  The Apache Software Foundation 
+   Copyright 2001-2004,2006  The Apache Software Foundation 
 
    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
@@ -15,19 +15,12 @@
    limitations under the License.
 
  */
-package org.apache.batik.ext.awt.image;
+package org.apache.xmlgraphics.image;
 
-import java.awt.Composite;
-import java.awt.Graphics2D;
-import java.awt.GraphicsConfiguration;
-import java.awt.GraphicsDevice;
 import java.awt.Point;
 import java.awt.Rectangle;
-import java.awt.RenderingHints;
-import java.awt.Shape;
 import java.awt.color.ColorSpace;
 import java.awt.geom.AffineTransform;
-import java.awt.geom.Rectangle2D;
 import java.awt.image.BufferedImage;
 import java.awt.image.ColorModel;
 import java.awt.image.ComponentSampleModel;
@@ -42,22 +35,11 @@
 import java.awt.image.SampleModel;
 import java.awt.image.SinglePixelPackedSampleModel;
 import java.awt.image.WritableRaster;
-import java.awt.image.renderable.RenderContext;
-import java.awt.image.renderable.RenderableImage;
-import java.lang.ref.Reference;
-import java.lang.ref.WeakReference;
-
-import org.apache.batik.ext.awt.RenderingHintsKeyExt;
-import org.apache.batik.ext.awt.image.renderable.PaintRable;
-import org.apache.batik.ext.awt.image.rendered.AffineRed;
-import org.apache.batik.ext.awt.image.rendered.Any2LsRGBRed;
-import org.apache.batik.ext.awt.image.rendered.Any2sRGBRed;
-import org.apache.batik.ext.awt.image.rendered.BufferedImageCachableRed;
-import org.apache.batik.ext.awt.image.rendered.CachableRed;
-import org.apache.batik.ext.awt.image.rendered.FormatRed;
-import org.apache.batik.ext.awt.image.rendered.RenderedImageCachableRed;
-import org.apache.batik.ext.awt.image.rendered.TranslateRed;
 
+import org.apache.xmlgraphics.image.rendered.Any2sRGBRed;
+import org.apache.xmlgraphics.image.rendered.BufferedImageCachableRed;
+import org.apache.xmlgraphics.image.rendered.CachableRed;
+import org.apache.xmlgraphics.image.rendered.RenderedImageCachableRed;
 
 /**
  * Set of utility methods for Graphics.
@@ -72,493 +54,6 @@
     public static AffineTransform IDENTITY = new AffineTransform();
 
     /**
-     * Draws <tt>ri</tt> into <tt>g2d</tt>.  It does this be
-     * requesting tiles from <tt>ri</tt> and drawing them individually
-     * in <tt>g2d</tt> it also takes care of some colorspace and alpha
-     * issues.
-     * @param g2d The Graphics2D to draw into.
-     * @param ri  The image to be drawn.
-     */
-    public static void drawImage(Graphics2D g2d,
-                                 RenderedImage ri) {
-        drawImage(g2d, wrap(ri));
-    }
-
-    /**
-     * Draws <tt>cr</tt> into <tt>g2d</tt>.  It does this be
-     * requesting tiles from <tt>ri</tt> and drawing them individually
-     * in <tt>g2d</tt> it also takes care of some colorspace and alpha
-     * issues.
-     * @param g2d The Graphics2D to draw into.
-     * @param cr  The image to be drawn.
-     */
-    public static void drawImage(Graphics2D g2d,
-                                 CachableRed cr) {
-
-        // System.out.println("DrawImage G: " + g2d);
-
-        AffineTransform at = null;
-        while (true) {
-            if (cr instanceof AffineRed) {
-                AffineRed ar = (AffineRed)cr;
-                if (at == null)
-                    at = ar.getTransform();
-                else
-                    at.concatenate(ar.getTransform());
-                cr = ar.getSource();
-                continue;
-            } else if (cr instanceof TranslateRed) {
-                TranslateRed tr = (TranslateRed)cr;
-                // System.out.println("testing Translate");
-                int dx = tr.getDeltaX();
-                int dy = tr.getDeltaY();
-                if (at == null)
-                    at = AffineTransform.getTranslateInstance(dx, dy);
-                else
-                    at.translate(dx, dy);
-                cr = tr.getSource();
-                continue;
-            }
-            break;
-        }
-        AffineTransform g2dAt   = g2d.getTransform();
-        if ((at == null) || (at.isIdentity()))
-            at = g2dAt;
-        else
-            at.preConcatenate(g2dAt);
-
-        ColorModel srcCM = cr.getColorModel();
-        ColorModel g2dCM = getDestinationColorModel(g2d);
-        ColorSpace g2dCS = null;
-        if (g2dCM != null)
-            g2dCS = g2dCM.getColorSpace();
-        if (g2dCS == null)
-            // Assume device is sRGB
-            g2dCS = ColorSpace.getInstance(ColorSpace.CS_sRGB);
-
-        ColorModel drawCM = g2dCM;
-        if ((g2dCM == null) || !g2dCM.hasAlpha()) {
-            // If we can't find out about our device or the device
-            // does not support alpha just use SRGB unpremultiplied
-            // (Just because this seems to work for us).
-            drawCM = sRGB_Unpre;
-        }
-
-        if (cr instanceof BufferedImageCachableRed) {
-            // There is a huge win if we can use the BI directly here.
-            // This results in something like a 10x performance gain
-            // for images, the best thing is this is the common case.
-            if (g2dCS.equals(srcCM.getColorSpace()) &&
-                drawCM.equals(srcCM)) {
-                // System.err.println("Fast Case");
-                g2d.setTransform(at);
-                BufferedImageCachableRed bicr;
-                bicr = (BufferedImageCachableRed)cr;
-                g2d.drawImage(bicr.getBufferedImage(),
-                              bicr.getMinX(), bicr.getMinY(), null);
-                g2d.setTransform(g2dAt);
-                return;
-            }
-        }
-
-        // Scaling down so do it before color conversion.
-        double determinant = at.getDeterminant();
-        if (!at.isIdentity() && (determinant <= 1.0)) {
-            if (at.getType() != AffineTransform.TYPE_TRANSLATION)
-                cr = new AffineRed(cr, at, g2d.getRenderingHints());
-            else {
-                int xloc = cr.getMinX() + (int)at.getTranslateX();
-                int yloc = cr.getMinY() + (int)at.getTranslateY();
-                cr = new TranslateRed(cr, xloc, yloc);
-            }
-        }
-
-        if (g2dCS != srcCM.getColorSpace()) {
-            // System.out.println("srcCS: " + srcCM.getColorSpace());
-            // System.out.println("g2dCS: " + g2dCS);
-            // System.out.println("sRGB: " +
-            //                    ColorSpace.getInstance(ColorSpace.CS_sRGB));
-            // System.out.println("LsRGB: " +
-            //                    ColorSpace.getInstance
-            //                    (ColorSpace.CS_LINEAR_RGB));
-            if      (g2dCS == ColorSpace.getInstance(ColorSpace.CS_sRGB))
-                cr = convertTosRGB(cr);
-            else if (g2dCS == ColorSpace.getInstance(ColorSpace.CS_LINEAR_RGB))
-                cr = convertToLsRGB(cr);
-        }
-        srcCM = cr.getColorModel();
-        if (!drawCM.equals(srcCM))
-            cr = FormatRed.construct(cr, drawCM);
-
-        // Scaling up so do it after color conversion.
-        if (!at.isIdentity() && (determinant > 1.0))
-            cr = new AffineRed(cr, at, g2d.getRenderingHints());
-
-        // Now CR is in device space, so clear the g2d transform.
-        g2d.setTransform(IDENTITY);
-
-        // Ugly Hack alert.  This Makes it use our SrcOver implementation
-        // Which doesn't seem to have as many bugs as the JDK one when
-        // going between different src's and destinations (of course it's
-        // also a lot slower).
-        Composite g2dComposite = g2d.getComposite();
-        if (g2d.getRenderingHint(RenderingHintsKeyExt.KEY_TRANSCODING) ==
-            RenderingHintsKeyExt.VALUE_TRANSCODING_PRINTING) {
-            if (SVGComposite.OVER.equals(g2dComposite)) {
-                g2d.setComposite(SVGComposite.OVER);
-            }
-        }
-        Rectangle crR  = cr.getBounds();
-        Shape     clip = g2d.getClip();
-
-        try {
-            Rectangle clipR;
-            if (clip == null) {
-                clip  = crR;
-                clipR = crR;
-            } else {
-                clipR   = clip.getBounds();
-
-                if (clipR.intersects(crR) == false)
-                    return; // Nothing to draw...
-                clipR = clipR.intersection(crR);
-            }
-
-            Rectangle gcR = getDestinationBounds(g2d);
-            // System.out.println("ClipRects: " + clipR + " -> " + gcR);
-            if (gcR != null) {
-                if (clipR.intersects(gcR) == false)
-                    return; // Nothing to draw...
-                clipR = clipR.intersection(gcR);
-            }
-
-            // System.out.println("Starting Draw: " + cr);
-            // long startTime = System.currentTimeMillis();
-
-            boolean useDrawRenderedImage = false;
-
-            srcCM = cr.getColorModel();
-            SampleModel srcSM = cr.getSampleModel();
-            if ((srcSM.getWidth()*srcSM.getHeight()) >=
-                (clipR.width*clipR.height))
-                // if srcSM tiles are around the clip size
-                // then just draw the renderedImage 
-                useDrawRenderedImage = true;
-
-            Object atpHint = g2d.getRenderingHint
-                (RenderingHintsKeyExt.KEY_AVOID_TILE_PAINTING);
-
-            if (atpHint == RenderingHintsKeyExt.VALUE_AVOID_TILE_PAINTING_ON)
-                useDrawRenderedImage = true; //for PDF and PS transcoders
-
-            if (atpHint == RenderingHintsKeyExt.VALUE_AVOID_TILE_PAINTING_OFF)
-                useDrawRenderedImage = false;
-
-
-            WritableRaster wr;
-            if (useDrawRenderedImage) {
-                // This can be significantly faster but can also
-                // require much more memory, so we only use it when
-                // the clip size is smaller than the tile size.
-                Raster r = cr.getData(clipR);
-                wr = ((WritableRaster)r).createWritableChild
-                    (clipR.x, clipR.y, clipR.width, clipR.height, 
-                     0, 0, null);
-                
-                BufferedImage bi = new BufferedImage
-                    (srcCM, wr, srcCM.isAlphaPremultiplied(), null);
-                
-                // Any of the drawImage calls that take an
-                // Affine are prone to the 'CGGStackRestore: gstack 
-                // underflow' bug on Mac OS X.  This should work
-                // around that problem.
-                g2d.drawImage(bi, clipR.x, clipR.y, null);
-            } else {
-                // Use tiles to draw image...
-                wr = Raster.createWritableRaster(srcSM, new Point(0,0));
-                BufferedImage bi = new BufferedImage
-                    (srcCM, wr, srcCM.isAlphaPremultiplied(), null);
-
-                int xt0 = cr.getMinTileX();
-                int xt1 = xt0+cr.getNumXTiles();
-                int yt0 = cr.getMinTileY();
-                int yt1 = yt0+cr.getNumYTiles();
-                int tw  = srcSM.getWidth();
-                int th  = srcSM.getHeight();
-
-                Rectangle tR  = new Rectangle(0,0,tw,th);
-                Rectangle iR  = new Rectangle(0,0,0,0);
-
-                if (false) {
-                    System.err.println("SrcCM: " + srcCM);
-                    System.err.println("CR: " + cr);
-                    System.err.println("CRR: " + crR + " TG: [" +
-                                       xt0 +"," +
-                                       yt0 +"," +
-                                       xt1 +"," +
-                                       yt1 +"] Off: " +
-                                       cr.getTileGridXOffset() +"," +
-                                       cr.getTileGridYOffset());
-                }
-
-                int yloc = yt0*th+cr.getTileGridYOffset();
-                int skip = (clipR.y-yloc)/th;
-                if (skip <0) skip = 0;
-                yt0+=skip;
-
-                int xloc = xt0*tw+cr.getTileGridXOffset();
-                skip = (clipR.x-xloc)/tw;
-                if (skip <0) skip = 0;
-                xt0+=skip;
-
-                int endX = clipR.x+clipR.width-1;
-                int endY = clipR.y+clipR.height-1;
-
-                if (false) {
-                    System.out.println("clipR: " + clipR + " TG: [" +
-                                       xt0 +"," +
-                                       yt0 +"," +
-                                       xt1 +"," +
-                                       yt1 +"] Off: " +
-                                       cr.getTileGridXOffset() +"," +
-                                       cr.getTileGridYOffset());
-                }
-
-
-                yloc = yt0*th+cr.getTileGridYOffset();
-                int minX = xt0*tw+cr.getTileGridXOffset();
-                int xStep = tw;
-                xloc = minX;
-                for (int y=yt0; y<yt1; y++, yloc += th) {
-                    if (yloc > endY) break;
-                    for (int x=xt0; x<xt1; x++, xloc+=xStep) {
-                        if ((xloc<minX) || (xloc > endX)) break;
-                        tR.x = xloc;
-                        tR.y = yloc;
-                        Rectangle2D.intersect(crR, tR, iR);
-
-                        WritableRaster twr;
-                        twr = wr.createWritableChild(0, 0,
-                                                     iR.width, iR.height,
-                                                     iR.x, iR.y, null);
-
-                        // System.out.println("Generating tile: " + twr);
-                        cr.copyData(twr);
-
-                        // Make sure we only draw the region that was written.
-                        BufferedImage subBI;
-                        subBI = bi.getSubimage(0, 0, iR.width,  iR.height);
-
-                        if (false) {
-                            System.out.println("Drawing: " + tR);
-                            System.out.println("IR: "      + iR);
-                        }
-
-                        // For some reason using the transform version
-                        // causes a gStackUnderflow error but if I just 
-                        // use the drawImage with an x & y it works.
-                        g2d.drawImage(subBI, iR.x, iR.y, null);
-                        // AffineTransform trans 
-                        //  = AffineTransform.getTranslateInstance(iR.x, iR.y);
-                        // g2d.drawImage(subBI, trans, null);
-
-                        // String label = "sub [" + x + ", " + y + "]: ";
-                        // org.ImageDisplay.showImage
-                        //     (label, subBI);
-                    }
-                    xStep = -xStep; // Reverse directions.
-                    xloc += xStep;   // Get back in bounds.
-                }
-            }
-            // long endTime = System.currentTimeMillis();
-            // System.out.println("Time: " + (endTime-startTime));
-
-
-        } finally {
-            g2d.setTransform(g2dAt);
-            g2d.setComposite(g2dComposite);
-        }
-
-        // System.out.println("Finished Draw");
-    }
-
-
-    /**
-     * Draws a <tt>Filter</tt> (<tt>RenderableImage</tt>) into a
-     * Graphics 2D after taking into account a particular
-     * <tt>RenderContext</tt>.<p>
-     *
-     * This method also attempts to unwind the rendering chain a bit.
-     * So it knows about certain operations (like affine, pad,
-     * composite), rather than applying each of these operations in
-     * turn it accounts for their affects through modifications to the
-     * Graphics2D. This avoids generating lots of intermediate images.
-     *
-     * @param g2d    The Graphics to draw into.
-     * @param filter The filter to draw
-     * @param rc The render context that controls the drawing operation.
-     */
-    public static void drawImage(Graphics2D      g2d,
-                                 RenderableImage filter,
-                                 RenderContext   rc) {
-
-        AffineTransform origDev  = g2d.getTransform();
-        Shape           origClip = g2d.getClip();
-        RenderingHints  origRH   = g2d.getRenderingHints();
-
-        Shape clip = rc.getAreaOfInterest();
-        if (clip != null)
-            g2d.clip(clip);
-        g2d.transform(rc.getTransform());
-        g2d.setRenderingHints(rc.getRenderingHints());
-
-        drawImage(g2d, filter);
-
-        g2d.setTransform(origDev);
-        g2d.setClip(origClip);
-        g2d.setRenderingHints(origRH);
-    }
-
-    /**
-     * Draws a <tt>Filter</tt> (<tt>RenderableImage</tt>) into a
-     * Graphics 2D.<p>
-     *
-     * This method also attempts to unwind the rendering chain a bit.
-     * So it knows about certain operations (like affine, pad,
-     * composite), rather than applying each of these operations in
-     * turn it accounts for their affects through modifications to the
-     * Graphics2D.  This avoids generating lots of intermediate images.
-     *
-     * @param g2d    The Graphics to draw into.
-     * @param filter The filter to draw
-     */
-    public static void drawImage(Graphics2D g2d,
-                                 RenderableImage filter) {
-        if (filter instanceof PaintRable) {
-            PaintRable pr = (PaintRable)filter;
-            if (pr.paintRable(g2d))
-                // paintRable succeeded so we are done...
-                return;
-        }
-
-        // Get our sources image...
-        // System.out.println("UnOpt: " + filter);
-        AffineTransform at = g2d.getTransform();
-        RenderedImage ri = filter.createRendering
-            (new RenderContext(at, g2d.getClip(), g2d.getRenderingHints()));
-
-        if (ri == null)
-            return;
-
-        g2d.setTransform(IDENTITY);
-        drawImage(g2d, GraphicsUtil.wrap(ri));
-        g2d.setTransform(at);
-    }
-
-    /**
-     * This is a wrapper around the system's
-     * BufferedImage.createGraphics that arranges for bi to be stored
-     * in a Rendering hint in the returned Graphics2D.
-     * This allows for accurate determination of the 'devices' size,
-     * and colorspace.
-     * @param bi The BufferedImage that the returned Graphics should
-     *           draw into.
-     * @return A Graphics2D that draws into BufferedImage with <tt>bi</tt>
-     *         stored in a rendering hint.
-     */
-    public static Graphics2D createGraphics(BufferedImage bi,
-                                            RenderingHints hints) {
-        Graphics2D g2d = bi.createGraphics();
-        if (hints != null)
-            g2d.addRenderingHints(hints);
-        g2d.setRenderingHint(RenderingHintsKeyExt.KEY_BUFFERED_IMAGE,
-                             new WeakReference(bi));
-        g2d.clip(new Rectangle(0, 0, bi.getWidth(), bi.getHeight()));
-        return g2d;
-    }
-
-
-    public static Graphics2D createGraphics(BufferedImage bi) {
-        Graphics2D g2d = bi.createGraphics();
-        g2d.setRenderingHint(RenderingHintsKeyExt.KEY_BUFFERED_IMAGE,
-                             new WeakReference(bi));
-        g2d.clip(new Rectangle(0, 0, bi.getWidth(), bi.getHeight()));
-        return g2d;
-    }
-
-
-    public final static boolean WARN_DESTINATION = true;
-
-    public static BufferedImage getDestination(Graphics2D g2d) {
-        Object o = g2d.getRenderingHint
-            (RenderingHintsKeyExt.KEY_BUFFERED_IMAGE);
-        if (o != null)
-            return (BufferedImage)(((Reference)o).get());
-
-        // Check if this is a BufferedImage G2d if so throw an error...
-        GraphicsConfiguration gc = g2d.getDeviceConfiguration();
-        GraphicsDevice gd = gc.getDevice();
-        if (WARN_DESTINATION &&
-            (gd.getType() == GraphicsDevice.TYPE_IMAGE_BUFFER) &&
-            (g2d.getRenderingHint(RenderingHintsKeyExt.KEY_TRANSCODING) !=
-                RenderingHintsKeyExt.VALUE_TRANSCODING_PRINTING))
-            // throw new IllegalArgumentException
-            System.out.println
-                ("Graphics2D from BufferedImage lacks BUFFERED_IMAGE hint");
-
-        return null;
-    }
-
-    public static ColorModel getDestinationColorModel(Graphics2D g2d) {
-        BufferedImage bi = getDestination(g2d);
-        if (bi != null)
-            return bi.getColorModel();
-
-        GraphicsConfiguration gc = g2d.getDeviceConfiguration();
-        if (gc == null) 
-            return null; // Can't tell
-
-        // We are going to a BufferedImage but no hint was provided
-        // so we can't determine the destination Color Model.
-        if (gc.getDevice().getType() == GraphicsDevice.TYPE_IMAGE_BUFFER) {
-            if (g2d.getRenderingHint(RenderingHintsKeyExt.KEY_TRANSCODING) ==
-                RenderingHintsKeyExt.VALUE_TRANSCODING_PRINTING) 
-                return sRGB_Unpre;
-
-            // System.out.println("CM: " + gc.getColorModel());
-            // System.out.println("CS: " + gc.getColorModel().getColorSpace());
-            return null;
-        }
-
-        return gc.getColorModel();
-    }
-
-    public static ColorSpace getDestinationColorSpace(Graphics2D g2d) {
-        ColorModel cm = getDestinationColorModel(g2d);
-        if (cm != null) return cm.getColorSpace();
-
-        return null;
-    }
-
-    public static Rectangle getDestinationBounds(Graphics2D g2d) {
-        BufferedImage bi = getDestination(g2d);
-        if (bi != null)
-            return new Rectangle(0, 0, bi.getWidth(), bi.getHeight());
-
-        GraphicsConfiguration gc = g2d.getDeviceConfiguration();
-
-        // We are going to a BufferedImage but no hint was provided
-        // so we can't determine the destination bounds.
-        if (gc.getDevice().getType() == GraphicsDevice.TYPE_IMAGE_BUFFER)
-            return null;
-
-        // This is a JDK 1.3ism, so we will just return null...
-        // return gc.getBounds();
-        return null;
-    }
-
-
-    /**
      * Standard prebuilt Linear_sRGB color model with no alpha */
     public final static ColorModel Linear_sRGB =
         new DirectColorModel(ColorSpace.getInstance
@@ -625,41 +120,6 @@
         if (premult)
             return Linear_sRGB_Pre;
         return Linear_sRGB_Unpre;
-    }
-
-    /**
-     * Constructs a BufferedImage with a linear sRGB colorModel, and alpha.
-     * @param width   The desired width of the BufferedImage
-     * @param height  The desired height of the BufferedImage
-     * @param premult The desired state of alpha premultiplied
-     * @return        The requested BufferedImage.
-     */
-    public static BufferedImage makeLinearBufferedImage(int width,
-                                                        int height,
-                                                        boolean premult) {
-        ColorModel cm = makeLinear_sRGBCM(premult);
-        WritableRaster wr = cm.createCompatibleWritableRaster(width, height);
-        return new BufferedImage(cm, wr, premult, null);
-    }
-
-    /**
-     * This method will return a CacheableRed that has it's data in
-     * the linear sRGB colorspace. If <tt>src</tt> is already in
-     * linear sRGB then this method does nothing and returns <tt>src</tt>.
-     * Otherwise it creates a transform that will convert
-     * <tt>src</tt>'s output to linear sRGB and returns that CacheableRed.
-     *
-     * @param src The image to convert to linear sRGB.
-     * @return    An equivilant image to <tt>src</tt> who's data is in
-     *            linear sRGB.
-     */
-    public static CachableRed convertToLsRGB(CachableRed src) {
-        ColorModel cm = src.getColorModel();
-        ColorSpace cs = cm.getColorSpace();
-        if (cs == ColorSpace.getInstance(ColorSpace.CS_LINEAR_RGB))
-            return src;
-
-        return new Any2LsRGBRed(src);
     }
 
     /**

Copied: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/png/PNGDecodeParam.java (from r379725, xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/png/PNGDecodeParam.java)
URL: http://svn.apache.org/viewcvs/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/png/PNGDecodeParam.java?p2=xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/png/PNGDecodeParam.java&p1=xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/png/PNGDecodeParam.java&r1=379725&r2=381133&rev=381133&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/png/PNGDecodeParam.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/png/PNGDecodeParam.java Sun Feb 26 10:12:43 2006
@@ -15,10 +15,10 @@
    limitations under the License.
 
  */
-package org.apache.batik.ext.awt.image.codec.png;
+package org.apache.xmlgraphics.image.codec.png;
 
-import org.apache.batik.ext.awt.image.codec.util.ImageDecodeParam;
-import org.apache.batik.ext.awt.image.codec.util.PropertyUtil;
+import org.apache.xmlgraphics.image.codec.util.ImageDecodeParam;
+import org.apache.xmlgraphics.image.codec.util.PropertyUtil;
 
 /**
  * An instance of <code>ImageDecodeParam</code> for decoding images in

Copied: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/png/PNGEncodeParam.java (from r379725, xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/png/PNGEncodeParam.java)
URL: http://svn.apache.org/viewcvs/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/png/PNGEncodeParam.java?p2=xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/png/PNGEncodeParam.java&p1=xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/png/PNGEncodeParam.java&r1=379725&r2=381133&rev=381133&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/png/PNGEncodeParam.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/png/PNGEncodeParam.java Sun Feb 26 10:12:43 2006
@@ -15,10 +15,10 @@
    limitations under the License.
 
  */
-package org.apache.batik.ext.awt.image.codec.png;
+package org.apache.xmlgraphics.image.codec.png;
 
-import org.apache.batik.ext.awt.image.codec.util.ImageEncodeParam;
-import org.apache.batik.ext.awt.image.codec.util.PropertyUtil;
+import org.apache.xmlgraphics.image.codec.util.ImageEncodeParam;
+import org.apache.xmlgraphics.image.codec.util.PropertyUtil;
 
 import java.awt.image.ColorModel;
 import java.awt.image.IndexColorModel;

Copied: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/png/PNGImageDecoder.java (from r379725, xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/png/PNGImageDecoder.java)
URL: http://svn.apache.org/viewcvs/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/png/PNGImageDecoder.java?p2=xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/png/PNGImageDecoder.java&p1=xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/png/PNGImageDecoder.java&r1=379725&r2=381133&rev=381133&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/png/PNGImageDecoder.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/png/PNGImageDecoder.java Sun Feb 26 10:12:43 2006
@@ -15,12 +15,11 @@
    limitations under the License.
 
  */
-package org.apache.batik.ext.awt.image.codec.png;
+package org.apache.xmlgraphics.image.codec.png;
 
-import org.apache.batik.ext.awt.image.codec.util.ImageDecodeParam;
-import org.apache.batik.ext.awt.image.codec.util.ImageDecoderImpl;
-import org.apache.batik.ext.awt.image.codec.util.PropertyUtil;
-import org.apache.batik.ext.awt.image.codec.util.SimpleRenderedImage;
+import org.apache.xmlgraphics.image.codec.util.ImageDecoderImpl;
+import org.apache.xmlgraphics.image.codec.util.PropertyUtil;
+import org.apache.xmlgraphics.image.codec.util.SimpleRenderedImage;
 
 import java.awt.Color;
 import java.awt.Point;

Copied: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/png/PNGImageEncoder.java (from r379725, xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/png/PNGImageEncoder.java)
URL: http://svn.apache.org/viewcvs/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/png/PNGImageEncoder.java?p2=xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/png/PNGImageEncoder.java&p1=xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/png/PNGImageEncoder.java&r1=379725&r2=381133&rev=381133&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/png/PNGImageEncoder.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/png/PNGImageEncoder.java Sun Feb 26 10:12:43 2006
@@ -15,9 +15,9 @@
    limitations under the License.
 
  */
-package org.apache.batik.ext.awt.image.codec.png;
+package org.apache.xmlgraphics.image.codec.png;
 
-import org.apache.batik.ext.awt.image.codec.util.ImageEncoderImpl;
+import org.apache.xmlgraphics.image.codec.util.ImageEncoderImpl;
 
 import java.awt.Rectangle;
 import java.awt.image.ColorModel;

Copied: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/png/PNGRed.java (from r379725, xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/png/PNGRed.java)
URL: http://svn.apache.org/viewcvs/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/png/PNGRed.java?p2=xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/png/PNGRed.java&p1=xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/png/PNGRed.java&r1=379725&r2=381133&rev=381133&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/png/PNGRed.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/png/PNGRed.java Sun Feb 26 10:12:43 2006
@@ -15,9 +15,9 @@
    limitations under the License.
 
  */
-package org.apache.batik.ext.awt.image.codec.png;
+package org.apache.xmlgraphics.image.codec.png;
 
-import org.apache.batik.ext.awt.image.codec.util.PropertyUtil;
+import org.apache.xmlgraphics.image.codec.util.PropertyUtil;
 
 import java.awt.Color;
 import java.awt.Point;
@@ -47,9 +47,9 @@
 import java.util.zip.Inflater;
 import java.util.zip.InflaterInputStream;
 
-import org.apache.batik.ext.awt.image.GraphicsUtil;
-import org.apache.batik.ext.awt.image.rendered.AbstractRed;
-import org.apache.batik.ext.awt.image.rendered.CachableRed;
+import org.apache.xmlgraphics.image.GraphicsUtil;
+import org.apache.xmlgraphics.image.rendered.AbstractRed;
+import org.apache.xmlgraphics.image.rendered.CachableRed;
 
 public class PNGRed extends AbstractRed {
 

Copied: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/png/PNGSuggestedPaletteEntry.java (from r379725, xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/png/PNGSuggestedPaletteEntry.java)
URL: http://svn.apache.org/viewcvs/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/png/PNGSuggestedPaletteEntry.java?p2=xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/png/PNGSuggestedPaletteEntry.java&p1=xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/png/PNGSuggestedPaletteEntry.java&r1=379725&r2=381133&rev=381133&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/png/PNGSuggestedPaletteEntry.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/png/PNGSuggestedPaletteEntry.java Sun Feb 26 10:12:43 2006
@@ -15,7 +15,7 @@
    limitations under the License.
 
  */
-package org.apache.batik.ext.awt.image.codec.png;
+package org.apache.xmlgraphics.image.codec.png;
 
 import java.io.Serializable;
 

Copied: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFDecodeParam.java (from r381100, xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/tiff/TIFFDecodeParam.java)
URL: http://svn.apache.org/viewcvs/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFDecodeParam.java?p2=xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFDecodeParam.java&p1=xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/tiff/TIFFDecodeParam.java&r1=381100&r2=381133&rev=381133&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/tiff/TIFFDecodeParam.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFDecodeParam.java Sun Feb 26 10:12:43 2006
@@ -15,9 +15,9 @@
    limitations under the License.
 
  */
-package org.apache.batik.ext.awt.image.codec.tiff;
+package org.apache.xmlgraphics.image.codec.tiff;
 
-import  org.apache.batik.ext.awt.image.codec.util.ImageDecodeParam;
+import  org.apache.xmlgraphics.image.codec.util.ImageDecodeParam;
 
 /**
  * An instance of <code>ImageDecodeParam</code> for decoding images in

Copied: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFDirectory.java (from r381100, xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/tiff/TIFFDirectory.java)
URL: http://svn.apache.org/viewcvs/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFDirectory.java?p2=xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFDirectory.java&p1=xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/tiff/TIFFDirectory.java&r1=381100&r2=381133&rev=381133&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/tiff/TIFFDirectory.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFDirectory.java Sun Feb 26 10:12:43 2006
@@ -15,7 +15,7 @@
    limitations under the License.
 
  */
-package org.apache.batik.ext.awt.image.codec.tiff;
+package org.apache.xmlgraphics.image.codec.tiff;
 
 import java.io.IOException;
 import java.io.Serializable;
@@ -24,7 +24,7 @@
 import java.util.Map;
 import java.util.Vector;
 
-import org.apache.batik.ext.awt.image.codec.util.SeekableStream;
+import org.apache.xmlgraphics.image.codec.util.SeekableStream;
 
 /**
  * A class representing an Image File Directory (IFD) from a TIFF 6.0

Copied: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFEncodeParam.java (from r381100, xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/tiff/TIFFEncodeParam.java)
URL: http://svn.apache.org/viewcvs/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFEncodeParam.java?p2=xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFEncodeParam.java&p1=xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/tiff/TIFFEncodeParam.java&r1=381100&r2=381133&rev=381133&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/tiff/TIFFEncodeParam.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFEncodeParam.java Sun Feb 26 10:12:43 2006
@@ -15,12 +15,12 @@
    limitations under the License.
 
  */
-package org.apache.batik.ext.awt.image.codec.tiff;
+package org.apache.xmlgraphics.image.codec.tiff;
 
 import java.util.Iterator;
 import java.util.zip.Deflater;
 
-import org.apache.batik.ext.awt.image.codec.util.ImageEncodeParam;
+import org.apache.xmlgraphics.image.codec.util.ImageEncodeParam;
 
 import com.sun.image.codec.jpeg.JPEGEncodeParam;
 

Copied: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFFaxDecoder.java (from r381100, xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/tiff/TIFFFaxDecoder.java)
URL: http://svn.apache.org/viewcvs/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFFaxDecoder.java?p2=xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFFaxDecoder.java&p1=xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/tiff/TIFFFaxDecoder.java&r1=381100&r2=381133&rev=381133&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/tiff/TIFFFaxDecoder.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFFaxDecoder.java Sun Feb 26 10:12:43 2006
@@ -15,7 +15,7 @@
    limitations under the License.
 
  */
-package org.apache.batik.ext.awt.image.codec.tiff;
+package org.apache.xmlgraphics.image.codec.tiff;
 
 
 class TIFFFaxDecoder {

Copied: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFField.java (from r381100, xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/tiff/TIFFField.java)
URL: http://svn.apache.org/viewcvs/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFField.java?p2=xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFField.java&p1=xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/tiff/TIFFField.java&r1=381100&r2=381133&rev=381133&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/tiff/TIFFField.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFField.java Sun Feb 26 10:12:43 2006
@@ -15,7 +15,7 @@
    limitations under the License.
 
  */
-package org.apache.batik.ext.awt.image.codec.tiff;
+package org.apache.xmlgraphics.image.codec.tiff;
 
 import java.io.Serializable;
 

Copied: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFImage.java (from r381100, xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/tiff/TIFFImage.java)
URL: http://svn.apache.org/viewcvs/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFImage.java?p2=xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFImage.java&p1=xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/tiff/TIFFImage.java&r1=381100&r2=381133&rev=381133&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/tiff/TIFFImage.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFImage.java Sun Feb 26 10:12:43 2006
@@ -15,7 +15,7 @@
    limitations under the License.
 
  */
-package org.apache.batik.ext.awt.image.codec.tiff;
+package org.apache.xmlgraphics.image.codec.tiff;
 
 import java.awt.Rectangle;
 import java.awt.Transparency;
@@ -40,9 +40,9 @@
 import java.util.zip.DataFormatException;
 import java.util.zip.Inflater;
 
-import org.apache.batik.ext.awt.image.codec.util.SeekableStream;
-import org.apache.batik.ext.awt.image.rendered.AbstractRed;
-import org.apache.batik.ext.awt.image.rendered.CachableRed;
+import org.apache.xmlgraphics.image.codec.util.SeekableStream;
+import org.apache.xmlgraphics.image.rendered.AbstractRed;
+import org.apache.xmlgraphics.image.rendered.CachableRed;
 
 import com.sun.image.codec.jpeg.JPEGCodec;
 import com.sun.image.codec.jpeg.JPEGDecodeParam;

Copied: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFImageDecoder.java (from r381100, xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/tiff/TIFFImageDecoder.java)
URL: http://svn.apache.org/viewcvs/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFImageDecoder.java?p2=xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFImageDecoder.java&p1=xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/tiff/TIFFImageDecoder.java&r1=381100&r2=381133&rev=381133&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/tiff/TIFFImageDecoder.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFImageDecoder.java Sun Feb 26 10:12:43 2006
@@ -15,14 +15,14 @@
    limitations under the License.
 
  */
-package org.apache.batik.ext.awt.image.codec.tiff;
+package org.apache.xmlgraphics.image.codec.tiff;
 
 import java.awt.image.RenderedImage;
 import java.io.IOException;
 
-import org.apache.batik.ext.awt.image.codec.util.ImageDecodeParam;
-import org.apache.batik.ext.awt.image.codec.util.ImageDecoderImpl;
-import org.apache.batik.ext.awt.image.codec.util.SeekableStream;
+import org.apache.xmlgraphics.image.codec.util.ImageDecodeParam;
+import org.apache.xmlgraphics.image.codec.util.ImageDecoderImpl;
+import org.apache.xmlgraphics.image.codec.util.SeekableStream;
 
 /**
  * A baseline TIFF reader. The reader has some functionality in addition to 

Copied: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFImageEncoder.java (from r381100, xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/tiff/TIFFImageEncoder.java)
URL: http://svn.apache.org/viewcvs/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFImageEncoder.java?p2=xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFImageEncoder.java&p1=xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/tiff/TIFFImageEncoder.java&r1=381100&r2=381133&rev=381133&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/tiff/TIFFImageEncoder.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFImageEncoder.java Sun Feb 26 10:12:43 2006
@@ -15,7 +15,7 @@
    limitations under the License.
 
  */
-package org.apache.batik.ext.awt.image.codec.tiff;
+package org.apache.xmlgraphics.image.codec.tiff;
 
 import java.awt.Rectangle;
 import java.awt.color.ColorSpace;
@@ -42,9 +42,9 @@
 import java.util.TreeSet;
 import java.util.zip.Deflater;
 
-import org.apache.batik.ext.awt.image.codec.util.ImageEncodeParam;
-import org.apache.batik.ext.awt.image.codec.util.ImageEncoderImpl;
-import org.apache.batik.ext.awt.image.codec.util.SeekableOutputStream;
+import org.apache.xmlgraphics.image.codec.util.ImageEncodeParam;
+import org.apache.xmlgraphics.image.codec.util.ImageEncoderImpl;
+import org.apache.xmlgraphics.image.codec.util.SeekableOutputStream;
 
 import com.sun.image.codec.jpeg.JPEGEncodeParam;
 import com.sun.image.codec.jpeg.JPEGQTable;

Copied: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFLZWDecoder.java (from r381100, xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/tiff/TIFFLZWDecoder.java)
URL: http://svn.apache.org/viewcvs/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFLZWDecoder.java?p2=xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFLZWDecoder.java&p1=xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/tiff/TIFFLZWDecoder.java&r1=381100&r2=381133&rev=381133&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/tiff/TIFFLZWDecoder.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/tiff/TIFFLZWDecoder.java Sun Feb 26 10:12:43 2006
@@ -16,7 +16,7 @@
 
 */
 
-package org.apache.batik.ext.awt.image.codec.tiff;
+package org.apache.xmlgraphics.image.codec.tiff;
 
 /**
  * A class for performing LZW decoding.

Copied: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/FileCacheSeekableStream.java (from r381102, xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/util/FileCacheSeekableStream.java)
URL: http://svn.apache.org/viewcvs/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/FileCacheSeekableStream.java?p2=xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/FileCacheSeekableStream.java&p1=xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/util/FileCacheSeekableStream.java&r1=381102&r2=381133&rev=381133&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/util/FileCacheSeekableStream.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/FileCacheSeekableStream.java Sun Feb 26 10:12:43 2006
@@ -15,7 +15,7 @@
    limitations under the License.
 
  */
-package org.apache.batik.ext.awt.image.codec.util;
+package org.apache.xmlgraphics.image.codec.util;
 
 import java.io.File;
 import java.io.IOException;

Copied: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/ForwardSeekableStream.java (from r381102, xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/util/ForwardSeekableStream.java)
URL: http://svn.apache.org/viewcvs/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/ForwardSeekableStream.java?p2=xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/ForwardSeekableStream.java&p1=xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/util/ForwardSeekableStream.java&r1=381102&r2=381133&rev=381133&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/util/ForwardSeekableStream.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/ForwardSeekableStream.java Sun Feb 26 10:12:43 2006
@@ -15,7 +15,7 @@
    limitations under the License.
 
  */
-package org.apache.batik.ext.awt.image.codec.util;
+package org.apache.xmlgraphics.image.codec.util;
 
 import java.io.IOException;
 import java.io.InputStream;

Copied: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/ImageDecodeParam.java (from r381103, xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/util/ImageDecodeParam.java)
URL: http://svn.apache.org/viewcvs/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/ImageDecodeParam.java?p2=xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/ImageDecodeParam.java&p1=xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/util/ImageDecodeParam.java&r1=381103&r2=381133&rev=381133&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/util/ImageDecodeParam.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/ImageDecodeParam.java Sun Feb 26 10:12:43 2006
@@ -15,7 +15,7 @@
    limitations under the License.
 
  */
-package org.apache.batik.ext.awt.image.codec.util;
+package org.apache.xmlgraphics.image.codec.util;
 
 import java.io.Serializable;
 

Copied: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/ImageDecoder.java (from r381103, xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/util/ImageDecoder.java)
URL: http://svn.apache.org/viewcvs/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/ImageDecoder.java?p2=xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/ImageDecoder.java&p1=xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/util/ImageDecoder.java&r1=381103&r2=381133&rev=381133&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/util/ImageDecoder.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/ImageDecoder.java Sun Feb 26 10:12:43 2006
@@ -15,7 +15,7 @@
    limitations under the License.
 
  */
-package org.apache.batik.ext.awt.image.codec.util;
+package org.apache.xmlgraphics.image.codec.util;
 
 import java.awt.image.Raster;
 import java.awt.image.RenderedImage;

Copied: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/ImageDecoderImpl.java (from r381103, xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/util/ImageDecoderImpl.java)
URL: http://svn.apache.org/viewcvs/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/ImageDecoderImpl.java?p2=xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/ImageDecoderImpl.java&p1=xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/util/ImageDecoderImpl.java&r1=381103&r2=381133&rev=381133&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/util/ImageDecoderImpl.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/ImageDecoderImpl.java Sun Feb 26 10:12:43 2006
@@ -15,7 +15,7 @@
    limitations under the License.
 
  */
-package org.apache.batik.ext.awt.image.codec.util;
+package org.apache.xmlgraphics.image.codec.util;
 
 import java.awt.image.Raster;
 import java.awt.image.RenderedImage;

Copied: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/ImageEncodeParam.java (from r381103, xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/util/ImageEncodeParam.java)
URL: http://svn.apache.org/viewcvs/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/ImageEncodeParam.java?p2=xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/ImageEncodeParam.java&p1=xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/util/ImageEncodeParam.java&r1=381103&r2=381133&rev=381133&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/util/ImageEncodeParam.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/ImageEncodeParam.java Sun Feb 26 10:12:43 2006
@@ -15,7 +15,7 @@
    limitations under the License.
 
  */
-package org.apache.batik.ext.awt.image.codec.util;
+package org.apache.xmlgraphics.image.codec.util;
 
 import java.io.Serializable;
 

Copied: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/ImageEncoder.java (from r381103, xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/util/ImageEncoder.java)
URL: http://svn.apache.org/viewcvs/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/ImageEncoder.java?p2=xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/ImageEncoder.java&p1=xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/util/ImageEncoder.java&r1=381103&r2=381133&rev=381133&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/util/ImageEncoder.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/ImageEncoder.java Sun Feb 26 10:12:43 2006
@@ -15,7 +15,7 @@
    limitations under the License.
 
  */
-package org.apache.batik.ext.awt.image.codec.util;
+package org.apache.xmlgraphics.image.codec.util;
 
 import java.awt.image.ColorModel;
 import java.awt.image.Raster;

Copied: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/ImageEncoderImpl.java (from r381103, xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/util/ImageEncoderImpl.java)
URL: http://svn.apache.org/viewcvs/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/ImageEncoderImpl.java?p2=xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/ImageEncoderImpl.java&p1=xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/util/ImageEncoderImpl.java&r1=381103&r2=381133&rev=381133&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/util/ImageEncoderImpl.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/ImageEncoderImpl.java Sun Feb 26 10:12:43 2006
@@ -16,7 +16,7 @@
 
  */
 
-package org.apache.batik.ext.awt.image.codec.util;
+package org.apache.xmlgraphics.image.codec.util;
 
 import java.awt.image.ColorModel;
 import java.awt.image.Raster;

Copied: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/MemoryCacheSeekableStream.java (from r381102, xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/util/MemoryCacheSeekableStream.java)
URL: http://svn.apache.org/viewcvs/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/MemoryCacheSeekableStream.java?p2=xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/MemoryCacheSeekableStream.java&p1=xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/util/MemoryCacheSeekableStream.java&r1=381102&r2=381133&rev=381133&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/util/MemoryCacheSeekableStream.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/MemoryCacheSeekableStream.java Sun Feb 26 10:12:43 2006
@@ -15,7 +15,7 @@
    limitations under the License.
 
  */
-package org.apache.batik.ext.awt.image.codec.util;
+package org.apache.xmlgraphics.image.codec.util;
 
 import java.io.IOException;
 import java.io.InputStream;

Copied: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/PropertyUtil.java (from r379726, xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/util/PropertyUtil.java)
URL: http://svn.apache.org/viewcvs/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/PropertyUtil.java?p2=xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/PropertyUtil.java&p1=xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/util/PropertyUtil.java&r1=379726&r2=381133&rev=381133&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/util/PropertyUtil.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/PropertyUtil.java Sun Feb 26 10:12:43 2006
@@ -1,6 +1,6 @@
 /*
 
-   Copyright 2001,2003  The Apache Software Foundation 
+   Copyright 2001,2003,2006  The Apache Software Foundation 
 
    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
@@ -15,15 +15,15 @@
    limitations under the License.
 
  */
-package org.apache.batik.ext.awt.image.codec.util;
+package org.apache.xmlgraphics.image.codec.util;
 
 import java.util.MissingResourceException;
 
-import org.apache.batik.i18n.LocalizableSupport;
+import org.apache.xmlgraphics.util.i18n.LocalizableSupport;
 
 public class PropertyUtil {
     protected final static String RESOURCES =
-        "org.apache.batik.bridge.resources.properties";
+        "org.apache.xmlgraphics.image.codec.resources.Messages";
 
 
     protected static LocalizableSupport localizableSupport =
@@ -31,9 +31,9 @@
         (RESOURCES, PropertyUtil.class.getClassLoader());
 
     public static String getString(String key) {
-        try{
+        try {
             return localizableSupport.formatMessage(key, null);
-        }catch(MissingResourceException e){
+        } catch(MissingResourceException e) {
             return key;
         }
    }

Copied: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/SeekableOutputStream.java (from r381105, xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/util/SeekableOutputStream.java)
URL: http://svn.apache.org/viewcvs/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/SeekableOutputStream.java?p2=xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/SeekableOutputStream.java&p1=xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/util/SeekableOutputStream.java&r1=381105&r2=381133&rev=381133&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/codec/util/SeekableOutputStream.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/codec/util/SeekableOutputStream.java Sun Feb 26 10:12:43 2006
@@ -16,7 +16,7 @@
 
  */
 
-package org.apache.batik.ext.awt.image.codec.util;
+package org.apache.xmlgraphics.image.codec.util;
 
 import java.io.IOException;
 import java.io.OutputStream;



---------------------------------------------------------------------
Apache XML Graphics Project URL: http://xmlgraphics.apache.org/
To unsubscribe, e-mail: commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: commits-help@xmlgraphics.apache.org