com.tensegrity.graphics.device
Class DeviceStatistics

java.lang.Object
  extended bycom.tensegrity.graphics.device.DeviceStatistics

public final class DeviceStatistics
extends java.lang.Object

This class gathers statistics for devices.

Version:
$Id: DeviceStatistics.java,v 1.4 2004/02/13 11:27:17 sr Exp $
Author:
Stepan Rutz

Constructor Summary
DeviceStatistics()
          Constructs a new empty DeviceStatistics instance.
 
Method Summary
 void clear()
          Clears all counters.
 void clearRect(int x, int y, int width, int height)
          Record primitive operation: clearRect.
 void drawArc(int x, int y, int width, int height, int startAngle, int arcAngle)
          Record primitive operation: drawArc.
 void drawLine(int x1, int y1, int x2, int y2)
          Record primitive operation: drawLine.
 void drawOval(int x, int y, int width, int height)
          Record primitive operation: drawOval.
 void drawPolygon(int[] ptX, int[] ptY, int ptCount)
          Record primitive operation: drawPolygon.
 void drawPolyline(int[] ptX, int[] ptY, int ptCount)
          Record primitive operation: drawPolyline.
 void drawRect(int x, int y, int width, int height)
          Record primitive operation: drawRect.
 void drawRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)
          Record primitive operation: drawRoundRect.
 void drawString(java.lang.String str, int x, int y)
          Record primitive operation: drawString.
 void dump()
          Dumps the statistics to stderr.
 void fillArc(int x, int y, int width, int height, int startAngle, int arcAngle)
          Record primitive operation: fillArc.
 void fillOval(int x, int y, int width, int height)
          Record primitive operation: fillOval.
 void fillPolygon(int[] xPoints, int[] yPoints, int nPoints)
          Record primitive operation: fillPolygon.
 void fillRect(int x, int y, int width, int height)
          Record primitive operation: fillRect.
 void fillRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)
          Record primitive operation: fillRoundRect.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeviceStatistics

public DeviceStatistics()
Constructs a new empty DeviceStatistics instance.

Method Detail

clear

public void clear()
Clears all counters.


dump

public void dump()
Dumps the statistics to stderr.


drawLine

public void drawLine(int x1,
                     int y1,
                     int x2,
                     int y2)
Record primitive operation: drawLine.

Parameters:
x1 - starting x coordinate.
y1 - starting y coordinate.
x2 - ending x coordinate.
y2 - ending y coordinate.

drawRect

public void drawRect(int x,
                     int y,
                     int width,
                     int height)
Record primitive operation: drawRect.

Parameters:
x - x start coordinate.
y - y start coordinate.
width - width of the rectangle.
height - height of the rectangle.

fillRect

public void fillRect(int x,
                     int y,
                     int width,
                     int height)
Record primitive operation: fillRect.

Parameters:
x - x start coordinate.
y - y start coordinate.
width - width of the rectangle.
height - height of the rectangle.

clearRect

public void clearRect(int x,
                      int y,
                      int width,
                      int height)
Record primitive operation: clearRect.

Parameters:
x - x start coordinate.
y - y start coordinate.
width - width of the rectangle.
height - height of the rectangle.

drawRoundRect

public void drawRoundRect(int x,
                          int y,
                          int width,
                          int height,
                          int arcWidth,
                          int arcHeight)
Record primitive operation: drawRoundRect.

Parameters:
x - x start coordinate.
y - y start coordinate.
width - width of the rectangle.
height - height of the rectangle.
arcWidth - width of the round arc.
arcHeight - height of the round arc.

fillRoundRect

public void fillRoundRect(int x,
                          int y,
                          int width,
                          int height,
                          int arcWidth,
                          int arcHeight)
Record primitive operation: fillRoundRect.

Parameters:
x - x start coordinate.
y - y start coordinate.
width - width of the rectangle.
height - height of the rectangle.
arcWidth - width of the round arc.
arcHeight - height of the round arc.

drawOval

public void drawOval(int x,
                     int y,
                     int width,
                     int height)
Record primitive operation: drawOval.

Parameters:
x - x start coordinate of the enclosing rectangle.
y - y start coordinate of the enclosing rectangle.
width - width of the enclosing rectangle.
height - height of the enclosing rectangle.

fillOval

public void fillOval(int x,
                     int y,
                     int width,
                     int height)
Record primitive operation: fillOval.

Parameters:
x - x start coordinate of the enclosing rectangle.
y - y start coordinate of the enclosing rectangle.
width - width of the enclosing rectangle.
height - height of the enclosing rectangle.

drawArc

public void drawArc(int x,
                    int y,
                    int width,
                    int height,
                    int startAngle,
                    int arcAngle)
Record primitive operation: drawArc.

Parameters:
x - x start coordinate of the enclosing rectangle.
y - y start coordinate of the enclosing rectangle.
width - width of the enclosing rectangle.
height - height of the enclosing rectangle.
startAngle - start angle of the arc in radians.
arcAngle - end angle of the arc in radians.

fillArc

public void fillArc(int x,
                    int y,
                    int width,
                    int height,
                    int startAngle,
                    int arcAngle)
Record primitive operation: fillArc.

Parameters:
x - x start coordinate of the enclosing rectangle.
y - y start coordinate of the enclosing rectangle.
width - width of the enclosing rectangle.
height - height of the enclosing rectangle.
startAngle - start angle of the arc in radians.
arcAngle - end angle of the arc in radians.

drawPolyline

public void drawPolyline(int[] ptX,
                         int[] ptY,
                         int ptCount)
Record primitive operation: drawPolyline.

Parameters:
ptX - array of x coordinates of polygon's vertices.
ptY - array of y coordinates of polygon's vertices.
ptCount - number of vertices.

drawPolygon

public void drawPolygon(int[] ptX,
                        int[] ptY,
                        int ptCount)
Record primitive operation: drawPolygon.

Parameters:
ptX - array of x coordinates of polygon's vertices.
ptY - array of y coordinates of polygon's vertices.
ptCount - number of vertices.

fillPolygon

public void fillPolygon(int[] xPoints,
                        int[] yPoints,
                        int nPoints)
Record primitive operation: fillPolygon.


drawString

public void drawString(java.lang.String str,
                       int x,
                       int y)
Record primitive operation: drawString.

Parameters:
str - string to draw.
x - x coordinate where to draw the string.
y - y coordinate where to draw the string.


Copyright © 2005 Tensegrity Software GmbH. All Rights Reserved. Date of creation: 09.06.2006.