com.ijchart.xychart.util
Class AnchorUtil

java.lang.Object
  extended by com.ijchart.xychart.util.AnchorUtil

public abstract class AnchorUtil
extends java.lang.Object

Title: IJChart

Description: a chart library for the Java(tm) platform.

用于绘制图形选中时的锚点的工具类.

Copyright: Copyright (c) 2013

Company:

Version:
1.0
Author:
zhang feng min,shanghai china. Contract me by email.

Constructor Summary
AnchorUtil()
           
 
Method Summary
static void drawAnchor(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D drawArea, double anchorWidth)
          绘制矩形图形选中时的锚点.
static java.awt.geom.Rectangle2D getAnchorRect(java.awt.geom.Point2D anchorCenterPoint, double anchorWidth)
          根据点的位置,计算绘制锚点的矩形.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnchorUtil

public AnchorUtil()
Method Detail

drawAnchor

public static void drawAnchor(java.awt.Graphics2D g2,
                              java.awt.geom.Rectangle2D drawArea,
                              double anchorWidth)
绘制矩形图形选中时的锚点.

Parameters:
g2 - Graphics2D 图形设备(如屏幕或打印机) (不可为null)
drawArea - Rectangle2D 绘制区域 (不可为null).
anchorWidth - double 锚点的宽度.

getAnchorRect

public static java.awt.geom.Rectangle2D getAnchorRect(java.awt.geom.Point2D anchorCenterPoint,
                                                      double anchorWidth)
根据点的位置,计算绘制锚点的矩形.

Parameters:
anchorCenterPoint - Point2D 锚点的中心位置 (不可为null).
anchorWidth - double 锚点的宽度.
Returns:
Rectangle2D 锚点矩形.