org.apache.fop.image.loader.batik

## Class Graphics2DImagePainterImpl

- java.lang.Object
- - org.apache.fop.image.loader.batik.Graphics2DImagePainterImpl

- All Implemented Interfaces:
    org.apache.xmlgraphics.java2d.Graphics2DImagePainter

      public class Graphics2DImagePainterImpl
      extends Object
      implements org.apache.xmlgraphics.java2d.Graphics2DImagePainter

  A graphics 2D image painter implementation for painting SVG images using Batik.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected org.apache.batik.bridge.BridgeContext` | `ctx` the Batik bridge context
    `protected Dimension` | `imageSize` the intrinsic size of the image

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Graphics2DImagePainterImpl(org.apache.batik.gvt.GraphicsNode root, org.apache.batik.bridge.BridgeContext ctx, Dimension imageSize)` Main constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Dimension` | `getImageSize()`
    `void` | `paint(Graphics2D g2d, Rectangle2D area)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### ctx

          protected final org.apache.batik.bridge.BridgeContext ctx

      the Batik bridge context

    - #### imageSize

          protected final Dimension imageSize

      the intrinsic size of the image

  - ### Constructor Detail

    - #### Graphics2DImagePainterImpl

          public Graphics2DImagePainterImpl(org.apache.batik.gvt.GraphicsNode root,
                                            org.apache.batik.bridge.BridgeContext ctx,
                                            Dimension imageSize)

      Main constructor
      Parameters:
        `root` - the graphics node root
        `ctx` - the bridge context
        `imageSize` - the image size

  - ### Method Detail

    - #### getImageSize

          public Dimension getImageSize()

      Specified by:
        `getImageSize` in interface `org.apache.xmlgraphics.java2d.Graphics2DImagePainter`

    - #### paint

          public void paint(Graphics2D g2d,
                            Rectangle2D area)

      Specified by:
        `paint` in interface `org.apache.xmlgraphics.java2d.Graphics2DImagePainter`

Copyright © 2023 Apache Software Foundation. All rights reserved.