Path

Class of android.graphics · Path.java · Android's reference

public class Path

A geometric path: verbs (move, line, quad, cubic, close) and their points. Arcs, ovals and round rectangles are made of cubic Beziers of at most 90 degrees each. The display list carries the verbs and points; the renderer flattens the curves for the transform they are drawn with.

Nested types

Page 1 2

Fields

public static final byte MOVE = 0 source
public static final byte LINE = 1 source
public static final byte QUAD = 2 source
public static final byte CUBIC = 3 source
public static final byte CLOSE = 4 source

Constructors

public Path() empty body source
public Path(Path src) source

Methods

public int generation() source

A count that changes with each change, so that a cache of a path's flattened form knows it is stale.

public int verbCount() source
public byte[] verbs() source
public float[] points() source
public int pointCount() source
public void reset() source
public void rewind() source
public void set(Path src) source
public boolean isEmpty() source
public boolean isInverseFillType() source
public void toggleInverseFillType() source
public FillType getFillType() source
public void setFillType(FillType ft) source
public boolean isRect(RectF rect) source
public void incReserve(int extraPtCount) source
public boolean isConvex() source

A rough convexity test: a single closed contour that turns one way.

public void moveTo(float x, float y) source
public void rMoveTo(float dx, float dy) source
public void lineTo(float x, float y) source
public void rLineTo(float dx, float dy) source
public void quadTo(float x1, float y1, float x2, float y2) source
public void rQuadTo(float dx1, float dy1, float dx2, float dy2) source
public void conicTo(float x1, float y1, float x2, float y2, float weight) source
public void rConicTo(float dx1, float dy1, float dx2, float dy2, float weight) source
public void cubicTo(float x1, float y1, float x2, float y2, float x3, float y3) source
public void rCubicTo(float x1, float y1, float x2, float y2, float x3, float y3) source
public void close() source
public void arcTo(RectF oval, float startAngle, float sweepAngle, boolean forceMoveTo) source
public void arcTo(RectF oval, float startAngle, float sweepAngle) source
public void arcTo(float left, float top, float right, float bottom, float startAngle, float sweepAngle, boolean forceMoveTo) source
public void addArc(RectF oval, float startAngle, float sweepAngle) source
public void addArc(float left, float top, float right, float bottom, float startAngle, float sweepAngle) source
public void addRect(RectF r, Direction dir) source
public void addRect(float left, float top, float right, float bottom, Direction dir) source
public void addOval(RectF oval, Direction dir) source
public void addOval(float left, float top, float right, float bottom, Direction dir) source
public void addCircle(float x, float y, float radius, Direction dir) source
public void addRoundRect(RectF rect, float rx, float ry, Direction dir) source
public void addRoundRect(float left, float top, float right, float bottom, float rx, float ry, Direction dir) source

Page 1 2


Made from ScarletNX's Sail at 166ad3910f80. The framework is ScarletNX's (GPL-3.0-or-later); the parts that follow the Android Open Source Project's sources (Apache-2.0) say so in their files.