ElegantJCharts Java API Specification v2.0

com.elegantj.graphx
Class Pen

java.lang.Object
  |
  +--com.elegantj.graphx.Pen

public class Pen
extends java.lang.Object

Pen class is used to draw line and rectange with different styles


Field Summary
static int DASH_DISTANCE
          Specifies the constant for dash distance
static int PS_DASH
          Specifies the constant for dash pen style
static int PS_DASHDOT
          Specifies the constant for dash-dot pen style
static int PS_DASHDOTDOT
          Specifies the constant for dash-dot-dot pen style
static int PS_DOT
          Specifies the constant for dot pen style
static int PS_NULL
          Specifies the constant for normal pen style
static int PS_SOLID
          Specifies the constant for solid pen style
 
Constructor Summary
Pen()
           
 
Method Summary
static void drawLine(java.awt.Graphics g, int x1, int y1, int x2, int y2, int style)
          Draws line with specified style
static void drawRect(java.awt.Graphics g, int x, int y, int width, int height, int style)
          Draws rectange with specified style
static boolean hitClip(java.awt.Graphics g, int x, int y, int width, int height, java.awt.Rectangle clipRect)
          Returns true if the specified rectangular area intersects the bounding rectangle of the current clipping area.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PS_NULL

public static final int PS_NULL
Specifies the constant for normal pen style

See Also:
Constant Field Values

PS_SOLID

public static final int PS_SOLID
Specifies the constant for solid pen style

See Also:
Constant Field Values

PS_DASH

public static final int PS_DASH
Specifies the constant for dash pen style

See Also:
Constant Field Values

PS_DOT

public static final int PS_DOT
Specifies the constant for dot pen style

See Also:
Constant Field Values

PS_DASHDOT

public static final int PS_DASHDOT
Specifies the constant for dash-dot pen style

See Also:
Constant Field Values

PS_DASHDOTDOT

public static final int PS_DASHDOTDOT
Specifies the constant for dash-dot-dot pen style

See Also:
Constant Field Values

DASH_DISTANCE

public static final int DASH_DISTANCE
Specifies the constant for dash distance

See Also:
Constant Field Values
Constructor Detail

Pen

public Pen()
Method Detail

drawLine

public static void drawLine(java.awt.Graphics g,
                            int x1,
                            int y1,
                            int x2,
                            int y2,
                            int style)
Draws line with specified style


drawRect

public static void drawRect(java.awt.Graphics g,
                            int x,
                            int y,
                            int width,
                            int height,
                            int style)
Draws rectange with specified style


hitClip

public static boolean hitClip(java.awt.Graphics g,
                              int x,
                              int y,
                              int width,
                              int height,
                              java.awt.Rectangle clipRect)
Returns true if the specified rectangular area intersects the bounding rectangle of the current clipping area. The coordinates in the rectangle are relative to the coordinate system origin of this graphics context.

Parameters:
x - the x coordinate of the rectangle to test against the clip
y - the y coordinate of the rectangle to test against the clip
width - the width of the rectangle to test against the clip
height - the height of the rectangle to test against the clip

ElegantJCharts Java API Specification v2.0

For any feedback, suggestion, or query, please revert back to support@elegantcharts.com

Copyright(c)
Elegant Microweb Technologies Pvt. Ltd.
www.elegantmicroweb.com
www.elegantjcharts.com
All Rights Reserved.