Class ItalicPaintInstruction

java.lang.Object
org.eclipse.nebula.widgets.richtext.painter.instructions.ItalicPaintInstruction
All Implemented Interfaces:
FontMetricsProvider, PaintInstruction

public class ItalicPaintInstruction
extends java.lang.Object
implements PaintInstruction, FontMetricsProvider
PaintInstruction to apply an italic version of the current Font to the GC .
  • Constructor Summary

    Constructors 
    Constructor Description
    ItalicPaintInstruction​(TagProcessingState state)  
  • Method Summary

    Modifier and Type Method 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)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • paint

      public void paint​(org.eclipse.swt.graphics.GC gc, org.eclipse.swt.graphics.Rectangle area)
      Specified by:
      paint in interface PaintInstruction
    • getFontMetrics

      public org.eclipse.swt.graphics.FontMetrics getFontMetrics​(org.eclipse.swt.graphics.GC gc)
      Description copied from interface: FontMetricsProvider
      Calculates the FontMetrics 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.

      Specified by:
      getFontMetrics in interface FontMetricsProvider
      Parameters:
      gc - The GC that should be used to retrieve the FontMetrics
      Returns:
      The FontMetrics based on the font information of this FontMetricsProvider in conjunction with the current set font information set to the given GC.