Class TGArcOp

java.lang.Object
  extended by TGArcOp
All Implemented Interfaces:
TGGraphicsOp

public class TGArcOp
extends java.lang.Object
implements TGGraphicsOp

This class implements a TurtleGraphics ARC graphics operation.


Constructor Summary
TGArcOp(TGPoint origin, double radius, double startAng, double arcAng, java.awt.Color color, int penSz)
          Return a TGArcOp object, a TGGraphicsOp, which can be queued for TGCanvas to paint.
TGArcOp(TGPoint origin, double radius, double strtAng, double arcAng, java.awt.Color color, int penSz, float[] penPat)
          Return a TGArcOp object, a TGGraphicsOp, which can be queued for TGCanvas to paint.
 
Method Summary
 java.awt.Rectangle doIt(java.awt.image.BufferedImage inMemoryImage)
          Perform an operation on (do something) with the provided Image and return a Rectangle which is a cliprect for the area of the Image that was changed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TGArcOp

public TGArcOp(TGPoint origin,
               double radius,
               double startAng,
               double arcAng,
               java.awt.Color color,
               int penSz)
Return a TGArcOp object, a TGGraphicsOp, which can be queued for TGCanvas to paint.

Parameters:
origin - center of the arc, a TGPoint
radius - radius of the arc
startAng - Start angle in radians; 0 is along the positive X axis, radians increase counter-clockwise
arcAng - Angular extent of the arc, relative to startAngle, in radians as with startAngle
color - pen color
penSz - pen size, width of the arc

TGArcOp

public TGArcOp(TGPoint origin,
               double radius,
               double strtAng,
               double arcAng,
               java.awt.Color color,
               int penSz,
               float[] penPat)
Return a TGArcOp object, a TGGraphicsOp, which can be queued for TGCanvas to paint.

Parameters:
origin - center/origin of the arc, a TGPoint
radius - radius of the arc
strtAng - Start angle in radians; 0 is along the positive X axis, radians increase counter-clockwise
arcAng - Angular extent of the arc, relative to startAngle, in radians as with startAngle
color - pen color
penSz - pen size, width of the arc
penPat - dashed line pattern. even elements are draw amounts, odd elements are skip amounts
Method Detail

doIt

public java.awt.Rectangle doIt(java.awt.image.BufferedImage inMemoryImage)
Perform an operation on (do something) with the provided Image and return a Rectangle which is a cliprect for the area of the Image that was changed.

Specified by:
doIt in interface TGGraphicsOp
Parameters:
inMemoryImage - the object on which to draw
Returns:
Rectangle bounds of the pixels in the Image that were changed