org.pentaho.reporting.engine.classic.core.layout.output
Class RenderUtility
java.lang.Object
org.pentaho.reporting.engine.classic.core.layout.output.RenderUtility
public class RenderUtility
- extends Object
Creation-Date: 12.05.2007, 15:58:43
- Author:
- Thomas Morgner
Method Summary |
static long |
computeHorizontalAlignment(ElementAlignment alignment,
long width,
long imageWidth)
|
static long |
computeVerticalAlignment(ElementAlignment alignment,
long height,
long imageHeight)
|
static ImageContainer |
createImageFromDrawable(org.pentaho.reporting.libraries.resourceloader.factory.drawable.DrawableWrapper drawable,
StrictBounds rect,
RenderNode box,
OutputProcessorMetaData metaData)
|
static byte[] |
encodeImage(Image image)
Encodes the given image as PNG, stores the image in the generated file and returns the name of the new image file. |
static byte[] |
encodeImage(Image image,
String mimeType,
float quality,
boolean alpha)
|
static void |
encodeImage(OutputStream outputStream,
Image image,
String mimeType,
float quality,
boolean alpha)
|
static ImageMap |
extractImageMap(RenderableReplacedContentBox content)
|
static ImageMap |
extractImageMap(RenderableReplacedContentBox node,
org.pentaho.reporting.libraries.resourceloader.factory.drawable.DrawableWrapper drawable)
|
static float |
getEncoderQuality(ReportAttributeMap attributeMap)
|
static String |
getEncoderType(ReportAttributeMap attributes)
|
static double |
getNormalizationScale(OutputProcessorMetaData metaData)
|
static boolean |
isFontSmooth(StyleSheet styleSheet,
OutputProcessorMetaData metaData)
|
static Image |
scaleImage(Image img,
int targetWidth,
int targetHeight,
Object hintValue,
boolean higherQuality)
|
getEncoderType
public static String getEncoderType(ReportAttributeMap attributes)
getEncoderQuality
public static float getEncoderQuality(ReportAttributeMap attributeMap)
isFontSmooth
public static boolean isFontSmooth(StyleSheet styleSheet,
OutputProcessorMetaData metaData)
encodeImage
public static byte[] encodeImage(Image image)
throws org.pentaho.reporting.libraries.base.encoder.UnsupportedEncoderException,
IOException
- Encodes the given image as PNG, stores the image in the generated file and returns the name of the new image file.
- Parameters:
image
- the image to be encoded
- Returns:
- the name of the image, never null.
- Throws:
IOException
- if an IO erro occured.
org.pentaho.reporting.libraries.base.encoder.UnsupportedEncoderException
encodeImage
public static byte[] encodeImage(Image image,
String mimeType,
float quality,
boolean alpha)
throws org.pentaho.reporting.libraries.base.encoder.UnsupportedEncoderException,
IOException
- Throws:
org.pentaho.reporting.libraries.base.encoder.UnsupportedEncoderException
IOException
encodeImage
public static void encodeImage(OutputStream outputStream,
Image image,
String mimeType,
float quality,
boolean alpha)
throws org.pentaho.reporting.libraries.base.encoder.UnsupportedEncoderException,
IOException
- Throws:
org.pentaho.reporting.libraries.base.encoder.UnsupportedEncoderException
IOException
scaleImage
public static Image scaleImage(Image img,
int targetWidth,
int targetHeight,
Object hintValue,
boolean higherQuality)
getNormalizationScale
public static double getNormalizationScale(OutputProcessorMetaData metaData)
createImageFromDrawable
public static ImageContainer createImageFromDrawable(org.pentaho.reporting.libraries.resourceloader.factory.drawable.DrawableWrapper drawable,
StrictBounds rect,
RenderNode box,
OutputProcessorMetaData metaData)
computeHorizontalAlignment
public static long computeHorizontalAlignment(ElementAlignment alignment,
long width,
long imageWidth)
computeVerticalAlignment
public static long computeVerticalAlignment(ElementAlignment alignment,
long height,
long imageHeight)
extractImageMap
public static ImageMap extractImageMap(RenderableReplacedContentBox node,
org.pentaho.reporting.libraries.resourceloader.factory.drawable.DrawableWrapper drawable)
extractImageMap
public static ImageMap extractImageMap(RenderableReplacedContentBox content)