# Class AbstractTGraphics<Color,Font>

java.lang.Object
com.treemap.crossplatform.AbstractTGraphics<Color,Font>

All Implemented Interfaces:
  `TGraphics<Color,Font>`

Direct Known Subclasses:
  `SwingTGraphics`

public abstract class AbstractTGraphics<Color,Font> extends Object implements TGraphics<Color,Font>

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final float`
  `MINIMUM_FONT_SIZE_TO_DISPLAY`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AbstractTGraphics()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `drawClippedImage(com.macrofocus.igraphics.CPImage img, int x, int y, int w, int h, int width, int height, com.macrofocus.geom.Rectangle bounds, com.macrofocus.geom.Shape shape)`
  `double`
  `findMaxFontSize(com.macrofocus.labeling.EnhancedLabel<Color,Font> elabel, com.macrofocus.igraphics.CPFont<Font> font, double maxWidth)`
  `double`
  `fitTextInsideRectangle(com.macrofocus.labeling.EnhancedLabel<Color,Font> elabel, PreferredSize pf, com.macrofocus.igraphics.CPFont<Font> font, com.macrofocus.geom.Rectangle2D bounds, double scaleFactor, boolean expand)`
  `boolean`
  `hitClip(com.macrofocus.geom.Rectangle bounds)`
  `void`
  `softClip(com.macrofocus.geom.Shape shape)`

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  ### Methods inherited from interface TGraphics

  `clearRect, clip, createImage, drawArc, drawImage, drawImage, drawNativeImage, drawOval, drawPolygon, drawPolyline, fill, fillArc, fillOval, fillPolygon, fillRect, fillRect, fillRoundRect, fillText, fillText, getBackground, getColorFactory, getFont, getIGraphics, getNativeGraphics, getStringWidth, getTransform, isAntialias, isInterpolationBilinear, isPaintingForPrint, isTextAntialias, paintLabel, restore, rotate, rotate, save, scale, setAntialias, setBackground, setColor, setFill, setFont, setGlobalAlpha, setInterpolationBilinear, setLineDash, setLineWidth, setPaint, setPaintingForPrint, setRadialGradient, setStroke, setTextAntialias, setTransform, shear, sizeLabel, stroke, strokeLine, strokeRect, strokeRoundRect, transform, translate, translate`

- ## Field Details

  - ### MINIMUM_FONT_SIZE_TO_DISPLAY

    public static final float MINIMUM_FONT_SIZE_TO_DISPLAY
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### AbstractTGraphics

    public AbstractTGraphics()

- ## Method Details

  - ### fitTextInsideRectangle

    public double fitTextInsideRectangle(com.macrofocus.labeling.EnhancedLabel<Color,Font> elabel, PreferredSize pf, com.macrofocus.igraphics.CPFont<Font> font, com.macrofocus.geom.Rectangle2D bounds, double scaleFactor, boolean expand)
    Specified by:
      `fitTextInsideRectangle` in interface `TGraphics<Color,Font>`

  - ### findMaxFontSize

    public double findMaxFontSize(com.macrofocus.labeling.EnhancedLabel<Color,Font> elabel, com.macrofocus.igraphics.CPFont<Font> font, double maxWidth)
    Specified by:
      `findMaxFontSize` in interface `TGraphics<Color,Font>`

  - ### drawClippedImage

    public boolean drawClippedImage(com.macrofocus.igraphics.CPImage img, int x, int y, int w, int h, int width, int height, com.macrofocus.geom.Rectangle bounds, com.macrofocus.geom.Shape shape)
    Specified by:
      `drawClippedImage` in interface `TGraphics<Color,Font>`

  - ### softClip

    public void softClip(com.macrofocus.geom.Shape shape)
    Specified by:
      `softClip` in interface `TGraphics<Color,Font>`

  - ### hitClip

    public boolean hitClip(com.macrofocus.geom.Rectangle bounds)
    Specified by:
      `hitClip` in interface `TGraphics<Color,Font>`