Java2DRenderingContext (Apache FOP 2.7 API)
Date: 2022-01-12

org.apache.fop.render.java2d

## Class Java2DRenderingContext

- java.lang.Object
- - org.apache.fop.render.AbstractRenderingContext
  - - org.apache.fop.render.java2d.Java2DRenderingContext

- All Implemented Interfaces:
    RenderingContext

      public class Java2DRenderingContext
      extends AbstractRenderingContext

  Rendering context for Java2D painting.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Java2DRenderingContext(FOUserAgent userAgent, java.awt.Graphics2D g2d, FontInfo fontInfo)` Main constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.awt.Graphics2D` | `getGraphics2D()` Returns the target Graphics2D object.
    `java.lang.String` | `getMimeType()` Returns the MIME type associated with the current output format.

    - ### Methods inherited from class org.apache.fop.render.AbstractRenderingContext

      `getHint, getHints, getUserAgent, putHint, putHints`

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

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

- - ### Constructor Detail

    - #### Java2DRenderingContext

          public Java2DRenderingContext(FOUserAgent userAgent,
                                        java.awt.Graphics2D g2d,
                                        FontInfo fontInfo)

      Main constructor.
      Parameters:
        `userAgent` - the user agent
        `g2d` - the target Graphics2D instance
        `fontInfo` - the font list

  - ### Method Detail

    - #### getMimeType

          public java.lang.String getMimeType()

      Returns the MIME type associated with the current output format.
      Returns:
        the MIME type (ex. application/pdf)

    - #### getGraphics2D

          public java.awt.Graphics2D getGraphics2D()

      Returns the target Graphics2D object.
      Returns:
        the Graphics2D object

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