Package com.treemap.tagcloud
Class RectangularTextShape
- java.lang.Object
-
- com.treemap.tagcloud.RectangularTextShape
-
-
Constructor Summary
Constructors Constructor Description RectangularTextShape(com.macrofocus.igraphics.CPFont font, java.lang.String text, com.macrofocus.geom.Rectangle2D shape)RectangularTextShape(com.macrofocus.igraphics.IHeadless headless, com.macrofocus.igraphics.CPFont font, java.lang.String text)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontains(com.macrofocus.geom.Point2D point)com.macrofocus.geom.ShapecreateTransformedShape(com.macrofocus.geom.AffineTransform at)com.macrofocus.geom.Rectangle2DgetBounds2D()com.macrofocus.geom.PathIteratorgetFlattenPathIterator(double flatness)com.macrofocus.igraphics.CPFontgetFont()com.macrofocus.geom.PathIteratorgetPathIterator()com.macrofocus.geom.PathIteratorgetPathIterator(com.macrofocus.geom.AffineTransform at)java.lang.StringgetText()booleanintersects(com.macrofocus.geom.Rectangle2D r)static booleanisOrthogonal(com.macrofocus.geom.AffineTransform at)Return true if the given transform maps a rectangle to a rectangle.booleanisTextOutline()static com.macrofocus.geom.Rectangle2DtransformBounds(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.
-
-
-
Constructor Detail
-
RectangularTextShape
public RectangularTextShape(com.macrofocus.igraphics.IHeadless headless, com.macrofocus.igraphics.CPFont font, java.lang.String text)
-
RectangularTextShape
public RectangularTextShape(com.macrofocus.igraphics.CPFont font, java.lang.String text, com.macrofocus.geom.Rectangle2D shape)
-
-
Method Detail
-
getFont
public com.macrofocus.igraphics.CPFont getFont()
-
isTextOutline
public boolean isTextOutline()
- Specified by:
isTextOutlinein interfaceTextShape
-
getBounds2D
public com.macrofocus.geom.Rectangle2D getBounds2D()
- Specified by:
getBounds2Din interfacecom.macrofocus.geom.Shape
-
intersects
public boolean intersects(com.macrofocus.geom.Rectangle2D r)
- Specified by:
intersectsin interfacecom.macrofocus.geom.Shape
-
contains
public boolean contains(com.macrofocus.geom.Point2D point)
- Specified by:
containsin interfacecom.macrofocus.geom.Shape
-
getPathIterator
public com.macrofocus.geom.PathIterator getPathIterator()
- Specified by:
getPathIteratorin interfacecom.macrofocus.geom.Shape
-
getPathIterator
public com.macrofocus.geom.PathIterator getPathIterator(com.macrofocus.geom.AffineTransform at)
- Specified by:
getPathIteratorin interfacecom.macrofocus.geom.Shape
-
getFlattenPathIterator
public com.macrofocus.geom.PathIterator getFlattenPathIterator(double flatness)
- Specified by:
getFlattenPathIteratorin interfacecom.macrofocus.geom.Shape
-
createTransformedShape
public final com.macrofocus.geom.Shape createTransformedShape(com.macrofocus.geom.AffineTransform at)
- Specified by:
createTransformedShapein interfaceTextShape
-
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.
-
-