fop 1.1

## org.apache.fop.render.pcl
Class PCLRenderingUtil

    java.lang.Object
      org.apache.fop.render.pcl.PCLRenderingUtil

    public class PCLRenderingUtil

extends java.lang.Object

Utility class for handling all sorts of peripheral tasks around PCL generation.

Method Summary
`static int` `determinePrintDirection(java.awt.geom.AffineTransform transform)` Determines the print direction based on the given transformation matrix.
`float` `getDitheringQuality()` Returns the dithering quality to be used when encoding gray or color images.
`PCLRenderingMode` `getRenderingMode()` Returns the selected rendering mode.
`FOUserAgent` `getUserAgent()` Returns the user agent.
`boolean` `isAllTextAsBitmaps()` Indicates whether all text shall be painted as bitmaps.
`boolean` `isColorCanvasEnabled()` Indicates whether a color canvas is used when creating bitmap images.
`boolean` `isPJLDisabled()` Indicates whether PJL generation is disabled.
`void` `setAllTextAsBitmaps(boolean allTextAsBitmaps)` Controls whether all text should be generated as bitmaps or only text for which there's no native font.
`void` `setPJLDisabled(boolean disable)` Controls whether PJL commands shall be generated by the PCL renderer.
`void` `setRenderingMode(PCLRenderingMode mode)` Configures the renderer to trade speed for quality if desired.
`static java.awt.geom.Point2D` `transformedPoint(int x, int y, java.awt.geom.AffineTransform transform, PCLPageDefinition pageDefinition, int printDirection)` Returns a coordinate in PCL's coordinate system when given a coordinate in the user coordinate system.

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

Method Detail

### getUserAgent

    public FOUserAgent getUserAgent()

  Returns the user agent.

  Returns:
    the user agent

### setRenderingMode

    public void setRenderingMode(PCLRenderingMode mode)

  Configures the renderer to trade speed for quality if desired. One example here is the way that borders are rendered.

  Parameters:
    `mode` - one of the `PCLRenderingMode`.* constants

### getRenderingMode

    public PCLRenderingMode getRenderingMode()

  Returns the selected rendering mode.

  Returns:
    the rendering mode

### getDitheringQuality

    public float getDitheringQuality()

  Returns the dithering quality to be used when encoding gray or color images.

  Returns:
    the quality (0.0f..1.0f)

### setPJLDisabled

    public void setPJLDisabled(boolean disable)

  Controls whether PJL commands shall be generated by the PCL renderer.

  Parameters:
    `disable` - true to disable PJL commands

### isPJLDisabled

    public boolean isPJLDisabled()

  Indicates whether PJL generation is disabled.

  Returns:
    true if PJL generation is disabled.

### setAllTextAsBitmaps

    public void setAllTextAsBitmaps(boolean allTextAsBitmaps)

  Controls whether all text should be generated as bitmaps or only text for which there's no native font.

  Parameters:
    `allTextAsBitmaps` - true if all text should be painted as bitmaps

### isAllTextAsBitmaps

    public boolean isAllTextAsBitmaps()

  Indicates whether all text shall be painted as bitmaps.

  Returns:
    true if all text shall be painted as bitmaps

### isColorCanvasEnabled

    public boolean isColorCanvasEnabled()

  Indicates whether a color canvas is used when creating bitmap images.

  Returns:
    true if a color canvas is used.

### determinePrintDirection

    public static int determinePrintDirection(java.awt.geom.AffineTransform transform)

  Determines the print direction based on the given transformation matrix. This method only detects right angles (0, 90, 180, 270). If any other angle is determined, 0 is returned.

  Parameters:
    `transform` - the transformation matrix
  Returns:
    the angle in degrees of the print direction.

### transformedPoint

    public static java.awt.geom.Point2D transformedPoint(int x,
                                                         int y,
                                                         java.awt.geom.AffineTransform transform,
                                                         PCLPageDefinition pageDefinition,
                                                         int printDirection)

  Returns a coordinate in PCL's coordinate system when given a coordinate in the user coordinate system.

  Parameters:
    `x` - the X coordinate
    `y` - the Y coordinate
    `transform` - the currently valid transformation matrix
    `pageDefinition` - the currently valid page definition
    `printDirection` - the currently valid print direction
  Returns:
    the transformed point

fop 1.1

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