org.apache.fop.render.pcl

## Class PCLRenderingContext

- java.lang.Object
- - org.apache.fop.render.AbstractRenderingContext
  - - org.apache.fop.render.pcl.PCLRenderingContext

- All Implemented Interfaces:
    RenderingContext

      public abstract class PCLRenderingContext
      extends AbstractRenderingContext

  Rendering context for PCL production. The class is abstract and must be subclassed to provide the missing functionality.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PCLRenderingContext(FOUserAgent userAgent, PCLGenerator generator, PCLRenderingUtil pclUtil)` Main constructor.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract org.apache.xmlgraphics.java2d.GraphicContext` | `getGraphicContext()` Returns the current `GraphicContext` instance.
    `String` | `getMimeType()` Returns the MIME type associated with the current output format.
    `PCLGenerator` | `getPCLGenerator()` Returns the PCL generator.
    `PCLRenderingUtil` | `getPCLUtil()` Returns the PCL rendering utility.
    `boolean` | `isSourceTransparencyEnabled()` Indicates whether source transparency should be enabled when painting bitmaps.
    `void` | `setSourceTransparencyEnabled(boolean value)` Enables or disables source transparency when painting bitmaps.
    `abstract Point2D` | `transformedPoint(int x, int y)` Transforms a point into the PCL coordinate system.

    - ### 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

    - #### PCLRenderingContext

          public PCLRenderingContext(FOUserAgent userAgent,
                                     PCLGenerator generator,
                                     PCLRenderingUtil pclUtil)

      Main constructor.
      Parameters:
        `userAgent` - the user agent
        `generator` - the PCL generator
        `pclUtil` - rendering utility

  - ### Method Detail

    - #### getMimeType

          public String getMimeType()

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

    - #### getPCLGenerator

          public PCLGenerator getPCLGenerator()

      Returns the PCL generator.
      Returns:
        the PCL generator

    - #### getPCLUtil

          public PCLRenderingUtil getPCLUtil()

      Returns the PCL rendering utility.
      Returns:
        the PCL rendering utility.

    - #### isSourceTransparencyEnabled

          public boolean isSourceTransparencyEnabled()

      Indicates whether source transparency should be enabled when painting bitmaps.
      Returns:
        true when source transparency is enabled

    - #### setSourceTransparencyEnabled

          public void setSourceTransparencyEnabled(boolean value)

      Enables or disables source transparency when painting bitmaps.
      Parameters:
        `value` - true to enable source transparency, false to disable

    - #### transformedPoint

          public abstract Point2D transformedPoint(int x,
                                                   int y)

      Transforms a point into the PCL coordinate system.
      Parameters:
        `x` - the X coordinate
        `y` - the Y coordinate
      Returns:
        the transformed point in PCL coordinates

    - #### getGraphicContext

          public abstract org.apache.xmlgraphics.java2d.GraphicContext getGraphicContext()

      Returns the current `GraphicContext` instance.
      Returns:
        the graphic context

Copyright © 2023 Apache Software Foundation. All rights reserved.