Package com.macrofocus.treemap.tagcloud
Class RectangularTextShape
- java.lang.Object
-
- com.macrofocus.treemap.tagcloud.RectangularTextShape
-
-
Constructor Summary
Constructors Constructor Description RectangularTextShape(com.macrofocus.igraphics.CPFont font, java.lang.String text, java.awt.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(double x, double y)booleancontains(double x, double y, double w, double h)booleancontains(java.awt.geom.Point2D p)booleancontains(java.awt.geom.Rectangle2D r)java.awt.ShapecreateTransformedShape(java.awt.geom.AffineTransform at)java.awt.RectanglegetBounds()java.awt.geom.Rectangle2DgetBounds2D()com.macrofocus.igraphics.CPFontgetFont()java.awt.geom.PathIteratorgetPathIterator(java.awt.geom.AffineTransform at)java.awt.geom.PathIteratorgetPathIterator(java.awt.geom.AffineTransform at, double flatness)java.lang.StringgetText()booleanintersects(double x, double y, double w, double h)booleanintersects(java.awt.geom.Rectangle2D r)static booleanisOrthogonal(java.awt.geom.AffineTransform at)Return true if the given transform maps a rectangle to a rectangle.booleanisTextOutline()static java.awt.geom.Rectangle2DtransformBounds(java.awt.geom.Rectangle2D rect, java.awt.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, java.awt.geom.Rectangle2D shape)
-
-
Method Detail
-
getFont
public com.macrofocus.igraphics.CPFont getFont()
-
isTextOutline
public boolean isTextOutline()
- Specified by:
isTextOutlinein interfaceTextShape
-
getBounds
public java.awt.Rectangle getBounds()
- Specified by:
getBoundsin interfacejava.awt.Shape
-
getBounds2D
public java.awt.geom.Rectangle2D getBounds2D()
- Specified by:
getBounds2Din interfacejava.awt.Shape
-
contains
public boolean contains(double x, double y)- Specified by:
containsin interfacejava.awt.Shape
-
contains
public boolean contains(java.awt.geom.Point2D p)
- Specified by:
containsin interfacejava.awt.Shape
-
intersects
public boolean intersects(double x, double y, double w, double h)- Specified by:
intersectsin interfacejava.awt.Shape
-
intersects
public boolean intersects(java.awt.geom.Rectangle2D r)
- Specified by:
intersectsin interfacejava.awt.Shape
-
contains
public boolean contains(double x, double y, double w, double h)- Specified by:
containsin interfacejava.awt.Shape
-
contains
public boolean contains(java.awt.geom.Rectangle2D r)
- Specified by:
containsin interfacejava.awt.Shape
-
getPathIterator
public java.awt.geom.PathIterator getPathIterator(java.awt.geom.AffineTransform at)
- Specified by:
getPathIteratorin interfacejava.awt.Shape
-
getPathIterator
@GwtIncompatible public java.awt.geom.PathIterator getPathIterator(java.awt.geom.AffineTransform at, double flatness)
- Specified by:
getPathIteratorin interfacejava.awt.Shape
-
createTransformedShape
public final java.awt.Shape createTransformedShape(java.awt.geom.AffineTransform at)
- Specified by:
createTransformedShapein interfaceTextShape
-
transformBounds
public static java.awt.geom.Rectangle2D transformBounds(java.awt.geom.Rectangle2D rect, java.awt.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(java.awt.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.
-
-