Java Code Examples for android.graphics.Path#Direction

The following examples show how to use android.graphics.Path#Direction . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Compat.java    From ProjectX with Apache License 2.0 5 votes vote down vote up
@Override
public void addRoundRect(Path path, float left, float top, float right, float bottom,
                         float rx, float ry, Path.Direction dir) {
    final RectF rect = get();
    rect.set(left, top, right, bottom);
    path.addRoundRect(rect, rx, ry, dir);
    put(rect);
}
 
Example 2
Source File: Compat.java    From ProjectX with Apache License 2.0 5 votes vote down vote up
@Override
public void addOval(Path path, float left, float top, float right, float bottom,
                    Path.Direction dir) {
    final RectF oval = get();
    oval.set(left, top, right, bottom);
    path.addOval(oval, dir);
    put(oval);
}
 
Example 3
Source File: Compat.java    From ProjectX with Apache License 2.0 5 votes vote down vote up
@Override
public void addRoundRect(Path path, float left, float top, float right, float bottom,
                         float rx, float ry, Path.Direction dir) {
    final RectF rect = get();
    rect.set(left, top, right, bottom);
    path.addRoundRect(rect, rx, ry, dir);
    put(rect);
}
 
Example 4
Source File: Compat.java    From ProjectX with Apache License 2.0 5 votes vote down vote up
@Override
public void addRoundRect(Path path, float left, float top, float right, float bottom,
                         float[] radii, Path.Direction dir) {
    final RectF rect = get();
    rect.set(left, top, right, bottom);
    path.addRoundRect(rect, radii, dir);
    put(rect);
}
 
Example 5
Source File: Compat.java    From ProjectX with Apache License 2.0 5 votes vote down vote up
@Override
public void addOval(Path path, float left, float top, float right, float bottom,
                    Path.Direction dir) {
    final RectF oval = get();
    oval.set(left, top, right, bottom);
    path.addOval(oval, dir);
    put(oval);
}
 
Example 6
Source File: Compat.java    From ProjectX with Apache License 2.0 4 votes vote down vote up
void addOval(Path path, float left, float top, float right, float bottom,
Path.Direction dir);
 
Example 7
Source File: Compat.java    From ProjectX with Apache License 2.0 4 votes vote down vote up
static void addOval(Path path, float left, float top, float right, float bottom,
                    Path.Direction dir) {
    IMPL.addOval(path, left, top, right, bottom, dir);
}
 
Example 8
Source File: Compat.java    From ProjectX with Apache License 2.0 4 votes vote down vote up
@Override
public void addRoundRect(Path path, float left, float top, float right, float bottom,
                         float rx, float ry, Path.Direction dir) {
    path.addRoundRect(left, top, right, bottom, rx, ry, dir);
}
 
Example 9
Source File: Compat.java    From ProjectX with Apache License 2.0 4 votes vote down vote up
static void addOval(Path path, float left, float top, float right, float bottom,
                    Path.Direction dir) {
    IMPL.addOval(path, left, top, right, bottom, dir);
}
 
Example 10
Source File: Compat.java    From ProjectX with Apache License 2.0 4 votes vote down vote up
@Override
public void addRoundRect(Path path, float left, float top, float right, float bottom,
                         float[] radii, Path.Direction dir) {
    path.addRoundRect(left, top, right, bottom, radii, dir);
}
 
Example 11
Source File: Compat.java    From ProjectX with Apache License 2.0 4 votes vote down vote up
@Override
public void addOval(Path path, float left, float top, float right, float bottom,
                    Path.Direction dir) {
    path.addOval(left, top, right, bottom, dir);
}
 
Example 12
Source File: Compat.java    From ProjectX with Apache License 2.0 4 votes vote down vote up
void addRoundRect(Path path, float left, float top, float right, float bottom,
float[] radii, Path.Direction dir);
 
Example 13
Source File: Compat.java    From ProjectX with Apache License 2.0 4 votes vote down vote up
void addRoundRect(Path path, float left, float top, float right, float bottom,
float rx, float ry, Path.Direction dir);
 
Example 14
Source File: Compat.java    From ProjectX with Apache License 2.0 4 votes vote down vote up
void addOval(Path path, float left, float top, float right, float bottom,
Path.Direction dir);
 
Example 15
Source File: Compat.java    From ProjectX with Apache License 2.0 4 votes vote down vote up
static void addRoundRect(Path path, float left, float top, float right, float bottom,
                         float[] radii, Path.Direction dir) {
    IMPL.addRoundRect(path, left, top, right, bottom, radii, dir);
}
 
Example 16
Source File: Compat.java    From ProjectX with Apache License 2.0 4 votes vote down vote up
static void addRoundRect(Path path, float left, float top, float right, float bottom,
                         float rx, float ry, Path.Direction dir) {
    IMPL.addRoundRect(path, left, top, right, bottom, rx, ry, dir);
}
 
Example 17
Source File: PathDrawable.java    From ProjectX with Apache License 2.0 2 votes vote down vote up
/**
 * Add a closed rectangle contour to the path
 *
 * @param left   The left side of a rectangle to add to the path
 * @param top    The top of a rectangle to add to the path
 * @param right  The right side of a rectangle to add to the path
 * @param bottom The bottom of a rectangle to add to the path
 * @param dir    The direction to wind the rectangle's contour
 */
public void addRect(float left, float top, float right, float bottom, Path.Direction dir) {
    mPath.addRect(left, top, right, bottom, dir);
}
 
Example 18
Source File: PathDrawable.java    From ProjectX with Apache License 2.0 2 votes vote down vote up
/**
 * Add a closed oval contour to the path
 *
 * @param dir The direction to wind the oval's contour
 */
public void addOval(float left, float top, float right, float bottom, Path.Direction dir) {
    Compat.addOval(mPath, left, top, right, bottom, dir);
}
 
Example 19
Source File: PathDrawable.java    From ProjectX with Apache License 2.0 2 votes vote down vote up
/**
 * Add a closed round-rectangle contour to the path
 *
 * @param rx  The x-radius of the rounded corners on the round-rectangle
 * @param ry  The y-radius of the rounded corners on the round-rectangle
 * @param dir The direction to wind the round-rectangle's contour
 */
public void addRoundRect(float left, float top, float right, float bottom, float rx, float ry,
                         Path.Direction dir) {
    Compat.addRoundRect(mPath, left, top, right, bottom, rx, ry, dir);
}
 
Example 20
Source File: PathDrawable.java    From ProjectX with Apache License 2.0 2 votes vote down vote up
/**
 * Add a closed round-rectangle contour to the path. Each corner receives
 * two radius values [X, Y]. The corners are ordered top-left, top-right,
 * bottom-right, bottom-left
 *
 * @param radii Array of 8 values, 4 pairs of [X,Y] radii
 * @param dir   The direction to wind the round-rectangle's contour
 */
public void addRoundRect(float left, float top, float right, float bottom, float[] radii,
                         Path.Direction dir) {
    Compat.addRoundRect(mPath, left, top, right, bottom, radii, dir);
}