Class RectangularTextShape

java.lang.Object
com.treemap.tagcloud.RectangularTextShape
All Implemented Interfaces:
com.macrofocus.geom.Shape, TextShape

public class RectangularTextShape extends Object implements TextShape
  • Constructor Summary

    Constructors
    Constructor
    Description
    RectangularTextShape(com.macrofocus.igraphics.CPFont font, String text, com.macrofocus.geom.Rectangle2D shape)
     
    RectangularTextShape(com.macrofocus.igraphics.IHeadless headless, com.macrofocus.igraphics.CPFont font, String text)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    contains(com.macrofocus.geom.Point2D point)
     
    final com.macrofocus.geom.Shape
    createTransformedShape(com.macrofocus.geom.AffineTransform at)
     
    com.macrofocus.geom.Rectangle2D
     
    com.macrofocus.geom.PathIterator
    getFlattenPathIterator(double flatness)
     
    com.macrofocus.igraphics.CPFont
     
    com.macrofocus.geom.PathIterator
     
    com.macrofocus.geom.PathIterator
    getPathIterator(com.macrofocus.geom.AffineTransform at)
     
     
    boolean
    intersects(com.macrofocus.geom.Rectangle2D r)
     
    static boolean
    isOrthogonal(com.macrofocus.geom.AffineTransform at)
    Return true if the given transform maps a rectangle to a rectangle.
    boolean
     
    static com.macrofocus.geom.Rectangle2D
    transformBounds(com.macrofocus.geom.Rectangle2D rect, com.macrofocus.geom.AffineTransform at)
    Given a bounding-box rectangle, return a new rectangle by transforming the argument rectangle and taking the bounding box of the result.

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface com.macrofocus.geom.Shape

    getBounds
  • Constructor Details

    • RectangularTextShape

      public RectangularTextShape(com.macrofocus.igraphics.IHeadless headless, com.macrofocus.igraphics.CPFont font, String text)
    • RectangularTextShape

      public RectangularTextShape(com.macrofocus.igraphics.CPFont font, String text, com.macrofocus.geom.Rectangle2D shape)
  • Method Details

    • getText

      public String getText()
      Specified by:
      getText in interface TextShape
    • getFont

      public com.macrofocus.igraphics.CPFont getFont()
      Specified by:
      getFont in interface TextShape
    • isTextOutline

      public boolean isTextOutline()
      Specified by:
      isTextOutline in interface TextShape
    • getBounds2D

      public com.macrofocus.geom.Rectangle2D getBounds2D()
      Specified by:
      getBounds2D in interface com.macrofocus.geom.Shape
    • intersects

      public boolean intersects(com.macrofocus.geom.Rectangle2D r)
      Specified by:
      intersects in interface com.macrofocus.geom.Shape
    • contains

      public boolean contains(com.macrofocus.geom.Point2D point)
      Specified by:
      contains in interface com.macrofocus.geom.Shape
    • getPathIterator

      public com.macrofocus.geom.PathIterator getPathIterator()
      Specified by:
      getPathIterator in interface com.macrofocus.geom.Shape
    • getPathIterator

      public com.macrofocus.geom.PathIterator getPathIterator(com.macrofocus.geom.AffineTransform at)
      Specified by:
      getPathIterator in interface com.macrofocus.geom.Shape
    • getFlattenPathIterator

      public com.macrofocus.geom.PathIterator getFlattenPathIterator(double flatness)
      Specified by:
      getFlattenPathIterator in interface com.macrofocus.geom.Shape
    • createTransformedShape

      public final com.macrofocus.geom.Shape createTransformedShape(com.macrofocus.geom.AffineTransform at)
      Specified by:
      createTransformedShape in interface TextShape
    • transformBounds

      public static com.macrofocus.geom.Rectangle2D transformBounds(com.macrofocus.geom.Rectangle2D rect, com.macrofocus.geom.AffineTransform at)
      Given a bounding-box rectangle, return a new rectangle by transforming the argument rectangle and taking the bounding box of the result. This method optimizes the calculation if the transform is orthogonal. Note that the argument rectangle is not modified, and the transform does not need to be orthogonal.
    • isOrthogonal

      public static boolean isOrthogonal(com.macrofocus.geom.AffineTransform at)
      Return true if the given transform maps a rectangle to a rectangle. If this method returns true, then the transformRectangle and transformRectangularShape methods will operate correctly.