Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| fop 1.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.fop.render.afp
Class AFPGraphics2DAdapter

    java.lang.Object
      org.apache.fop.render.AbstractGraphics2DAdapter
          org.apache.fop.render.afp.AFPGraphics2DAdapter

All Implemented Interfaces:
  Graphics2DAdapter

    public class AFPGraphics2DAdapter

extends AbstractGraphics2DAdapter

Graphics2DAdapter implementation for AFP.

Constructor Summary
`AFPGraphics2DAdapter(AFPPaintingState paintingState)` Main constructor

Method Summary
`protected int` | `mpt2px(int unit, int resolution)` Converts millipoints to pixels
`void` | `paintImage(org.apache.xmlgraphics.java2d.Graphics2DImagePainter painter, RendererContext rendererContext, int x, int y, int width, int height)` Paints an arbitrary images on a given Graphics2D instance.

Methods inherited from class org.apache.fop.render.AbstractGraphics2DAdapter
`paintImage, paintToBufferedImage, setRenderingHintsForBufferedImage`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### AFPGraphics2DAdapter

    public AFPGraphics2DAdapter(AFPPaintingState paintingState)

  Main constructor

  Parameters:
    `paintingState` - the AFP painting state

Method Detail

### paintImage

    public void paintImage(org.apache.xmlgraphics.java2d.Graphics2DImagePainter painter,
                           RendererContext rendererContext,
                           int x,
                           int y,
                           int width,
                           int height)
                    throws java.io.IOException

  Paints an arbitrary images on a given Graphics2D instance. The renderer providing this functionality must set up a Graphics2D instance so that the image with the given extents (in mpt) can be painted by the painter passed to this method. The Graphics2DImagePainter is then passed this Graphics2D instance so the image can be painted.

  Parameters:
    `painter` - the painter which will paint the actual image
    `rendererContext` - the renderer context for the current renderer
    `x` - X position of the image
    `y` - Y position of the image
    `width` - width of the image
    `height` - height of the image
  Throws:
    `java.io.IOException` - In case of an I/O error while writing the output format

### mpt2px

    protected int mpt2px(int unit,
                         int resolution)

  Converts millipoints to pixels

  Overrides:
    `mpt2px` in class `AbstractGraphics2DAdapter`
  Parameters:
    `unit` - the unit to convert in mpts
    `resolution` - the target resolution
  Returns:
    the converted unit in pixels

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| fop 1.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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