Search in sources :

Example 21 with Path

use of android.graphics.Path in project android_frameworks_base by ParanoidAndroid.

the class PieMenu method makeSlice.

private Path makeSlice(float start, float end, int outer, int inner, Point center, float narrow, boolean bothEnds) {
    RectF bb = new RectF(center.x - outer, center.y - outer, center.x + outer, center.y + outer);
    RectF bbi = new RectF(center.x - inner, center.y - inner, center.x + inner, center.y + inner);
    Path path = new Path();
    path.arcTo(bb, start, end - start, true);
    path.arcTo(bbi, end + narrow, start - end - (bothEnds ? narrow : narrow * 2));
    path.close();
    return path;
}
Also used : RectF(android.graphics.RectF) Path(android.graphics.Path)

Example 22 with Path

use of android.graphics.Path in project android_frameworks_base by ParanoidAndroid.

the class TextOnPathActivity method makeStraightPath.

private static Path makeStraightPath() {
    Path path = new Path();
    buildStraightPath(path);
    return path;
}
Also used : Path(android.graphics.Path)

Example 23 with Path

use of android.graphics.Path in project android_frameworks_base by ParanoidAndroid.

the class TextOnPathActivity method makePath.

private static Path makePath() {
    Path path = new Path();
    buildPath(path);
    return path;
}
Also used : Path(android.graphics.Path)

Example 24 with Path

use of android.graphics.Path in project android_frameworks_base by ParanoidAndroid.

the class PathsCacheActivity method makeLargePath.

private static Path makeLargePath() {
    Path path = new Path();
    buildLargePath(path);
    return path;
}
Also used : Path(android.graphics.Path)

Example 25 with Path

use of android.graphics.Path in project android_frameworks_base by ParanoidAndroid.

the class Gesture method toPath.

public Path toPath(Path path) {
    if (path == null)
        path = new Path();
    final ArrayList<GestureStroke> strokes = mStrokes;
    final int count = strokes.size();
    for (int i = 0; i < count; i++) {
        path.addPath(strokes.get(i).getPath());
    }
    return path;
}
Also used : Path(android.graphics.Path) Paint(android.graphics.Paint)

Aggregations

Path (android.graphics.Path)1012 Paint (android.graphics.Paint)462 RectF (android.graphics.RectF)289 Matrix (android.graphics.Matrix)74 Rect (android.graphics.Rect)59 Canvas (android.graphics.Canvas)53 TextPaint (android.text.TextPaint)37 Bitmap (android.graphics.Bitmap)36 PointF (android.graphics.PointF)29 Point (android.graphics.Point)28 LinearGradient (android.graphics.LinearGradient)24 View (android.view.View)24 ObjectAnimator (android.animation.ObjectAnimator)23 Stack (java.util.Stack)22 Animator (android.animation.Animator)18 PathMeasure (android.graphics.PathMeasure)18 RadialGradient (android.graphics.RadialGradient)17 Test (org.junit.Test)15 AnimatorListenerAdapter (android.animation.AnimatorListenerAdapter)14 DashPathEffect (android.graphics.DashPathEffect)14