Top Description Fields Constructors Methods
com.openhtmltopdf.render

public abstract Class AbstractOutputDevice

extends Object
implements OutputDevice
Class Inheritance
All Implemented Interfaces
com.openhtmltopdf.extend.OutputDevice
Imports
com.openhtmltopdf.bidi.BidiReorderer, .BidiSplitter, com.openhtmltopdf.css.constants.CSSName, .IdentValue, com.openhtmltopdf.css.parser.CSSPrimitiveValue, .FSColor, .FSRGBColor, .PropertyValue, com.openhtmltopdf.css.style.BackgroundPosition, .BackgroundSize, .CalculatedStyle, .CalculatedStyle.BackgroundContainer, .CalculatedStyle.BackgroundImageType, .CssContext, com.openhtmltopdf.css.style.derived.BorderPropertySet, .FSLinearGradient, .LengthValue, com.openhtmltopdf.css.value.FontSpecification, com.openhtmltopdf.extend.FSImage, .OutputDevice, com.openhtmltopdf.util.Configuration, .LogMessageId, .XRLog, java.awt.*, java.awt.geom.Area, java.util.ArrayList, .Collections, .Iterator, .List, java.util.logging.Level

An abstract implementation of an OutputDevice. It provides complete implementations for many OutputDevice methods.

Field Summary

Modifier and TypeField and Description
private FontSpecification

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private int
adjustTo(int target, int current, int imageDim)

private int
private Dimension
private int
calcOffset(CssContext c, CalculatedStyle style, PropertyValue value, float boundsDim, float imageDim)

private void
drawBgImage(RenderingContext c, CalculatedStyle style, Rectangle backgroundBounds, Rectangle bgImageContainer, BorderPropertySet border, FSImage backgroundImage, CalculatedStyle.BackgroundContainer bgImage)

public void
private void
protected abstract void
drawLine(int x1, int y1, int x2, int y2)

public void
public void
public void
private FSImage
public FontSpecification

Returns:

current FontSpecification.
getFontSpecification
()

Gets the FontSpecification for this AbstractOutputDevice.

public boolean
public void
public void
private void
paintBackground0(RenderingContext c, CalculatedStyle style, Rectangle backgroundBounds, Rectangle bgImageContainer, BorderPropertySet border)

public void
public void
public void
private void
paintHorizontalBand(FSImage image, int left, int top, int right, boolean interpolate)

private void
paintTiles(FSImage image, int left, int top, int right, int bottom, boolean interpolate)

private void
paintVerticalBand(FSImage image, int left, int top, int bottom, boolean interpolate)

private void
public void
setFontSpecification(FontSpecification
current FontSpecification.
fs
)

Sets the FontSpecification for this AbstractOutputDevice.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

_fontSpecback to summary
private FontSpecification _fontSpec

Constructor Detail

AbstractOutputDeviceback to summary
public AbstractOutputDevice()

Method Detail

adjustToback to summary
private int adjustTo(int target, int current, int imageDim)
calcBackgroundSizeLengthback to summary
private int calcBackgroundSizeLength(CssContext c, CalculatedStyle style, PropertyValue value, float boundsDim)
calcInitialXYOffback to summary
private Dimension calcInitialXYOff(CalculatedStyle.BackgroundContainer bgImage, Rectangle bgImageContainer, BorderPropertySet border, CalculatedStyle style, RenderingContext c)
calcOffsetback to summary
private int calcOffset(CssContext c, CalculatedStyle style, PropertyValue value, float boundsDim, float imageDim)
drawBgImageback to summary
private void drawBgImage(RenderingContext c, CalculatedStyle style, Rectangle backgroundBounds, Rectangle bgImageContainer, BorderPropertySet border, FSImage backgroundImage, CalculatedStyle.BackgroundContainer bgImage)
drawDebugOutlineback to summary
public void drawDebugOutline(RenderingContext c, Box box, FSColor color)

Implements com.openhtmltopdf.extend.OutputDevice.drawDebugOutline.

Annotations
@Override
drawFontMetricsback to summary
private void drawFontMetrics(RenderingContext c, InlineText inlineText)
drawLineback to summary
protected abstract void drawLine(int x1, int y1, int x2, int y2)
drawTextback to summary
public void drawText(RenderingContext c, InlineText inlineText)

Implements com.openhtmltopdf.extend.OutputDevice.drawText.

Annotations
@Override
drawTextDecorationback to summary
public void drawTextDecoration(RenderingContext c, InlineLayoutBox iB, TextDecoration decoration)

Implements com.openhtmltopdf.extend.OutputDevice.drawTextDecoration.

Annotations
@Override
drawTextDecorationback to summary
public void drawTextDecoration(RenderingContext c, LineBox lineBox)

Implements com.openhtmltopdf.extend.OutputDevice.drawTextDecoration.

Annotations
@Override
getBackgroundImageback to summary
private FSImage getBackgroundImage(PropertyValue bgImage, RenderingContext c)
getFontSpecificationback to summary
public FontSpecification getFontSpecification()

Gets the FontSpecification for this AbstractOutputDevice.

Returns:FontSpecification

current FontSpecification.

isPDFback to summary
public boolean isPDF()

Implements com.openhtmltopdf.extend.OutputDevice.isPDF.

Annotations
@Override
paintBackgroundback to summary
public void paintBackground(RenderingContext c, CalculatedStyle style, Rectangle bounds, Rectangle bgImageContainer, BorderPropertySet border)

Implements com.openhtmltopdf.extend.OutputDevice.paintBackground.

Annotations
@Override
paintBackgroundback to summary
public void paintBackground(RenderingContext c, Box box)

Implements com.openhtmltopdf.extend.OutputDevice.paintBackground.

Annotations
@Override
paintBackground0back to summary
private void paintBackground0(RenderingContext c, CalculatedStyle style, Rectangle backgroundBounds, Rectangle bgImageContainer, BorderPropertySet border)
paintBorderback to summary
public void paintBorder(RenderingContext c, Box box)

Implements com.openhtmltopdf.extend.OutputDevice.paintBorder.

Annotations
@Override
paintBorderback to summary
public void paintBorder(RenderingContext c, CalculatedStyle style, Rectangle edge, int sides)

Implements com.openhtmltopdf.extend.OutputDevice.paintBorder.

Annotations
@Override
paintCollapsedBorderback to summary
public void paintCollapsedBorder(RenderingContext c, BorderPropertySet border, Rectangle bounds, int side)

Implements com.openhtmltopdf.extend.OutputDevice.paintCollapsedBorder.

Annotations
@Override
paintHorizontalBandback to summary
private void paintHorizontalBand(FSImage image, int left, int top, int right, boolean interpolate)
paintTilesback to summary
private void paintTiles(FSImage image, int left, int top, int right, int bottom, boolean interpolate)
paintVerticalBandback to summary
private void paintVerticalBand(FSImage image, int left, int top, int bottom, boolean interpolate)
scaleBackgroundImageback to summary
private void scaleBackgroundImage(CssContext c, CalculatedStyle style, Rectangle backgroundContainer, FSImage image, CalculatedStyle.BackgroundContainer bgImage)
setFontSpecificationback to summary
public void setFontSpecification(FontSpecification fs)

Sets the FontSpecification for this AbstractOutputDevice.

Parameters
fs:FontSpecification

current FontSpecification.