Package com.openhtmltopdf.extend
Interface OutputDevice
-
- All Known Subinterfaces:
PdfBoxOutputDevice
- All Known Implementing Classes:
AbstractOutputDevice
,Java2DOutputDevice
,PdfBoxFastOutputDevice
,PdfBoxSlowOutputDevice
public interface OutputDevice
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description void
clip(java.awt.Shape s)
Deprecated.void
draw(java.awt.Shape s)
void
drawBorderLine(java.awt.Shape bounds, int side, int width, boolean solid)
void
drawDebugOutline(RenderingContext c, Box box, FSColor color)
void
drawImage(FSImage image, int x, int y, boolean interpolate)
default void
drawLinearGradient(FSLinearGradient backgroundLinearGradient, java.awt.Shape bounds)
void
drawOval(int x, int y, int width, int height)
void
drawRect(int x, int y, int width, int height)
void
drawSelection(RenderingContext c, InlineText inlineText)
void
drawText(RenderingContext c, InlineText inlineText)
void
drawTextDecoration(RenderingContext c, InlineLayoutBox iB, TextDecoration decoration)
void
drawTextDecoration(RenderingContext c, LineBox lineBox)
void
drawWithGraphics(float x, float y, float width, float height, OutputDeviceGraphicsDrawer renderer)
Draw something using a Graphics2D at the given rectangle.void
endStructure(java.lang.Object token)
void
fill(java.awt.Shape s)
void
fillOval(int x, int y, int width, int height)
void
fillRect(int x, int y, int width, int height)
float
getAbsoluteTransformOriginX()
Deprecated.float
getAbsoluteTransformOriginY()
Deprecated.java.awt.Shape
getClip()
Deprecated.java.lang.Object
getRenderingHint(java.awt.RenderingHints.Key key)
java.awt.Stroke
getStroke()
boolean
isFastRenderer()
The new (2018) fast renderer is in use.boolean
isPDF()
boolean
isSupportsCMYKColors()
boolean
isSupportsSelection()
Deprecated.void
paintBackground(RenderingContext c, CalculatedStyle style, java.awt.Rectangle bounds, java.awt.Rectangle bgImageContainer, BorderPropertySet border)
void
paintBackground(RenderingContext c, Box box)
void
paintBorder(RenderingContext c, CalculatedStyle style, java.awt.Rectangle edge, int sides)
void
paintBorder(RenderingContext c, Box box)
void
paintCollapsedBorder(RenderingContext c, BorderPropertySet border, java.awt.Rectangle bounds, int side)
void
paintReplacedElement(RenderingContext c, BlockBox box)
void
popClip()
Reverts the last clip on the stack.void
popTransformLayer()
Reverts the transform on the stack.void
popTransforms(java.util.List<java.awt.geom.AffineTransform> inverse)
Deprecated.void
pushClip(java.awt.Shape s)
Applies a clip on the output device.void
pushTransformLayer(java.awt.geom.AffineTransform transform)
Applies a transform on the output device.java.util.List<java.awt.geom.AffineTransform>
pushTransforms(java.util.List<java.awt.geom.AffineTransform> transforms)
Deprecated.void
setClip(java.awt.Shape s)
Deprecated.void
setColor(FSColor color)
void
setFont(FSFont font)
void
setPaint(java.awt.Paint paint)
void
setRenderingHint(java.awt.RenderingHints.Key key, java.lang.Object value)
void
setStroke(java.awt.Stroke s)
java.lang.Object
startStructure(StructureType type, Box box)
Propagate the structure heirachy to allow for PDF/UA compliance.void
translate(double tx, double ty)
-
-
-
Method Detail
-
setPaint
void setPaint(java.awt.Paint paint)
-
pushTransforms
@Deprecated java.util.List<java.awt.geom.AffineTransform> pushTransforms(java.util.List<java.awt.geom.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:
- the list of inverse transforms to undo the effect of this transform
-
popTransforms
@Deprecated void popTransforms(java.util.List<java.awt.geom.AffineTransform> inverse)
Deprecated.
-
getAbsoluteTransformOriginX
@Deprecated float getAbsoluteTransformOriginX()
Deprecated.
-
getAbsoluteTransformOriginY
@Deprecated float getAbsoluteTransformOriginY()
Deprecated.
-
drawText
void drawText(RenderingContext c, InlineText inlineText)
-
drawSelection
void drawSelection(RenderingContext c, InlineText inlineText)
-
drawTextDecoration
void drawTextDecoration(RenderingContext c, LineBox lineBox)
-
drawTextDecoration
void drawTextDecoration(RenderingContext c, InlineLayoutBox iB, TextDecoration decoration)
-
paintBorder
void paintBorder(RenderingContext c, Box box)
-
paintBorder
void paintBorder(RenderingContext c, CalculatedStyle style, java.awt.Rectangle edge, int sides)
-
paintCollapsedBorder
void paintCollapsedBorder(RenderingContext c, BorderPropertySet border, java.awt.Rectangle bounds, int side)
-
paintBackground
void paintBackground(RenderingContext c, Box box)
-
paintBackground
void paintBackground(RenderingContext c, CalculatedStyle style, java.awt.Rectangle bounds, java.awt.Rectangle bgImageContainer, BorderPropertySet border)
-
paintReplacedElement
void paintReplacedElement(RenderingContext c, BlockBox box)
-
drawDebugOutline
void drawDebugOutline(RenderingContext c, Box box, FSColor color)
-
setFont
void setFont(FSFont font)
-
setColor
void setColor(FSColor color)
-
drawRect
void drawRect(int x, int y, int width, int height)
-
drawOval
void drawOval(int x, int y, int width, int height)
-
drawBorderLine
void drawBorderLine(java.awt.Shape bounds, int side, int width, boolean solid)
-
drawImage
void drawImage(FSImage image, int x, int y, boolean interpolate)
-
drawLinearGradient
default void drawLinearGradient(FSLinearGradient backgroundLinearGradient, java.awt.Shape bounds)
-
draw
void draw(java.awt.Shape s)
-
fill
void fill(java.awt.Shape s)
-
fillRect
void fillRect(int x, int y, int width, int height)
-
fillOval
void fillOval(int x, int y, int width, int height)
-
clip
@Deprecated void clip(java.awt.Shape s)
Deprecated.
-
getClip
@Deprecated java.awt.Shape getClip()
Deprecated.
-
setClip
@Deprecated void setClip(java.awt.Shape s)
Deprecated.
-
translate
void translate(double tx, double ty)
-
setStroke
void setStroke(java.awt.Stroke s)
-
getStroke
java.awt.Stroke getStroke()
-
getRenderingHint
java.lang.Object getRenderingHint(java.awt.RenderingHints.Key key)
-
setRenderingHint
void setRenderingHint(java.awt.RenderingHints.Key key, java.lang.Object value)
-
isSupportsSelection
@Deprecated boolean isSupportsSelection()
Deprecated.
-
isSupportsCMYKColors
boolean isSupportsCMYKColors()
-
drawWithGraphics
void drawWithGraphics(float x, float y, float width, float height, OutputDeviceGraphicsDrawer renderer)
Draw something using a Graphics2D at the given rectangle.
-
isPDF
boolean isPDF()
-
pushTransformLayer
void pushTransformLayer(java.awt.geom.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 topushTransformLayer(AffineTransform)
,popTransformLayer()
,pushClip(Shape)
andpopClip()
MUST be nested correctly.
-
popTransformLayer
void popTransformLayer()
Reverts the transform on the stack. NOTE: The current implementation shares a stack between transforms and clips, so calls topushTransformLayer(AffineTransform)
,popTransformLayer()
,pushClip(Shape)
andpopClip()
MUST be nested correctly.
-
pushClip
void pushClip(java.awt.Shape s)
Applies a clip on the output device. This is a cumulative operation. The fast renderer MUST usepushClip
andpopClip
in preference toclip
andsetClip
. NOTE: The current implementation shares a stack between transforms and clips, so calls topushTransformLayer(AffineTransform)
,popTransformLayer()
,pushClip(Shape)
andpopClip()
MUST be nested correctly.
-
popClip
void popClip()
Reverts the last clip on the stack. The fast renderer MUST usepushClip
andpopClip
in preference toclip
andsetClip
. NOTE: The current implementation shares a stack between transforms and clips, so calls topushTransformLayer(AffineTransform)
,popTransformLayer()
,pushClip(Shape)
andpopClip()
MUST be nested correctly.
-
isFastRenderer
boolean isFastRenderer()
The new (2018) fast renderer is in use.
-
startStructure
java.lang.Object startStructure(StructureType type, Box box)
Propagate the structure heirachy to allow for PDF/UA compliance.
-
endStructure
void endStructure(java.lang.Object token)
-
-