public class SpanStylePaintInstruction extends java.lang.Object implements PaintInstruction, FontMetricsProvider
PaintInstruction that applies style information to the GC via span tag
attributes.| Constructor and Description |
|---|
SpanStylePaintInstruction(TagProcessingState state) |
| Modifier and Type | Method and Description |
|---|---|
org.eclipse.swt.graphics.FontMetrics |
getFontMetrics(org.eclipse.swt.graphics.GC gc)
Calculates the
FontMetrics based on the font information of this
FontMetricsProvider in conjunction with the current set font information set to the
given GC. |
void |
paint(org.eclipse.swt.graphics.GC gc,
org.eclipse.swt.graphics.Rectangle area) |
void |
setBackgroundColor(org.eclipse.swt.graphics.Color backgroundColor) |
void |
setFontSize(java.lang.Integer fontSize) |
void |
setFontType(java.lang.String fontType) |
void |
setForegroundColor(org.eclipse.swt.graphics.Color foregroundColor) |
public SpanStylePaintInstruction(TagProcessingState state)
public void paint(org.eclipse.swt.graphics.GC gc,
org.eclipse.swt.graphics.Rectangle area)
paint in interface PaintInstructionpublic org.eclipse.swt.graphics.FontMetrics getFontMetrics(org.eclipse.swt.graphics.GC gc)
FontMetricsProviderFontMetrics based on the font information of this
FontMetricsProvider in conjunction with the current set font information set to the
given GC.
Note: To retrieve the FontMetrics it is necessary to set the Font
based on the local font information and the current applied font. You should not reset the
Font on the GC in this method again, because the font information might be
used by other FontMetricsProvider.
getFontMetrics in interface FontMetricsProvidergc - The GC that should be used to retrieve the FontMetricsFontMetrics based on the font information of this
FontMetricsProvider in conjunction with the current set font information set
to the given GC.public void setForegroundColor(org.eclipse.swt.graphics.Color foregroundColor)
public void setBackgroundColor(org.eclipse.swt.graphics.Color backgroundColor)
public void setFontSize(java.lang.Integer fontSize)
public void setFontType(java.lang.String fontType)