Top Methods
com.openhtmltopdf.extend

public Interface OutputDevice

Known Direct Implementers
com.openhtmltopdf.render.AbstractOutputDevice
Imports
com.openhtmltopdf.css.parser.FSColor, com.openhtmltopdf.css.style.CalculatedStyle, com.openhtmltopdf.css.style.derived.BorderPropertySet, .FSLinearGradient, com.openhtmltopdf.render.*, com.openhtmltopdf.util.LogMessageId, .XRLog, java.awt.*, .RenderingHints.Key, java.awt.geom.AffineTransform, java.util.List, java.util.logging.Level

Method Summary

Modifier and TypeMethod and Description
public void
clip(Shape s)
Deprecated

public void
public void
drawBorderLine(Shape bounds, int side, int width, boolean solid)

public void
public void
drawImage(FSImage image, int x, int y, boolean interpolate)

public default void
drawLinearGradient(FSLinearGradient backgroundLinearGradient, Shape bounds)

public void
drawOval(int x, int y, int width, int height)

public void
drawRect(int x, int y, int width, int height)

public void
public void
public void
public void
public void
drawWithGraphics(float x, float y, float width, float height, OutputDeviceGraphicsDrawer renderer)

Draw something using a Graphics2D at the given rectangle.

public void
public void
public void
fillOval(int x, int y, int width, int height)

public void
fillRect(int x, int y, int width, int height)

public float
public float
public Shape
getClip()
Deprecated

public Object
public Stroke
public boolean
isFastRenderer()

The new (2018) fast renderer is in use.

public boolean
public boolean
public boolean
isSupportsSelection()
Deprecated

public void
public void
public void
public void
public void
public void
public void
popClip()

Reverts the last clip on the stack.

public void
popTransformLayer()

Reverts the transform on the stack.

public void
popTransforms(List<AffineTransform> inverse)
Deprecated

public void
pushClip(Shape s)

Applies a clip on the output device.

public void
pushTransformLayer(AffineTransform transform)

Applies a transform on the output device.

public List<AffineTransform>

Returns:

the list of inverse transforms to undo the effect of this transform
pushTransforms
(List<AffineTransform> transforms)
Deprecated

Apply the given transform on top of the current one in the PDF graphics stream.

public void
setClip(Shape s)
Deprecated

public void
public void
public void
setPaint(Paint paint)

public void
public void
public Object
startStructure(StructureType type, Box box)

Propagate the structure heirachy to allow for PDF/UA compliance.

public void
translate(double tx, double ty)

Method Detail

clipback to summary
public void clip(Shape s)

Deprecated

Annotations
@Deprecated
drawback to summary
public void draw(Shape s)
drawBorderLineback to summary
public void drawBorderLine(Shape bounds, int side, int width, boolean solid)
drawDebugOutlineback to summary
public void drawDebugOutline(RenderingContext c, Box box, FSColor color)
drawImageback to summary
public void drawImage(FSImage image, int x, int y, boolean interpolate)
drawLinearGradientback to summary
public default void drawLinearGradient(FSLinearGradient backgroundLinearGradient, Shape bounds)
drawOvalback to summary
public void drawOval(int x, int y, int width, int height)
drawRectback to summary
public void drawRect(int x, int y, int width, int height)
drawSelectionback to summary
public void drawSelection(RenderingContext c, InlineText inlineText)
drawTextback to summary
public void drawText(RenderingContext c, InlineText inlineText)
drawTextDecorationback to summary
public void drawTextDecoration(RenderingContext c, LineBox lineBox)
drawTextDecorationback to summary
public void drawTextDecoration(RenderingContext c, InlineLayoutBox iB, TextDecoration decoration)
drawWithGraphicsback to summary
public void drawWithGraphics(float x, float y, float width, float height, OutputDeviceGraphicsDrawer renderer)

Draw something using a Graphics2D at the given rectangle.

endStructureback to summary
public void endStructure(Object token)
fillback to summary
public void fill(Shape s)
fillOvalback to summary
public void fillOval(int x, int y, int width, int height)
fillRectback to summary
public void fillRect(int x, int y, int width, int height)
getAbsoluteTransformOriginXback to summary
public float getAbsoluteTransformOriginX()

Deprecated

Annotations
@Deprecated
getAbsoluteTransformOriginYback to summary
public float getAbsoluteTransformOriginY()

Deprecated

Annotations
@Deprecated
getClipback to summary
public Shape getClip()

Deprecated

Annotations
@Deprecated
getRenderingHintback to summary
public Object getRenderingHint(RenderingHints.Key key)
getStrokeback to summary
public Stroke getStroke()
isFastRendererback to summary
public boolean isFastRenderer()

The new (2018) fast renderer is in use.

isPDFback to summary
public boolean isPDF()
isSupportsCMYKColorsback to summary
public boolean isSupportsCMYKColors()
isSupportsSelectionback to summary
public boolean isSupportsSelection()

Deprecated

Annotations
@Deprecated
paintBackgroundback to summary
public void paintBackground(RenderingContext c, Box box)
paintBackgroundback to summary
public void paintBackground(RenderingContext c, CalculatedStyle style, Rectangle bounds, Rectangle bgImageContainer, BorderPropertySet border)
paintBorderback to summary
public void paintBorder(RenderingContext c, Box box)
paintBorderback to summary
public void paintBorder(RenderingContext c, CalculatedStyle style, Rectangle edge, int sides)
paintCollapsedBorderback to summary
public void paintCollapsedBorder(RenderingContext c, BorderPropertySet border, Rectangle bounds, int side)
paintReplacedElementback to summary
public void paintReplacedElement(RenderingContext c, BlockBox box)
popClipback to summary
public void popClip()

Reverts the last clip on the stack. The fast renderer MUST use pushClip and popClip in preference to clip and setClip.

Note

The current implementation shares a stack between transforms and clips, so calls to pushTransformLayer(AffineTransform), popTransformLayer(), pushClip(Shape) and popClip() MUST be nested correctly.

popTransformLayerback to summary
public void popTransformLayer()

Reverts the transform on the stack.

Note

The current implementation shares a stack between transforms and clips, so calls to pushTransformLayer(AffineTransform), popTransformLayer(), pushClip(Shape) and popClip() MUST be nested correctly.

popTransformsback to summary
public void popTransforms(List<AffineTransform> inverse)

Deprecated

Annotations
@Deprecated
pushClipback to summary
public void pushClip(Shape s)

Applies a clip on the output device. This is a cumulative operation. The fast renderer MUST use pushClip and popClip in preference to clip and setClip.

Note

The current implementation shares a stack between transforms and clips, so calls to pushTransformLayer(AffineTransform), popTransformLayer(), pushClip(Shape) and popClip() MUST be nested correctly.

pushTransformLayerback to summary
public void pushTransformLayer(AffineTransform transform)

Applies a transform on the output device. This is a cumulativew operation.

Note

The current implementation shares a stack between transforms and clips, so calls to pushTransformLayer(AffineTransform), popTransformLayer(), pushClip(Shape) and popClip() MUST be nested correctly.

pushTransformsback to summary
public List<AffineTransform> pushTransforms(List<AffineTransform> transforms)

Deprecated

Apply the given transform on top of the current one in the PDF graphics stream. This is a cumulative operation. You should popTransform after the box and children are painted.

Returns:List<AffineTransform>

the list of inverse transforms to undo the effect of this transform

Annotations
@Deprecated
setClipback to summary
public void setClip(Shape s)

Deprecated

Annotations
@Deprecated
setColorback to summary
public void setColor(FSColor color)
setFontback to summary
public void setFont(FSFont font)
setPaintback to summary
public void setPaint(Paint paint)
setRenderingHintback to summary
public void setRenderingHint(RenderingHints.Key key, Object value)
setStrokeback to summary
public void setStroke(Stroke s)
startStructureback to summary
public Object startStructure(StructureType type, Box box)

Propagate the structure heirachy to allow for PDF/UA compliance.

translateback to summary
public void translate(double tx, double ty)