JIDE 3.5.15

com.jidesoft.chart.util
Class GraphicsUtilities

java.lang.Object
  extended by com.jidesoft.chart.util.GraphicsUtilities

public class GraphicsUtilities
extends Object

Copyright (c) Catalysoft Ltd, 2005-2011 All Rights Reserved Created: 17/09/2011 at 16:21


Constructor Summary
GraphicsUtilities()
           
 
Method Summary
static Shape calculateRotatedStringBounds(Graphics2D g, String s, double x, double y, double rotation)
          Calculates a rotated rectangle that contains the string
static Rectangle2D calculateStringBounds(Graphics g, String s, double x, double y)
          Calculates the bounds for an unrotated string using the current font metrics for the Graphics context
static boolean rectangleWithinBounds(Rectangle2D r, Rectangle2D bounds)
          Determines whether a rectangle is completely within the bounds of another rectangle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphicsUtilities

public GraphicsUtilities()
Method Detail

calculateStringBounds

public static Rectangle2D calculateStringBounds(Graphics g,
                                                String s,
                                                double x,
                                                double y)
Calculates the bounds for an unrotated string using the current font metrics for the Graphics context


calculateRotatedStringBounds

public static Shape calculateRotatedStringBounds(Graphics2D g,
                                                 String s,
                                                 double x,
                                                 double y,
                                                 double rotation)
Calculates a rotated rectangle that contains the string


rectangleWithinBounds

public static boolean rectangleWithinBounds(Rectangle2D r,
                                            Rectangle2D bounds)
Determines whether a rectangle is completely within the bounds of another rectangle


JIDE 3.5.15