You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by tk...@apache.org on 2001/09/12 16:05:18 UTC

cvs commit: xml-batik/sources/org/apache/batik/bridge SVGImageElementBridge.java

tkormann    01/09/12 07:05:18

  Modified:    sources/org/apache/batik/bridge SVGImageElementBridge.java
  Log:
  Bug fix: clip and overflow now works on svg image.
  
  Revision  Changes    Path
  1.26      +5 -2      xml-batik/sources/org/apache/batik/bridge/SVGImageElementBridge.java
  
  Index: SVGImageElementBridge.java
  ===================================================================
  RCS file: /home/cvs/xml-batik/sources/org/apache/batik/bridge/SVGImageElementBridge.java,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- SVGImageElementBridge.java	2001/09/04 12:31:51	1.25
  +++ SVGImageElementBridge.java	2001/09/12 14:05:18	1.26
  @@ -45,7 +45,7 @@
    * Bridge class for the <image> element.
    *
    * @author <a href="mailto:tkormann@apache.org">Thierry Kormann</a>
  - * @version $Id: SVGImageElementBridge.java,v 1.25 2001/09/04 12:31:51 tkormann Exp $
  + * @version $Id: SVGImageElementBridge.java,v 1.26 2001/09/12 14:05:18 tkormann Exp $
    */
   public class SVGImageElementBridge extends AbstractGraphicsNodeBridge {
   
  @@ -213,6 +213,10 @@
   
           SVGSVGElement svgElement = imgDocument.getRootElement();
           GraphicsNode node = ctx.getGVTBuilder().build(ctx, svgElement);
  +	// HACK: remove the clip set by the SVGSVGElement as the overflow
  +	// and clip properties must be ignored. The clip will be set later
  +	// using the overflow and clip of the <image> element.
  +	node.setClip(null);
           result.getChildren().add(node);
   
   	// create the implicit viewBox for the SVG image. The viewBox for a
  @@ -225,7 +229,6 @@
   	// appropriate AffineTransform to the image node
           Rectangle2D bounds = getImageBounds(ctx, e);
   	initializeViewport(ctx, e, result, vb, bounds);
  -
           return result;
       }
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-dev-help@xml.apache.org