public class Utilities
extends java.lang.Object
Chart
.Constructor and Description |
---|
Utilities() |
Modifier and Type | Method and Description |
---|---|
static android.graphics.PointF |
calcCircumferenceCoord(android.graphics.PointF center,
float radius,
float angleDegrees)
Calculates the coordinate of the point that lies at the specified angle at the
circumference defined by the specified center and radius.
|
static android.graphics.RectF |
calcPieBoundingRect(float maxLeftLabelWidth,
float maxRightLabelWidth,
float leftLabelAngle,
float rightLabelAngle,
float radius)
Calculates the bounding rectangle of a pie with the given radius and
the given biggest right and left label located at the specified angles.
|
static int[] |
shellSort(int[] data)
Sorts the specified array of integers using a shell sort algorithm.
|
static java.util.ArrayList<android.graphics.PointF> |
shellSortByX(java.util.ArrayList<android.graphics.PointF> data)
Sorts the list of specified points according to their X-value.
|
static void |
Union(android.graphics.RectF rect1,
android.graphics.RectF rect2)
Unites the specified rectangles in cartesian units.
|
public static int[] shellSort(int[] data)
data
- The array to sort.public static java.util.ArrayList<android.graphics.PointF> shellSortByX(java.util.ArrayList<android.graphics.PointF> data)
data
- The points to sort.public static android.graphics.PointF calcCircumferenceCoord(android.graphics.PointF center, float radius, float angleDegrees)
center
- The center of the circumference.radius
- The radius of the circumference.angleDegrees
- The angle.public static android.graphics.RectF calcPieBoundingRect(float maxLeftLabelWidth, float maxRightLabelWidth, float leftLabelAngle, float rightLabelAngle, float radius)
maxLeftLabelWidth
- The longest label to the left.maxRightLabelWidth
- The longest label to the right.leftLabelAngle
- The angle of the longest label to the left.rightLabelAngle
- The angle of the longest label to the right.radius
- The radius of the pie.public static void Union(android.graphics.RectF rect1, android.graphics.RectF rect2)
rect1
- The first rectangle to unite.rect2
- The second rectangle to unite.