Package org.xhtmlrenderer.swt
Class SWTOutputDevice
java.lang.Object
org.xhtmlrenderer.render.AbstractOutputDevice
org.xhtmlrenderer.swt.SWTOutputDevice
- All Implemented Interfaces:
OutputDevice
Implementation of
OutputDevice
for SWT.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
clean()
Clean used resources.void
private @Nullable org.eclipse.swt.graphics.Path
convertToPath
(Shape shape) Convert an AWT Shape to an SWT Path.void
void
drawBorderLine
(Shape bounds, int side, int lineWidth, boolean solid) void
protected void
drawLine
(int x1, int y1, int x2, int y2) 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
void
fillOval
(int x, int y, int width, int height) void
fillRect
(int x, int y, int width, int height) @Nullable Shape
getClip()
org.eclipse.swt.graphics.GC
getGC()
@Nullable Object
getRenderingHint
(@NonNull RenderingHints.Key key) boolean
boolean
void
void
void
void
void
void
setRenderingHint
(RenderingHints.Key key, Object value) void
void
translate
(double tx, double ty) Methods inherited from class org.xhtmlrenderer.render.AbstractOutputDevice
drawDebugOutline, drawText, drawTextDecoration, drawTextDecoration, getFontSpecification, paintBackground, paintBackground, paintBorder, paintBorder, paintCollapsedBorder, setFontSpecification
-
Field Details
-
_gc
private final org.eclipse.swt.graphics.GC _gc -
_clippingPath
private org.eclipse.swt.graphics.Path _clippingPath -
_clippingArea
-
_color
private org.eclipse.swt.graphics.Color _color -
_awt_color
-
_transform
private org.eclipse.swt.graphics.Transform _transform -
_stroke
-
-
Constructor Details
-
SWTOutputDevice
public SWTOutputDevice(org.eclipse.swt.graphics.GC gc)
-
-
Method Details
-
getGC
public org.eclipse.swt.graphics.GC getGC()- Returns:
- the Graphical Context associated with this OutputDevice
-
clean
public void clean()Clean used resources. -
clip
-
setClip
-
getClip
-
drawLine
protected void drawLine(int x1, int y1, int x2, int y2) - Specified by:
drawLine
in classAbstractOutputDevice
-
drawBorderLine
-
drawImage
-
drawOval
public void drawOval(int x, int y, int width, int height) -
drawRect
public void drawRect(int x, int y, int width, int height) -
draw
-
fill
-
fillOval
public void fillOval(int x, int y, int width, int height) -
fillRect
public void fillRect(int x, int y, int width, int height) -
paintReplacedElement
-
setColor
-
setFont
-
setColor
-
getStroke
-
setStroke
-
translate
public void translate(double tx, double ty) -
getRenderingHint
-
setRenderingHint
-
convertToPath
Convert an AWT Shape to an SWT Path.- Returns:
- the SWT Path or
null
ifshape == null
-
drawSelection
-
isSupportsSelection
public boolean isSupportsSelection() -
isSupportsCMYKColors
public boolean isSupportsCMYKColors()
-