Package org.xhtmlrenderer.swt
Class SWTTextRenderer
- java.lang.Object
-
- org.xhtmlrenderer.swt.SWTTextRenderer
-
- All Implemented Interfaces:
TextRenderer
public class SWTTextRenderer extends Object implements TextRenderer
Render text with SWT.- Author:
- Vianney le Clément
-
-
Constructor Summary
Constructors Constructor Description SWTTextRenderer()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voiddrawGlyphVector(OutputDevice outputDevice, FSGlyphVector vector, float x, float y)voiddrawString(OutputDevice outputDevice, String string, float x, float y)voiddrawString(OutputDevice outputDevice, String string, float x, float y, JustificationInfo info)floatgetFontScale()FSFontMetricsgetFSFontMetrics(FontContext context, FSFont font, String string)RectanglegetGlyphBounds(OutputDevice outputDevice, FSFont font, FSGlyphVector fsGlyphVector, int index, float x, float y)float[]getGlyphPositions(OutputDevice outputDevice, FSFont font, FSGlyphVector fsGlyphVector)FSGlyphVectorgetGlyphVector(OutputDevice outputDevice, FSFont font, String string)intgetSmoothingLevel()intgetWidth(FontContext context, FSFont font, String string)voidsetFontScale(float scale)voidsetSmoothingLevel(int level)Deprecated.voidsetSmoothingThreshold(float fontsize)voidsetup(FontContext context)
-
-
-
Method Detail
-
setup
public void setup(FontContext context)
- Specified by:
setupin interfaceTextRenderer
-
drawString
public void drawString(OutputDevice outputDevice, String string, float x, float y)
- Specified by:
drawStringin interfaceTextRenderer
-
getFSFontMetrics
public FSFontMetrics getFSFontMetrics(FontContext context, FSFont font, String string)
- Specified by:
getFSFontMetricsin interfaceTextRenderer
-
getWidth
public int getWidth(FontContext context, FSFont font, String string)
- Specified by:
getWidthin interfaceTextRenderer
-
getFontScale
public float getFontScale()
- Specified by:
getFontScalein interfaceTextRenderer
-
getSmoothingLevel
public int getSmoothingLevel()
- Specified by:
getSmoothingLevelin interfaceTextRenderer
-
setFontScale
public void setFontScale(float scale)
- Specified by:
setFontScalein interfaceTextRenderer
-
setSmoothingLevel
@Deprecated public void setSmoothingLevel(int level)
Deprecated.- Specified by:
setSmoothingLevelin interfaceTextRenderer
-
setSmoothingThreshold
public void setSmoothingThreshold(float fontsize)
- Specified by:
setSmoothingThresholdin interfaceTextRenderer
-
drawGlyphVector
public void drawGlyphVector(OutputDevice outputDevice, FSGlyphVector vector, float x, float y)
- Specified by:
drawGlyphVectorin interfaceTextRenderer
-
drawString
public void drawString(OutputDevice outputDevice, String string, float x, float y, JustificationInfo info)
- Specified by:
drawStringin interfaceTextRenderer
-
getGlyphBounds
public Rectangle getGlyphBounds(OutputDevice outputDevice, FSFont font, FSGlyphVector fsGlyphVector, int index, float x, float y)
- Specified by:
getGlyphBoundsin interfaceTextRenderer
-
getGlyphPositions
public float[] getGlyphPositions(OutputDevice outputDevice, FSFont font, FSGlyphVector fsGlyphVector)
- Specified by:
getGlyphPositionsin interfaceTextRenderer
-
getGlyphVector
public FSGlyphVector getGlyphVector(OutputDevice outputDevice, FSFont font, String string)
- Specified by:
getGlyphVectorin interfaceTextRenderer
-
-