use of java.awt.geom.Arc2D in project platform_frameworks_base by android.
the class Path_Delegate method arcTo.
/**
* Append the specified arc to the path as a new contour. If the start of
* the path is different from the path's current last point, then an
* automatic lineTo() is added to connect the current contour to the
* start of the arc. However, if the path is empty, then we call moveTo()
* with the first point of the arc. The sweep angle is tread mod 360.
*
* @param left The left of oval defining shape and size of the arc
* @param top The top of oval defining shape and size of the arc
* @param right The right of oval defining shape and size of the arc
* @param bottom The bottom of oval defining shape and size of the arc
* @param startAngle Starting angle (in degrees) where the arc begins
* @param sweepAngle Sweep angle (in degrees) measured clockwise, treated
* mod 360.
* @param forceMoveTo If true, always begin a new contour with the arc
*/
public void arcTo(float left, float top, float right, float bottom, float startAngle, float sweepAngle, boolean forceMoveTo) {
Arc2D arc = new Arc2D.Float(left, top, right - left, bottom - top, -startAngle, -sweepAngle, Arc2D.OPEN);
mPath.append(arc, true);
resetLastPointFromPath();
}
use of java.awt.geom.Arc2D in project scriptographer by scriptographer.
the class AbstractGraphics2D method drawArc.
/**
* Draws the outline of a circular or elliptical arc
* covering the specified rectangle.
* <p>
* The resulting arc begins at <code>startAngle</code> and extends
* for <code>arcAngle</code> degrees, using the current color.
* Angles are interpreted such that 0 degrees
* is at the 3 o'clock position.
* A positive value indicates a counter-clockwise rotation
* while a negative value indicates a clockwise rotation.
* <p>
* The center of the arc is the center of the rectangle whose origin
* is (<i>x</i>, <i>y</i>) and whose size is specified by the
* <code>width</code> and <code>height</code> arguments.
* <p>
* The resulting arc covers an area
* <code>width + 1</code> pixels wide
* by <code>height + 1</code> pixels tall.
* <p>
* The angles are specified relative to the non-square extents of
* the bounding rectangle such that 45 degrees always falls on the
* line from the center of the ellipse to the upper right corner of
* the bounding rectangle. As a result, if the bounding rectangle is
* noticeably longer in one axis than the other, the angles to the
* start and end of the arc segment will be skewed farther along the
* longer axis of the bounds.
* @param x the <i>x</i> coordinate of the
* upper-left corner of the arc to be drawn.
* @param y the <i>y</i> coordinate of the
* upper-left corner of the arc to be drawn.
* @param width the width of the arc to be drawn.
* @param height the height of the arc to be drawn.
* @param startAngle the beginning angle.
* @param arcAngle the angular extent of the arc,
* relative to the start angle.
* @see java.awt.Graphics#fillArc
*/
public void drawArc(int x, int y, int width, int height, int startAngle, int arcAngle) {
Arc2D arc = new Arc2D.Float(x, y, width, height, startAngle, arcAngle, Arc2D.OPEN);
draw(arc);
}
use of java.awt.geom.Arc2D in project scriptographer by scriptographer.
the class AbstractGraphics2D method fillArc.
/**
* Fills a circular or elliptical arc covering the specified rectangle.
* <p>
* The resulting arc begins at <code>startAngle</code> and extends
* for <code>arcAngle</code> degrees.
* Angles are interpreted such that 0 degrees
* is at the 3 o'clock position.
* A positive value indicates a counter-clockwise rotation
* while a negative value indicates a clockwise rotation.
* <p>
* The center of the arc is the center of the rectangle whose origin
* is (<i>x</i>, <i>y</i>) and whose size is specified by the
* <code>width</code> and <code>height</code> arguments.
* <p>
* The resulting arc covers an area
* <code>width + 1</code> pixels wide
* by <code>height + 1</code> pixels tall.
* <p>
* The angles are specified relative to the non-square extents of
* the bounding rectangle such that 45 degrees always falls on the
* line from the center of the ellipse to the upper right corner of
* the bounding rectangle. As a result, if the bounding rectangle is
* noticeably longer in one axis than the other, the angles to the
* start and end of the arc segment will be skewed farther along the
* longer axis of the bounds.
* @param x the <i>x</i> coordinate of the
* upper-left corner of the arc to be filled.
* @param y the <i>y</i> coordinate of the
* upper-left corner of the arc to be filled.
* @param width the width of the arc to be filled.
* @param height the height of the arc to be filled.
* @param startAngle the beginning angle.
* @param arcAngle the angular extent of the arc,
* relative to the start angle.
* @see java.awt.Graphics#drawArc
*/
public void fillArc(int x, int y, int width, int height, int startAngle, int arcAngle) {
Arc2D arc = new Arc2D.Float(x, y, width, height, startAngle, arcAngle, Arc2D.PIE);
fill(arc);
}
use of java.awt.geom.Arc2D in project android_frameworks_base by DirtyUnicorns.
the class Path_Delegate method arcTo.
/**
* Append the specified arc to the path as a new contour. If the start of
* the path is different from the path's current last point, then an
* automatic lineTo() is added to connect the current contour to the
* start of the arc. However, if the path is empty, then we call moveTo()
* with the first point of the arc. The sweep angle is tread mod 360.
*
* @param left The left of oval defining shape and size of the arc
* @param top The top of oval defining shape and size of the arc
* @param right The right of oval defining shape and size of the arc
* @param bottom The bottom of oval defining shape and size of the arc
* @param startAngle Starting angle (in degrees) where the arc begins
* @param sweepAngle Sweep angle (in degrees) measured clockwise, treated
* mod 360.
* @param forceMoveTo If true, always begin a new contour with the arc
*/
public void arcTo(float left, float top, float right, float bottom, float startAngle, float sweepAngle, boolean forceMoveTo) {
Arc2D arc = new Arc2D.Float(left, top, right - left, bottom - top, -startAngle, -sweepAngle, Arc2D.OPEN);
mPath.append(arc, true);
resetLastPointFromPath();
}
use of java.awt.geom.Arc2D in project android_frameworks_base by ResurrectionRemix.
the class Path_Delegate method arcTo.
/**
* Append the specified arc to the path as a new contour. If the start of
* the path is different from the path's current last point, then an
* automatic lineTo() is added to connect the current contour to the
* start of the arc. However, if the path is empty, then we call moveTo()
* with the first point of the arc. The sweep angle is tread mod 360.
*
* @param left The left of oval defining shape and size of the arc
* @param top The top of oval defining shape and size of the arc
* @param right The right of oval defining shape and size of the arc
* @param bottom The bottom of oval defining shape and size of the arc
* @param startAngle Starting angle (in degrees) where the arc begins
* @param sweepAngle Sweep angle (in degrees) measured clockwise, treated
* mod 360.
* @param forceMoveTo If true, always begin a new contour with the arc
*/
public void arcTo(float left, float top, float right, float bottom, float startAngle, float sweepAngle, boolean forceMoveTo) {
Arc2D arc = new Arc2D.Float(left, top, right - left, bottom - top, -startAngle, -sweepAngle, Arc2D.OPEN);
mPath.append(arc, true);
resetLastPointFromPath();
}
Aggregations