org.apache.fop.svg

Class PDFImageElementBridge.PDFJpegNode

Enclosing Class:
PDFImageElementBridge

public class PDFImageElementBridge.PDFJpegNode
extends AbstractGraphicsNode

A PDF jpeg node. This holds a jpeg image so that it can be drawn into the PDFGraphics2D.

Constructor Summary

PDFJpegNode(JpegImage j, BridgeContext ctx, Element imageElement, ParsedURL purl)
Create a new pdf jpeg node for drawing jpeg images into pdf graphics.

Method Summary

Rectangle2D
getGeometryBounds()
Get the geometrix bounds of the image.
Shape
getOutline()
Get the outline of this image.
Rectangle2D
getPrimitiveBounds()
Get the primitive bounds of this bridge element.
Rectangle2D
getSensitiveBounds()
Returns the bounds of the sensitive area covered by this node, This includes the stroked area but does not include the effects of clipping, masking or filtering.
void
primitivePaint(Graphics2D g2d)
Paint this jpeg image.

Constructor Details

PDFJpegNode

public PDFJpegNode(JpegImage j,
                   BridgeContext ctx,
                   Element imageElement,
                   ParsedURL purl)
Create a new pdf jpeg node for drawing jpeg images into pdf graphics.
Parameters:
j - the jpeg image
ctx - the bridge context
imageElement - the SVG image element
purl - the URL to the image

Method Details

getGeometryBounds

public Rectangle2D getGeometryBounds()
Get the geometrix bounds of the image.
Returns:
the primitive bounds

getOutline

public Shape getOutline()
Get the outline of this image.
Returns:
the outline shape which is the primitive bounds

getPrimitiveBounds

public Rectangle2D getPrimitiveBounds()
Get the primitive bounds of this bridge element.
Returns:
the bounds of the jpeg image

getSensitiveBounds

public Rectangle2D getSensitiveBounds()
Returns the bounds of the sensitive area covered by this node, This includes the stroked area but does not include the effects of clipping, masking or filtering.
Returns:
the bounds of the sensitive area

primitivePaint

public void primitivePaint(Graphics2D g2d)
Paint this jpeg image. As this is used for inserting jpeg into pdf it adds the jpeg image to the PDFGraphics2D.
Parameters:
g2d - the graphics to draw the image on

Copyright 1999-2007 The Apache Software Foundation. All Rights Reserved.