Class AbstractOutputDevice
java.lang.Object
org.openpdf.render.AbstractOutputDevice
- All Implemented Interfaces:
OutputDevice
- Direct Known Subclasses:
ITextOutputDevice, Java2DOutputDevice
An abstract implementation of an
OutputDevice. It provides complete
implementations for many OutputDevice methods.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate intadjustTo(int target, int current, int imageDim) private intcalcBackgroundSizeLength(CssContext c, CalculatedStyle style, PropertyValue value, float boundsDim) private intcalcOffset(CssContext c, CalculatedStyle style, PropertyValue value, float boundsDim, float imageDim) voiddrawDebugOutline(RenderingContext c, Box box, FSColor color) private voiddrawFontMetrics(RenderingContext c, InlineText inlineText) protected abstract voiddrawLine(int x1, int y1, int x2, int y2) voiddrawText(RenderingContext c, InlineText inlineText) voiddrawTextDecoration(RenderingContext c, InlineLayoutBox iB, TextDecoration decoration) voiddrawTextDecoration(RenderingContext c, LineBox lineBox) private @Nullable FSImageGets the FontSpecification for this AbstractOutputDevice.voidpaintBackground(RenderingContext c, CalculatedStyle style, Rectangle bounds, Rectangle bgImageContainer, BorderPropertySet border) voidpaintBackground(RenderingContext c, Box box) private voidpaintBackground0(RenderingContext c, CalculatedStyle style, Rectangle backgroundBounds, Rectangle bgImageContainer, BorderPropertySet border) voidpaintBorder(RenderingContext c, CalculatedStyle style, Rectangle edge, int sides) voidpaintBorder(RenderingContext c, Box box) voidpaintCollapsedBorder(RenderingContext c, BorderPropertySet border, Rectangle bounds, int side) private voidpaintHorizontalBand(FSImage image, int left, int top, int right) private voidpaintTiles(FSImage image, int left, int top, int right, int bottom) private voidpaintVerticalBand(FSImage image, int left, int top, int bottom) private FSImagescaleBackgroundImage(CssContext c, CalculatedStyle style, Rectangle backgroundContainer, FSImage image) voidSets the FontSpecification for this AbstractOutputDevice.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface OutputDevice
clip, draw, drawBorderLine, drawImage, drawLinearGradient, drawOval, drawRect, drawSelection, fill, fillOval, fillRect, getClip, getRenderingHint, getStroke, isSupportsCMYKColors, isSupportsSelection, paintReplacedElement, setClip, setColor, setFont, setOpacity, setRenderingHint, setStroke, translate
-
Field Details
-
_fontSpec
-
-
Constructor Details
-
AbstractOutputDevice
public AbstractOutputDevice()
-
-
Method Details
-
drawLine
protected abstract void drawLine(int x1, int y1, int x2, int y2) -
drawText
- Specified by:
drawTextin interfaceOutputDevice
-
drawFontMetrics
-
drawTextDecoration
- Specified by:
drawTextDecorationin interfaceOutputDevice
-
drawTextDecoration
- Specified by:
drawTextDecorationin interfaceOutputDevice
-
drawDebugOutline
- Specified by:
drawDebugOutlinein interfaceOutputDevice
-
paintCollapsedBorder
public void paintCollapsedBorder(RenderingContext c, BorderPropertySet border, Rectangle bounds, int side) - Specified by:
paintCollapsedBorderin interfaceOutputDevice
-
paintBorder
- Specified by:
paintBorderin interfaceOutputDevice
-
paintBorder
- Specified by:
paintBorderin interfaceOutputDevice
-
getBackgroundImage
-
paintBackground
public void paintBackground(RenderingContext c, CalculatedStyle style, Rectangle bounds, Rectangle bgImageContainer, BorderPropertySet border) - Specified by:
paintBackgroundin interfaceOutputDevice
-
paintBackground
- Specified by:
paintBackgroundin interfaceOutputDevice
-
paintBackground0
private void paintBackground0(RenderingContext c, CalculatedStyle style, Rectangle backgroundBounds, Rectangle bgImageContainer, BorderPropertySet border) -
adjustTo
private int adjustTo(int target, int current, int imageDim) -
paintTiles
-
paintVerticalBand
-
paintHorizontalBand
-
calcOffset
private int calcOffset(CssContext c, CalculatedStyle style, PropertyValue value, float boundsDim, float imageDim) -
scaleBackgroundImage
@CheckReturnValue private FSImage scaleBackgroundImage(CssContext c, CalculatedStyle style, Rectangle backgroundContainer, FSImage image) -
calcBackgroundSizeLength
private int calcBackgroundSizeLength(CssContext c, CalculatedStyle style, PropertyValue value, float boundsDim) -
getFontSpecification
Gets the FontSpecification for this AbstractOutputDevice.- Returns:
- current FontSpecification.
-
setFontSpecification
Sets the FontSpecification for this AbstractOutputDevice.- Parameters:
fs- current FontSpecification.
-