~ubuntu-branches/ubuntu/karmic/batik/karmic

« back to all changes in this revision

Viewing changes to sources/org/apache/batik/gvt/filter/BackgroundRable8Bit.java

  • Committer: Bazaar Package Importer
  • Author(s): Matvey Kozhev, Onkar Shinde, Matvey Kozhev
  • Date: 2008-07-19 01:03:05 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20080719010305-0b24skqy185kdsb9
Tags: 1.7.dfsg-0ubuntu1
[ Onkar Shinde ]
* New upstream version (LP: #147818)
* debian/control
  - Add Sun JDK 1.5 as build dependency. Fixes FTBFS on buildd. (LP: #150484)
    Also add Sun JRE as runtime dependencies.
  - Add ant-optional as build dependency.
  - Add libxml-commons-external-java and libxmlgraphics-commons-java as
    build and runtime dependencies.
  - Add 'Homepage' field and correct the url.
  - Change standards version to 3.8.0.
  - Modify Maintainer value to match the DebianMaintainerField
    specification.
* debian/rules
  - Change JAVA_HOME_DIRS for Sun JDK.
  - Add jar file names to DEB_JARS to match new build requirements.
  - Extract version from changelog.
  - Delete bundled jar files in clean target.
  - Don't use hardcoded version in install target.
  - Add get-orig-source target.
* debian/README.Debian-source
  - Change the fo tag name to the one used for this version.
* debian/watch
  - Change expression to match src distribution.
* debian/patches/
  - 01_build_xml.patch, 02_fix_jar_target.patch - Refresh for current source.
  - 03_fix_lib_dirs.patch - Fix the library and classpath references needed
    for pdf transcoder build.
  - 04_fix_transcoder_pkg.patch - Fix transcoder-pkg target to not copy
    files from other jar files.

[ Matvey Kozhev ]
* debian/changelog:
  - Added ".dfsg" to version.
* debian/control, debian/rules:
  - Build with openjdk-6-jdk, depend on openjdk-6-jre.
  - Added java-6-sun as an alternate build JAVA_HOME directory.
  - Fixed get-orig-source to not include debian/ and delete the source dir,
    and made it delete jars from lib/, as done in the current batik package.
* debian/wrappers.sh:
  - Changed java-7-icedtea reference to java-6-openjdk, as the former has been
    removed back in Hardy.
  - Added newline.
* debian/libbatik-java.install:
  - Added newline.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 
3
 
   Copyright 2001-2003  The Apache Software Foundation 
4
 
 
5
 
   Licensed under the Apache License, Version 2.0 (the "License");
6
 
   you may not use this file except in compliance with the License.
7
 
   You may obtain a copy of the License at
 
3
   Licensed to the Apache Software Foundation (ASF) under one or more
 
4
   contributor license agreements.  See the NOTICE file distributed with
 
5
   this work for additional information regarding copyright ownership.
 
6
   The ASF licenses this file to You under the Apache License, Version 2.0
 
7
   (the "License"); you may not use this file except in compliance with
 
8
   the License.  You may obtain a copy of the License at
8
9
 
9
10
       http://www.apache.org/licenses/LICENSE-2.0
10
11
 
25
26
import java.awt.image.renderable.RenderContext;
26
27
import java.util.Iterator;
27
28
import java.util.List;
28
 
import java.util.Vector;
 
29
import java.util.ArrayList;
29
30
 
30
31
import org.apache.batik.ext.awt.image.CompositeRule;
31
32
import org.apache.batik.ext.awt.image.PadMode;
43
44
 * createRendering methods.
44
45
 *
45
46
 * @author <a href="mailto:vincent.hardy@eng.sun.com">Vincent Hardy</a>
46
 
 * @version $Id: BackgroundRable8Bit.java,v 1.16 2004/08/18 07:14:32 vhardy Exp $
 
47
 * @version $Id: BackgroundRable8Bit.java 479559 2006-11-27 09:46:16Z dvholten $
47
48
 */
48
49
public class BackgroundRable8Bit
49
50
    extends    AbstractRable {
273
274
            r2d = cgn.getBackgroundEnable();
274
275
        }
275
276
 
276
 
        Vector srcs = new Vector();
 
277
        List srcs = new ArrayList();      // this hides a member in a super-class!!
277
278
        if (r2d == null) {
278
279
            Rectangle2D paoi = aoi;
279
280
            AffineTransform at = gn.getTransform();
293
294
            Iterator i = children.iterator();
294
295
            while (i.hasNext()) {
295
296
                GraphicsNode childGN = (GraphicsNode)i.next();
296
 
                // System.out.println("Parent: "      + cgn + 
297
 
                //                    "\n  Child: "   + child + 
 
297
                // System.out.println("Parent: "      + cgn +
 
298
                //                    "\n  Child: "   + child +
298
299
                //                    "\n  ChildGN: " + childGN);
299
300
                if (childGN == child)
300
301
                    break;
305
306
                // System.out.println("      : " + aoi);
306
307
 
307
308
                AffineTransform at = childGN.getTransform();
308
 
                if (at != null) 
 
309
                if (at != null)
309
310
                    cbounds = at.createTransformedShape(cbounds).getBounds2D();
310
311
 
311
312
 
382
383
            // System.out.println("R2d: " + r2d);
383
384
            // System.out.println("AOI: " + aoiR2d);
384
385
 
385
 
            if (r2d.intersects(aoiR2d) == false)
 
386
            if ( ! r2d.intersects(aoiR2d) )
386
387
                return null;
387
388
 
388
389
            Rectangle2D.intersect(r2d, aoiR2d, r2d);
392
393
        // System.out.println("BG: " + background);
393
394
        if ( background == null)
394
395
            return null;
395
 
        
 
396
 
396
397
        background = new PadRable8Bit(background, r2d, PadMode.ZERO_PAD);
397
398
 
398
 
        
 
399
 
399
400
        RenderedImage ri = background.createRendering
400
 
            (new RenderContext(renderContext.getTransform(), r2d, 
 
401
            (new RenderContext(renderContext.getTransform(), r2d,
401
402
                               renderContext.getRenderingHints()));
402
 
        // System.out.println("RI: [" + ri.getMinX() + ", " 
 
403
        // System.out.println("RI: [" + ri.getMinX() + ", "
403
404
        //                    + ri.getMinY() + ", " +
404
405
        //                    + ri.getWidth() + ", " +
405
406
        //                    + ri.getHeight() + "]");