Interface FontMetricsProvider
-
- All Known Implementing Classes:
BoldPaintInstruction
,ItalicPaintInstruction
,ResetFontPaintInstruction
,ResetSpanStylePaintInstruction
,SpanStylePaintInstruction
public interface FontMetricsProvider
Implementations of this interface typically perform modifications to aFont
and therefore need to be able to supply theFontMetrics
of the font after the modifications are done.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description org.eclipse.swt.graphics.FontMetrics
getFontMetrics(org.eclipse.swt.graphics.GC gc)
Calculates theFontMetrics
based on the font information of thisFontMetricsProvider
in conjunction with the current set font information set to the givenGC
.
-
-
-
Method Detail
-
getFontMetrics
org.eclipse.swt.graphics.FontMetrics getFontMetrics(org.eclipse.swt.graphics.GC gc)
Calculates theFontMetrics
based on the font information of thisFontMetricsProvider
in conjunction with the current set font information set to the givenGC
.Note: To retrieve the
FontMetrics
it is necessary to set theFont
based on the local font information and the current applied font. You should not reset theFont
on theGC
in this method again, because the font information might be used by otherFontMetricsProvider
.- Parameters:
gc
- TheGC
that should be used to retrieve theFontMetrics
- Returns:
- The
FontMetrics
based on the font information of thisFontMetricsProvider
in conjunction with the current set font information set to the givenGC
.
-
-