Package com.openhtmltopdf.java2d
Class Java2DOutputDevice
java.lang.Object
com.openhtmltopdf.render.AbstractOutputDevice
com.openhtmltopdf.java2d.Java2DOutputDevice
- All Implemented Interfaces:
OutputDevice
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Java2DFontprivate Graphics2Dprivate final Deque<AffineTransform> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidDeprecated.voidvoiddrawBorderLine(Shape bounds, int side, int lineWidth, boolean solid) voidprotected voiddrawLine(int x1, int y1, int x2, int y2) voiddrawLinearGradient(FSLinearGradient lg, Shape bounds) voiddrawOval(int x, int y, int width, int height) voiddrawRect(int x, int y, int width, int height) voiddrawSelection(RenderingContext c, InlineText inlineText) Deprecated.voiddrawWithGraphics(float x, float y, float width, float height, OutputDeviceGraphicsDrawer renderer) Draw something using a Graphics2D at the given rectangle.voidendStructure(Object token) voidvoidfillOval(int x, int y, int width, int height) voidfillRect(int x, int y, int width, int height) voidfinish(RenderingContext c, BlockBox _root) floatDeprecated.floatDeprecated.getClip()Deprecated.getFont()voidinitializePage(Graphics2D pageGraphics) booleanThe new (2018) fast renderer is in use.booleanbooleanDeprecated.voidvoidpopClip()Reverts the last clip on the stack.voidReverts the transform on the stack.voidpopTransforms(List<AffineTransform> inverse) Deprecated.voidApplies a clip on the output device.voidpushTransformLayer(AffineTransform transform) Applies a transform on the output device.pushTransforms(List<AffineTransform> transforms) Deprecated.voidsetBidiReorderer(BidiReorderer _reorderer) voidDeprecated.voidvoidvoidvoidsetRenderingContext(RenderingContext result) voidsetRenderingHint(RenderingHints.Key key, Object value) voidvoidstartStructure(StructureType type, Box box) Propagate the structure heirachy to allow for PDF/UA compliance.voidtranslate(double tx, double ty) Methods inherited from class com.openhtmltopdf.render.AbstractOutputDevice
drawDebugOutline, drawText, drawTextDecoration, drawTextDecoration, getFontSpecification, isPDF, paintBackground, paintBackground, paintBorder, paintBorder, paintCollapsedBorder, setFontSpecificationMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.openhtmltopdf.extend.OutputDevice
drawDebugOutline, drawText, drawTextDecoration, drawTextDecoration, isPDF, paintBackground, paintBackground, paintBorder, paintBorder, paintCollapsedBorder
-
Field Details
-
_clipStack
-
_transformStack
-
_graphics
-
_font
-
-
Constructor Details
-
Java2DOutputDevice
-
-
Method Details
-
drawSelection
Deprecated.- Specified by:
drawSelectionin interfaceOutputDevice
-
drawBorderLine
- Specified by:
drawBorderLinein interfaceOutputDevice
-
paintReplacedElement
- Specified by:
paintReplacedElementin interfaceOutputDevice
-
setColor
- Specified by:
setColorin interfaceOutputDevice
-
drawLine
protected void drawLine(int x1, int y1, int x2, int y2) - Specified by:
drawLinein classAbstractOutputDevice
-
drawRect
public void drawRect(int x, int y, int width, int height) - Specified by:
drawRectin interfaceOutputDevice
-
fillRect
public void fillRect(int x, int y, int width, int height) - Specified by:
fillRectin interfaceOutputDevice
-
setClip
Deprecated.- Specified by:
setClipin interfaceOutputDevice
-
getClip
Deprecated.- Specified by:
getClipin interfaceOutputDevice
-
clip
Deprecated.- Specified by:
clipin interfaceOutputDevice
-
translate
public void translate(double tx, double ty) - Specified by:
translatein interfaceOutputDevice
-
getGraphics
-
drawOval
public void drawOval(int x, int y, int width, int height) - Specified by:
drawOvalin interfaceOutputDevice
-
fillOval
public void fillOval(int x, int y, int width, int height) - Specified by:
fillOvalin interfaceOutputDevice
-
getRenderingHint
- Specified by:
getRenderingHintin interfaceOutputDevice
-
setRenderingHint
- Specified by:
setRenderingHintin interfaceOutputDevice
-
setFont
- Specified by:
setFontin interfaceOutputDevice
-
getFont
-
setStroke
- Specified by:
setStrokein interfaceOutputDevice
-
getStroke
- Specified by:
getStrokein interfaceOutputDevice
-
fill
- Specified by:
fillin interfaceOutputDevice
-
draw
- Specified by:
drawin interfaceOutputDevice
-
drawImage
- Specified by:
drawImagein interfaceOutputDevice
-
isSupportsSelection
Deprecated.- Specified by:
isSupportsSelectionin interfaceOutputDevice
-
isSupportsCMYKColors
public boolean isSupportsCMYKColors()- Specified by:
isSupportsCMYKColorsin interfaceOutputDevice
-
drawWithGraphics
public void drawWithGraphics(float x, float y, float width, float height, OutputDeviceGraphicsDrawer renderer) Description copied from interface:OutputDeviceDraw something using a Graphics2D at the given rectangle.- Specified by:
drawWithGraphicsin interfaceOutputDevice
-
setPaint
- Specified by:
setPaintin interfaceOutputDevice
-
pushTransforms
Deprecated.Description copied from interface:OutputDeviceApply 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.- Specified by:
pushTransformsin interfaceOutputDevice- Returns:
- the list of inverse transforms to undo the effect of this transform
-
popTransforms
Deprecated.- Specified by:
popTransformsin interfaceOutputDevice
-
getAbsoluteTransformOriginX
Deprecated.- Specified by:
getAbsoluteTransformOriginXin interfaceOutputDevice
-
getAbsoluteTransformOriginY
Deprecated.- Specified by:
getAbsoluteTransformOriginYin interfaceOutputDevice
-
setBidiReorderer
-
setRenderingContext
-
setRoot
-
initializePage
-
finish
-
pushTransformLayer
Description copied from interface:OutputDeviceApplies a transform on the output device. This is a cumulativew operation. NOTE: The current implementation shares a stack between transforms and clips, so calls toOutputDevice.pushTransformLayer(AffineTransform),OutputDevice.popTransformLayer(),OutputDevice.pushClip(Shape)andOutputDevice.popClip()MUST be nested correctly.- Specified by:
pushTransformLayerin interfaceOutputDevice
-
popTransformLayer
public void popTransformLayer()Description copied from interface:OutputDeviceReverts the transform on the stack. NOTE: The current implementation shares a stack between transforms and clips, so calls toOutputDevice.pushTransformLayer(AffineTransform),OutputDevice.popTransformLayer(),OutputDevice.pushClip(Shape)andOutputDevice.popClip()MUST be nested correctly.- Specified by:
popTransformLayerin interfaceOutputDevice
-
popClip
public void popClip()Description copied from interface:OutputDeviceReverts the last clip on the stack. The fast renderer MUST usepushClipandpopClipin preference toclipandsetClip. NOTE: The current implementation shares a stack between transforms and clips, so calls toOutputDevice.pushTransformLayer(AffineTransform),OutputDevice.popTransformLayer(),OutputDevice.pushClip(Shape)andOutputDevice.popClip()MUST be nested correctly.- Specified by:
popClipin interfaceOutputDevice
-
pushClip
Description copied from interface:OutputDeviceApplies a clip on the output device. This is a cumulative operation. The fast renderer MUST usepushClipandpopClipin preference toclipandsetClip. NOTE: The current implementation shares a stack between transforms and clips, so calls toOutputDevice.pushTransformLayer(AffineTransform),OutputDevice.popTransformLayer(),OutputDevice.pushClip(Shape)andOutputDevice.popClip()MUST be nested correctly.- Specified by:
pushClipin interfaceOutputDevice
-
isFastRenderer
public boolean isFastRenderer()Description copied from interface:OutputDeviceThe new (2018) fast renderer is in use.- Specified by:
isFastRendererin interfaceOutputDevice
-
startStructure
Description copied from interface:OutputDevicePropagate the structure heirachy to allow for PDF/UA compliance.- Specified by:
startStructurein interfaceOutputDevice
-
endStructure
- Specified by:
endStructurein interfaceOutputDevice
-
drawLinearGradient
- Specified by:
drawLinearGradientin interfaceOutputDevice
-