com.ijchart.xychart.util
Class GraphicsUtil

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

public abstract class GraphicsUtil
extends java.lang.Object

Title: IJChart

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

Nice static helpers for working with Graphics2D.

Copyright: Copyright (c) 2013

Company:

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

Constructor Summary
GraphicsUtil()
           
 
Method Summary
static java.awt.Shape translateShapeByPath(java.awt.Shape shape, float translateX, float translateY)
           Move the shape's coordinate to (-translateX, -translateY).
static java.awt.Shape translateShapeByTransform(java.awt.Shape shape, float translateX, float translateY)
           Move the shape's coordinate to (-translateX, -translateY).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphicsUtil

public GraphicsUtil()
Method Detail

translateShapeByPath

public static java.awt.Shape translateShapeByPath(java.awt.Shape shape,
                                                  float translateX,
                                                  float translateY)
Move the shape's coordinate to (-translateX, -translateY).

Parameters:
shape - Shape The shape which need move coordinate.
translateX - The new x-coordinate of origin.
translateY - The new y-coordinate of origin.
Returns:
Shape The new shape.

translateShapeByTransform

public static java.awt.Shape translateShapeByTransform(java.awt.Shape shape,
                                                       float translateX,
                                                       float translateY)
Move the shape's coordinate to (-translateX, -translateY).

Parameters:
shape - Shape The shape which need move coordinate.
translateX - The new x-coordinate of origin.
translateY - The new y-coordinate of origin.
Returns:
Shape The new shape.