Class

RemotePathScope

Source set: Android
public class RemotePathScope constructor()

Functions

close

Source set: Android
public fun close()

Closes the current contour.

moveTo

Source set: Android
public fun moveTo(x: RemoteFloat, y: RemoteFloat)

Starts a new contour at position (x, y).

Parameters

x The x coordinate of the start of the new contour
y The y coordinate of the start of the new contour

moveTo

Source set: Android
public fun moveTo(point: RemoteOffset)

Starts a new contour at point.

Parameters

point The start position of the new contour

moveToRelative

Source set: Android
public fun moveToRelative(dx: RemoteFloat, dy: RemoteFloat)

Starts a new contour at the offset (dx, dy) relative to the last path position.

Parameters

dx The x offset of the start of the new contour, relative to the last path position
dy The y offset of the start of the new contour, relative to the last path position

moveToRelative

Source set: Android
public fun moveToRelative(offset: RemoteOffset)

Starts a new contour at offset relative to the last path position.

Parameters

offset The offset of the start of the new contour, relative to the last path position

relativeMoveTo

Source set: Android
public fun relativeMoveTo(dx: RemoteFloat, dy: RemoteFloat)

Starts a new contour at the offset (dx, dy) relative to the last path position.

Parameters

dx The x offset of the start of the new contour, relative to the last path position
dy The y offset of the start of the new contour, relative to the last path position

relativeMoveTo

Source set: Android
public fun relativeMoveTo(offset: RemoteOffset)

Starts a new contour at offset relative to the last path position.

Parameters

offset The offset of the start of the new contour, relative to the last path position

lineTo

Source set: Android
public fun lineTo(x: RemoteFloat, y: RemoteFloat)

Adds a line from the last point to the position (x, y). If no contour has been created by calling moveTo first, the origin of the line is set to (0, 0).

Parameters

x The x coordinate of the end of the line
y The y coordinate of the end of the line

lineTo

Source set: Android
public fun lineTo(point: RemoteOffset)

Adds a line from the last point to point. If no contour has been created by calling moveTo first, the origin of the line is set to (0, 0).

Parameters

point The end position of the line

lineToRelative

Source set: Android
public fun lineToRelative(dx: RemoteFloat, dy: RemoteFloat)

Adds a line from the last point to the offset (dx, dy) relative to the last point. If no contour has been created by calling moveTo first, the origin of the line is set to (0, 0).

Parameters

dx The x offset of the end of the line, relative to the last path position
dy The y offset of the end of the line, relative to the last path position

lineToRelative

Source set: Android
public fun lineToRelative(offset: RemoteOffset)

Adds a line from the last point to offset relative to the last point. If no contour has been created by calling moveTo first, the origin of the line is set to (0, 0).

Parameters

offset The offset of the end of the line, relative to the last path position

relativeLineTo

Source set: Android
public fun relativeLineTo(dx: RemoteFloat, dy: RemoteFloat)

Adds a line from the last point to the offset (dx, dy) relative to the last point. If no contour has been created by calling moveTo first, the origin of the line is set to (0, 0).

Parameters

dx The x offset of the end of the line, relative to the last path position
dy The y offset of the end of the line, relative to the last path position

relativeLineTo

Source set: Android
public fun relativeLineTo(offset: RemoteOffset)

Adds a line from the last point to offset relative to the last point. If no contour has been created by calling moveTo first, the origin of the line is set to (0, 0).

Parameters

offset The offset of the end of the line, relative to the last path position

horizontalLineTo

Source set: Android
public fun horizontalLineTo(x: RemoteFloat)

Adds a horizontal line from the last point to the position (x, oy), where oy is the y coordinate of the last point. If no contour has been created by calling moveTo first, the origin of the line is set to (0, 0).

Parameters

x The x coordinate of the end of the line

horizontalLineToRelative

Source set: Android
public fun horizontalLineToRelative(dx: RemoteFloat)

Adds a horizontal line from the last point to the position (dx + ox, oy), where ox and oy are the x and y coordinates of the last point. If no contour has been created by calling moveTo first, the origin of the line is set to (0, 0).

Parameters

dx The x offset of the end of the line, relative to the last path position

relativeHorizontalTo

Source set: Android
public fun relativeHorizontalTo(dx: RemoteFloat)

Adds a horizontal line from the last point to the position (dx + ox, oy), where ox and oy are the x and y coordinates of the last point. If no contour has been created by calling moveTo first, the origin of the line is set to (0, 0).

Parameters

dx The x offset of the end of the line, relative to the last path position

relativeHorizontalLineTo

Source set: Android
public fun relativeHorizontalLineTo(dx: RemoteFloat)

Adds a horizontal line from the last point to the position (dx + ox, oy), where ox and oy are the x and y coordinates of the last point. If no contour has been created by calling moveTo first, the origin of the line is set to (0, 0).

Parameters

dx The x offset of the end of the line, relative to the last path position

verticalLineTo

Source set: Android
public fun verticalLineTo(y: RemoteFloat)

Adds a vertical line from the last point to the position (ox, y), where ox is the x coordinate of the last point. If no contour has been created by calling moveTo first, the origin of the line is set to (0, 0).

Parameters

y The y coordinate of the end of the line

verticalLineToRelative

Source set: Android
public fun verticalLineToRelative(dy: RemoteFloat)

Adds a vertical line from the last point to the position (ox, dy + oy), where ox and oy are the x and y coordinates of the last point. If no contour has been created by calling moveTo first, the origin of the line is set to (0, 0).

Parameters

dy The y offset of the end of the line, relative to the last path position

relativeVerticalTo

Source set: Android
public fun relativeVerticalTo(dy: RemoteFloat)

Adds a vertical line from the last point to the position (ox, dy + oy), where ox and oy are the x and y coordinates of the last point. If no contour has been created by calling moveTo first, the origin of the line is set to (0, 0).

Parameters

dy The y offset of the end of the line, relative to the last path position

relativeVerticalLineTo

Source set: Android
public fun relativeVerticalLineTo(dy: RemoteFloat)

Adds a vertical line from the last point to the position (ox, dy + oy), where ox and oy are the x and y coordinates of the last point. If no contour has been created by calling moveTo first, the origin of the line is set to (0, 0).

Parameters

dy The y offset of the end of the line, relative to the last path position

curveTo

Source set: Android
public fun curveTo(
        x1: RemoteFloat,
        y1: RemoteFloat,
        x2: RemoteFloat,
        y2: RemoteFloat,
        x3: RemoteFloat,
        y3: RemoteFloat,
    )

Adds a cubic Bézier from the last point to the position (x3, y3), approaching the control points (x1, y1) and (x2, y2). If no contour has been created by calling moveTo first, the origin of the curve is set to (0, 0).

Parameters

x1 The x coordinate of the first control point of the cubic curve
y1 The y coordinate of the first control point of the cubic curve
x2 The x coordinate of the second control point of the cubic curve
y2 The y coordinate of the second control point of the cubic curve
x3 The x coordinate of the end point of the cubic curve
y3 The y coordinate of the end point of the cubic curve

curveTo

Source set: Android
public fun curveTo(control1: RemoteOffset, control2: RemoteOffset, end: RemoteOffset)

Adds a cubic Bézier from the last point to end, approaching the control points control1 and control2. If no contour has been created by calling moveTo first, the origin of the curve is set to (0, 0).

Parameters

control1 The first control point of the cubic curve
control2 The second control point of the cubic curve
end The end point of the cubic curve

cubicTo

Source set: Android
public fun cubicTo(
        x1: RemoteFloat,
        y1: RemoteFloat,
        x2: RemoteFloat,
        y2: RemoteFloat,
        x3: RemoteFloat,
        y3: RemoteFloat,
    )

Adds a cubic Bézier from the last point to the position (x3, y3), approaching the control points (x1, y1) and (x2, y2). If no contour has been created by calling moveTo first, the origin of the curve is set to (0, 0).

Parameters

x1 The x coordinate of the first control point of the cubic curve
y1 The y coordinate of the first control point of the cubic curve
x2 The x coordinate of the second control point of the cubic curve
y2 The y coordinate of the second control point of the cubic curve
x3 The x coordinate of the end point of the cubic curve
y3 The y coordinate of the end point of the cubic curve

cubicTo

Source set: Android
public fun cubicTo(control1: RemoteOffset, control2: RemoteOffset, end: RemoteOffset)

Adds a cubic Bézier from the last point to end, approaching the control points control1 and control2. If no contour has been created by calling moveTo first, the origin of the curve is set to (0, 0).

Parameters

control1 The first control point of the cubic curve
control2 The second control point of the cubic curve
end The end point of the cubic curve

curveToRelative

Source set: Android
public fun curveToRelative(
        dx1: RemoteFloat,
        dy1: RemoteFloat,
        dx2: RemoteFloat,
        dy2: RemoteFloat,
        dx3: RemoteFloat,
        dy3: RemoteFloat,
    )

Adds a cubic Bézier where the control and end points are defined by offsets relative to the last point. If no contour has been created by calling moveTo first, the origin of the curve is set to (0, 0).

Parameters

dx1 The x offset of the first control point of the cubic curve, relative to the last path position
dy1 The y offset of the first control point of the cubic curve, relative to the last path position
dx2 The x offset of the second control point of the cubic curve, relative to the last path position
dy2 The y offset of the second control point of the cubic curve, relative to the last path position
dx3 The x offset of the end point of the cubic curve, relative to the last path position
dy3 The y offset of the end point of the cubic curve, relative to the last path position

curveToRelative

Source set: Android
public fun curveToRelative(
        control1Offset: RemoteOffset,
        control2Offset: RemoteOffset,
        endOffset: RemoteOffset,
    )

Adds a cubic Bézier from the last point to endOffset relative to the last point, approaching control points control1Offset and control2Offset relative to the last point.

Parameters

control1Offset The offset of the first control point, relative to the last path position
control2Offset The offset of the second control point, relative to the last path position
endOffset The offset of the end point, relative to the last path position

relativeCurveTo

Source set: Android
public fun relativeCurveTo(
        dx1: RemoteFloat,
        dy1: RemoteFloat,
        dx2: RemoteFloat,
        dy2: RemoteFloat,
        dx3: RemoteFloat,
        dy3: RemoteFloat,
    )

Adds a cubic Bézier where the control and end points are defined by offsets relative to the last point. If no contour has been created by calling moveTo first, the origin of the curve is set to (0, 0).

Parameters

dx1 The x offset of the first control point of the cubic curve, relative to the last path position
dy1 The y offset of the first control point of the cubic curve, relative to the last path position
dx2 The x offset of the second control point of the cubic curve, relative to the last path position
dy2 The y offset of the second control point of the cubic curve, relative to the last path position
dx3 The x offset of the end point of the cubic curve, relative to the last path position
dy3 The y offset of the end point of the cubic curve, relative to the last path position

relativeCurveTo

Source set: Android
public fun relativeCurveTo(
        control1Offset: RemoteOffset,
        control2Offset: RemoteOffset,
        endOffset: RemoteOffset,
    )

Adds a cubic Bézier from the last point to endOffset relative to the last point, approaching control points control1Offset and control2Offset relative to the last path position.

Parameters

control1Offset The offset of the first control point, relative to the last path position
control2Offset The offset of the second control point, relative to the last path position
endOffset The offset of the end point, relative to the last path position

relativeCubicTo

Source set: Android
public fun relativeCubicTo(
        dx1: RemoteFloat,
        dy1: RemoteFloat,
        dx2: RemoteFloat,
        dy2: RemoteFloat,
        dx3: RemoteFloat,
        dy3: RemoteFloat,
    )

Adds a cubic Bézier where the control and end points are defined by offsets relative to the last point. If no contour has been created by calling moveTo first, the origin of the curve is set to (0, 0).

Parameters

dx1 The x offset of the first control point of the cubic curve, relative to the last path position
dy1 The y offset of the first control point of the cubic curve, relative to the last path position
dx2 The x offset of the second control point of the cubic curve, relative to the last path position
dy2 The y offset of the second control point of the cubic curve, relative to the last path position
dx3 The x offset of the end point of the cubic curve, relative to the last path position
dy3 The y offset of the end point of the cubic curve, relative to the last path position

relativeCubicTo

Source set: Android
public fun relativeCubicTo(
        control1Offset: RemoteOffset,
        control2Offset: RemoteOffset,
        endOffset: RemoteOffset,
    )

Adds a cubic Bézier from the last point to endOffset relative to the last point, approaching control points control1Offset and control2Offset relative to the last path position.

Parameters

control1Offset The offset of the first control point, relative to the last path position
control2Offset The offset of the second control point, relative to the last path position
endOffset The offset of the end point, relative to the last path position

reflectiveCurveTo

Source set: Android
public fun reflectiveCurveTo(
        x1: RemoteFloat,
        y1: RemoteFloat,
        x2: RemoteFloat,
        y2: RemoteFloat,
    )

Adds a cubic Bézier from the last point to the position (x2, y2). The first control point is the reflection of the second control point of the previous command. If there is no previous command or the previous command is not a cubic Bézier, the first control point is set to the last path position. The second control point is defined by (x1, y1). If no contour has been created by calling moveTo first, the origin of the curve is set to (0, 0).

Parameters

x1 The x coordinate of the second control point of the cubic curve
y1 The y coordinate of the second control point of the cubic curve
x2 The x coordinate of the end point of the cubic curve
y2 The y coordinate of the end point of the cubic curve

reflectiveCurveToRelative

Source set: Android
public fun reflectiveCurveToRelative(
        dx1: RemoteFloat,
        dy1: RemoteFloat,
        dx2: RemoteFloat,
        dy2: RemoteFloat,
    )

Adds a cubic Bézier where the second control point and end points are defined by offsets relative to the last point. If no contour has been created by calling moveTo first, the origin of the curve is set to (0, 0). The reflective nature of the curve is described in reflectiveCurveTo.

Parameters

dx1 The x offset of the second control point of the cubic curve, relative to the last path position
dy1 The y offset of the second control point of the cubic curve, relative to the last path position
dx2 The x offset of the end point of the cubic curve, relative to the last path position
dy2 The y offset of the end point of the cubic curve, relative to the last path position

relativeReflectiveCurveTo

Source set: Android
public fun relativeReflectiveCurveTo(
        dx1: RemoteFloat,
        dy1: RemoteFloat,
        dx2: RemoteFloat,
        dy2: RemoteFloat,
    )

Adds a cubic Bézier where the second control point and end points are defined by offsets relative to the last point. If no contour has been created by calling moveTo first, the origin of the curve is set to (0, 0). The reflective nature of the curve is described in reflectiveCurveTo.

Parameters

dx1 The x offset of the second control point of the cubic curve, relative to the last path position
dy1 The y offset of the second control point of the cubic curve, relative to the last path position
dx2 The x offset of the end point of the cubic curve, relative to the last path position
dy2 The y offset of the end point of the cubic curve, relative to the last path position

quadTo

Source set: Android
public fun quadTo(x1: RemoteFloat, y1: RemoteFloat, x2: RemoteFloat, y2: RemoteFloat)

Adds a quadratic Bézier from the last point to the position (x2, y2), approaching the control point (x1, y1). If no contour has been created by calling moveTo first, the origin of the curve is set to (0, 0).

Parameters

x1 The x coordinate of the control point of the quadratic curve
y1 The y coordinate of the control point of the quadratic curve
x2 The x coordinate of the end point of the quadratic curve
y2 The y coordinate of the end point of the quadratic curve

quadraticTo

Source set: Android
public fun quadraticTo(x1: RemoteFloat, y1: RemoteFloat, x2: RemoteFloat, y2: RemoteFloat)

Adds a quadratic Bézier from the last point to the position (x2, y2), approaching the control point (x1, y1). If no contour has been created by calling moveTo first, the origin of the curve is set to (0, 0).

Parameters

x1 The x coordinate of the control point of the quadratic curve
y1 The y coordinate of the control point of the quadratic curve
x2 The x coordinate of the end point of the quadratic curve
y2 The y coordinate of the end point of the quadratic curve

quadTo

Source set: Android
public fun quadTo(control: RemoteOffset, end: RemoteOffset)

Adds a quadratic Bézier from the last point to end, approaching control point control. If no contour has been created by calling moveTo first, the origin of the curve is set to (0, 0).

Parameters

control The control point of the quadratic curve
end The end point of the quadratic curve

quadraticTo

Source set: Android
public fun quadraticTo(control: RemoteOffset, end: RemoteOffset)

Adds a quadratic Bézier from the last point to end, approaching control point control. If no contour has been created by calling moveTo first, the origin of the curve is set to (0, 0).

Parameters

control The control point of the quadratic curve
end The end point of the quadratic curve

quadToRelative

Source set: Android
public fun quadToRelative(
        dx1: RemoteFloat,
        dy1: RemoteFloat,
        dx2: RemoteFloat,
        dy2: RemoteFloat,
    )

Adds a quadratic Bézier where the control point and end point of the curve are defined by offsets relative to the last point. If no contour has been created by calling moveTo first, the origin of the curve is set to (0, 0).

Parameters

dx1 The x offset of the control point of the quadratic curve, relative to the last path position
dy1 The y offset of the control point of the quadratic curve, relative to the last path position
dx2 The x offset of the end point of the quadratic curve, relative to the last path position
dy2 The y offset of the end point of the quadratic curve, relative to the last path position

relativeQuadTo

Source set: Android
public fun relativeQuadTo(
        dx1: RemoteFloat,
        dy1: RemoteFloat,
        dx2: RemoteFloat,
        dy2: RemoteFloat,
    )

Adds a quadratic Bézier where the control point and end point of the curve are defined by offsets relative to the last point. If no contour has been created by calling moveTo first, the origin of the curve is set to (0, 0).

Parameters

dx1 The x offset of the control point of the quadratic curve, relative to the last path position
dy1 The y offset of the control point of the quadratic curve, relative to the last path position
dx2 The x offset of the end point of the quadratic curve, relative to the last path position
dy2 The y offset of the end point of the quadratic curve, relative to the last path position

relativeQuadraticTo

Source set: Android
public fun relativeQuadraticTo(
        dx1: RemoteFloat,
        dy1: RemoteFloat,
        dx2: RemoteFloat,
        dy2: RemoteFloat,
    )

Adds a quadratic Bézier where the control point and end point of the curve are defined by offsets relative to the last point. If no contour has been created by calling moveTo first, the origin of the curve is set to (0, 0).

Parameters

dx1 The x offset of the control point of the quadratic curve, relative to the last path position
dy1 The y offset of the control point of the quadratic curve, relative to the last path position
dx2 The x offset of the end point of the quadratic curve, relative to the last path position
dy2 The y offset of the end point of the quadratic curve, relative to the last path position

quadToRelative

Source set: Android
public fun quadToRelative(controlOffset: RemoteOffset, endOffset: RemoteOffset)

Adds a quadratic Bézier from the last point to endOffset relative to the last point, approaching control point controlOffset relative to the last point.

Parameters

controlOffset The offset of the control point, relative to the last path position
endOffset The offset of the end point, relative to the last path position

relativeQuadTo

Source set: Android
public fun relativeQuadTo(controlOffset: RemoteOffset, endOffset: RemoteOffset)

Adds a quadratic Bézier from the last point to endOffset relative to the last point, approaching control point controlOffset relative to the last point.

Parameters

controlOffset The offset of the control point, relative to the last path position
endOffset The offset of the end point, relative to the last path position

relativeQuadraticTo

Source set: Android
public fun relativeQuadraticTo(controlOffset: RemoteOffset, endOffset: RemoteOffset)

Adds a quadratic Bézier from the last point to endOffset relative to the last point, approaching control point controlOffset relative to the last point.

Parameters

controlOffset The offset of the control point, relative to the last path position
endOffset The offset of the end point, relative to the last path position

reflectiveQuadTo

Source set: Android
public fun reflectiveQuadTo(x1: RemoteFloat, y1: RemoteFloat)

Adds a quadratic Bézier from the last point to the position (x1, y1). The control point is the reflection of the control point of the previous command. If there is no previous command or the previous command is not a quadratic Bézier, the control point is set to the last path position. If no contour has been created by calling moveTo first, the origin of the curve is set to (0, 0).

Parameters

x1 The x coordinate of the end point of the quadratic curve
y1 The y coordinate of the end point of the quadratic curve

reflectiveQuadToRelative

Source set: Android
public fun reflectiveQuadToRelative(dx1: RemoteFloat, dy1: RemoteFloat)

Adds a quadratic Bézier where the end point is defined by an offset relative to the last point. If no contour has been created by calling moveTo first, the origin of the curve is set to (0, 0). The reflective nature of the curve is described in reflectiveQuadTo.

Parameters

dx1 The x offset of the end point of the quadratic curve, relative to the last path position
dy1 The y offset of the end point of the quadratic curve, relative to the last path position

relativeReflectiveQuadTo

Source set: Android
public fun relativeReflectiveQuadTo(dx1: RemoteFloat, dy1: RemoteFloat)

Adds a quadratic Bézier where the end point is defined by an offset relative to the last point. If no contour has been created by calling moveTo first, the origin of the curve is set to (0, 0). The reflective nature of the curve is described in reflectiveQuadTo.

Parameters

dx1 The x offset of the end point of the quadratic curve, relative to the last path position
dy1 The y offset of the end point of the quadratic curve, relative to the last path position

conicTo

Source set: Android
public fun conicTo(
        x1: RemoteFloat,
        y1: RemoteFloat,
        x2: RemoteFloat,
        y2: RemoteFloat,
        weight: RemoteFloat,
    )

Adds a conic Bézier from the last point to the position (x2, y2), approaching the control point (x1, y1), with the given weight. If no contour has been created by calling moveTo first, the origin of the curve is set to (0, 0).

Parameters

x1 The x coordinate of the control point of the conic curve
y1 The y coordinate of the control point of the conic curve
x2 The x coordinate of the end point of the conic curve
y2 The y coordinate of the end point of the conic curve
weight The weight of the conic curve

conicTo

Source set: Android
public fun conicTo(control: RemoteOffset, end: RemoteOffset, weight: RemoteFloat)

Adds a conic Bézier from the last point to end, approaching control point control with the given weight. If no contour has been created by calling moveTo first, the origin of the curve is set to (0, 0).

Parameters

control The control point of the conic curve
end The end point of the conic curve
weight The weight of the control point

conicToRelative

Source set: Android
public fun conicToRelative(
        dx1: RemoteFloat,
        dy1: RemoteFloat,
        dx2: RemoteFloat,
        dy2: RemoteFloat,
        weight: RemoteFloat,
    )

Adds a conic Bézier with the given weight where the control point and end point of the curve are defined by offsets relative to the last point. If no contour has been created by calling moveTo first, the origin of the curve is set to (0, 0).

Parameters

dx1 The x offset of the control point of the conic curve, relative to the last path position
dy1 The y offset of the control point of the conic curve, relative to the last path position
dx2 The x offset of the end point of the conic curve, relative to the last path position
dy2 The y offset of the end point of the conic curve, relative to the last path position
weight The weight of the conic curve

relativeConicTo

Source set: Android
public fun relativeConicTo(
        dx1: RemoteFloat,
        dy1: RemoteFloat,
        dx2: RemoteFloat,
        dy2: RemoteFloat,
        weight: RemoteFloat,
    )

Adds a conic Bézier with the given weight where the control point and end point of the curve are defined by offsets relative to the last point. If no contour has been created by calling moveTo first, the origin of the curve is set to (0, 0).

Parameters

dx1 The x offset of the control point of the conic curve, relative to the last path position
dy1 The y offset of the control point of the conic curve, relative to the last path position
dx2 The x offset of the end point of the conic curve, relative to the last path position
dy2 The y offset of the end point of the conic curve, relative to the last path position
weight The weight of the conic curve

conicToRelative

Source set: Android
public fun conicToRelative(
        controlOffset: RemoteOffset,
        endOffset: RemoteOffset,
        weight: RemoteFloat,
    )

Adds a conic Bézier from the last point to endOffset relative to the last point, approaching control point controlOffset relative to the last point with the given weight.

Parameters

controlOffset The offset of the control point, relative to the last path position
endOffset The offset of the end point, relative to the last path position
weight The weight of the control point

relativeConicTo

Source set: Android
public fun relativeConicTo(
        controlOffset: RemoteOffset,
        endOffset: RemoteOffset,
        weight: RemoteFloat,
    )

Adds a conic Bézier from the last point to endOffset relative to the last point, approaching control point controlOffset relative to the last point with the given weight.

Parameters

controlOffset The offset of the control point, relative to the last path position
endOffset The offset of the end point, relative to the last path position
weight The weight of the control point

arcTo

Source set: Android
public fun arcTo(
        horizontalEllipseRadius: RemoteFloat,
        verticalEllipseRadius: RemoteFloat,
        theta: RemoteFloat,
        isMoreThanHalf: RemoteBoolean,
        isPositiveArc: RemoteBoolean,
        x1: RemoteFloat,
        y1: RemoteFloat,
    )

Adds an elliptical arc from the last point to the position (x1, y1). If no contour has been created by calling moveTo first, the origin of the arc is set to (0, 0).

The ellipse is defined by 3 parameters:

  • horizontalEllipseRadius and verticalEllipseRadius to define the size of the ellipse
  • theta to define the orientation (as an X-axis rotation) of the ellipse

In most situations, there are four arc candidates that can be drawn from the origin to (x1, y1). Which of the arcs is used is influenced by isMoreThanHalf and isPositiveArc.

When isMoreThanHalf is set to true, the added arc will be chosen amongst the two candidates that represent an arc sweep greater than or equal to 180 degrees.

When isPositiveArc is set to true, the added arc will be chosen amongst the two candidates with a positive-angle direction (counter-clockwise)

Parameters

horizontalEllipseRadius The horizontal radius of the ellipse
verticalEllipseRadius The vertical radius of the ellipse
theta The rotation of the ellipse around the X-axis, in degrees
isMoreThanHalf Defines whether to use an arc candidate with a sweep greater than or equal to 180 degrees
isPositiveArc Defines whether to use an arc candidate that's counter-clockwise or not
x1 The x coordinate of the end point of the arc
y1 The y coordinate of the end point of the arc

arcToRelative

Source set: Android
public fun arcToRelative(
        a: RemoteFloat,
        b: RemoteFloat,
        theta: RemoteFloat,
        isMoreThanHalf: RemoteBoolean,
        isPositiveArc: RemoteBoolean,
        dx1: RemoteFloat,
        dy1: RemoteFloat,
    )

Adds an elliptical arc where the end point is defined by an offset relative to the last point. If no contour has been created by calling moveTo first, the origin of the arc is set to (0, 0).

The ellipse is defined by 3 parameters:

  • a and b to define the size of the ellipse
  • theta to define the orientation (as an X-axis rotation) of the ellipse

In most situations, there are four arc candidates that can be drawn from the origin to the end point. Which of the arcs is used is influenced by isMoreThanHalf and isPositiveArc.

When isMoreThanHalf is set to true, the added arc will be chosen amongst the two candidates that represent an arc sweep greater than or equal to 180 degrees.

When isPositiveArc is set to true, the added arc will be chosen amongst the two candidates with a positive-angle direction (counter-clockwise)

Parameters

a The horizontal radius of the ellipse
b The vertical radius of the ellipse
theta The rotation of the ellipse around the X-axis, in degrees
isMoreThanHalf Defines whether to use an arc candidate with a sweep greater than or equal to 180 degrees
isPositiveArc Defines whether to use an arc candidate that's counter-clockwise or not
dx1 The x offset of the end point of the arc, relative to the last path position
dy1 The y offset of the end point of the arc, relative to the last path position

relativeArcTo

Source set: Android
public fun relativeArcTo(
        a: RemoteFloat,
        b: RemoteFloat,
        theta: RemoteFloat,
        isMoreThanHalf: RemoteBoolean,
        isPositiveArc: RemoteBoolean,
        dx1: RemoteFloat,
        dy1: RemoteFloat,
    )

Adds an elliptical arc where the end point is defined by an offset relative to the last point. If no contour has been created by calling moveTo first, the origin of the arc is set to (0, 0).

The ellipse is defined by 3 parameters:

  • a and b to define the size of the ellipse
  • theta to define the orientation (as an X-axis rotation) of the ellipse

In most situations, there are four arc candidates that can be drawn from the origin to the end point. Which of the arcs is used is influenced by isMoreThanHalf and isPositiveArc.

When isMoreThanHalf is set to true, the added arc will be chosen amongst the two candidates that represent an arc sweep greater than or equal to 180 degrees.

When isPositiveArc is set to true, the added arc will be chosen amongst the two candidates with a positive-angle direction (counter-clockwise)

Parameters

a The horizontal radius of the ellipse
b The vertical radius of the ellipse
theta The rotation of the ellipse around the X-axis, in degrees
isMoreThanHalf Defines whether to use an arc candidate with a sweep greater than or equal to 180 degrees
isPositiveArc Defines whether to use an arc candidate that's counter-clockwise or not
dx1 The x offset of the end point of the arc, relative to the last path position
dy1 The y offset of the end point of the arc, relative to the last path position

arcTo

Source set: Android
public fun arcTo(
        left: RemoteFloat,
        top: RemoteFloat,
        right: RemoteFloat,
        bottom: RemoteFloat,
        startAngle: RemoteFloat,
        sweepAngle: RemoteFloat,
        forceMoveTo: Boolean = false,
    )

Adds an elliptical arc to the path.

Parameters

left The left bound of the oval defining the shape of the arc
top The top bound of the oval defining the shape of the arc
right The right bound of the oval defining the shape of the arc
bottom The bottom bound of the oval defining the shape of the arc
startAngle Starting angle (in degrees) where the arc begins
sweepAngle Sweep angle (in degrees) measured clockwise
forceMoveTo If true, always begin a new contour with the arc

addArc

Source set: Android
public fun addArc(
        left: RemoteFloat,
        top: RemoteFloat,
        right: RemoteFloat,
        bottom: RemoteFloat,
        startAngle: RemoteFloat,
        sweepAngle: RemoteFloat,
    )

Adds a new subpath with an arc that occupies the given rectangle bounds.

Parameters

left The left bound of the oval defining the shape of the arc
top The top bound of the oval defining the shape of the arc
right The right bound of the oval defining the shape of the arc
bottom The bottom bound of the oval defining the shape of the arc
startAngle Starting angle (in degrees) where the arc begins
sweepAngle Sweep angle (in degrees) measured clockwise

arcTo

Source set: Android
public fun arcTo(
        topLeft: RemoteOffset,
        size: RemoteSize,
        startAngle: RemoteFloat,
        sweepAngle: RemoteFloat,
        forceMoveTo: Boolean = false,
    )

Adds an elliptical arc to the path.

Parameters

topLeft The top-left corner of the bounding oval
size The size of the bounding oval
startAngle Starting angle (in degrees) where the arc begins
sweepAngle Sweep angle (in degrees) measured clockwise
forceMoveTo If true, always begin a new contour with the arc

addArc

Source set: Android
public fun addArc(
        topLeft: RemoteOffset,
        size: RemoteSize,
        startAngle: RemoteFloat,
        sweepAngle: RemoteFloat,
    )

Adds a new subpath with an arc that occupies the rectangle defined by topLeft and size.

Parameters

topLeft The top-left corner of the bounding rectangle
size The size of the bounding rectangle
startAngle Starting angle (in degrees) where the arc begins
sweepAngle Sweep angle (in degrees) measured clockwise

addArc

Source set: Android
public fun addArc(size: RemoteSize, startAngle: RemoteFloat, sweepAngle: RemoteFloat)

Adds a new subpath with an arc that occupies the rectangle defined by size starting at RemoteOffset.Zero.

Parameters

size The size of the bounding rectangle
startAngle Starting angle (in degrees) where the arc begins
sweepAngle Sweep angle (in degrees) measured clockwise

addRect

Source set: Android
public fun addRect(
        left: RemoteFloat,
        top: RemoteFloat,
        right: RemoteFloat,
        bottom: RemoteFloat,
    )

Adds a new subpath that consists of four lines that outline the given rectangle.

Parameters

left The left bound of the rectangle
top The top bound of the rectangle
right The right bound of the rectangle
bottom The bottom bound of the rectangle

addRect

Source set: Android
public fun addRect(topLeft: RemoteOffset, size: RemoteSize)

Adds a new subpath that consists of four lines that outline the rectangle defined by topLeft and size.

Parameters

topLeft The top-left corner of the rectangle
size The size of the rectangle

addRect

Source set: Android
public fun addRect(size: RemoteSize)

Adds a new subpath that consists of four lines that outline the rectangle defined by size starting at RemoteOffset.Zero.

Parameters

size The size of the rectangle

addOval

Source set: Android
public fun addOval(
        left: RemoteFloat,
        top: RemoteFloat,
        right: RemoteFloat,
        bottom: RemoteFloat,
    )

Adds a new subpath that consists of the ellipse that fills the given rectangle bounds.

Parameters

left The left bound of the oval
top The top bound of the oval
right The right bound of the oval
bottom The bottom bound of the oval

addOval

Source set: Android
public fun addOval(topLeft: RemoteOffset, size: RemoteSize)

Adds a new subpath that consists of the ellipse that fills the rectangle defined by topLeft and size.

Parameters

topLeft The top-left corner of the bounding rectangle
size The size of the bounding rectangle

addOval

Source set: Android
public fun addOval(size: RemoteSize)

Adds a new subpath that consists of the ellipse that fills the rectangle defined by size starting at RemoteOffset.Zero.

Parameters

size The size of the bounding rectangle

addCircle

Source set: Android
public fun addCircle(center: RemoteOffset, radius: RemoteFloat)

Adds a new circular subpath centered at center with the given radius.

Parameters

center The center of the circle
radius The radius of the circle

addCircle

Source set: Android
public fun addCircle(centerX: RemoteFloat, centerY: RemoteFloat, radius: RemoteFloat)

Adds a new circular subpath centered at (centerX, centerY) with the given radius.

Parameters

centerX The x coordinate of the center of the circle
centerY The y coordinate of the center of the circle
radius The radius of the circle

addRoundRect

Source set: Android
public fun addRoundRect(
        left: RemoteFloat,
        top: RemoteFloat,
        right: RemoteFloat,
        bottom: RemoteFloat,
        radiusX: RemoteFloat,
        radiusY: RemoteFloat = radiusX,
    )

Adds a new rounded rectangle subpath to the path.

Parameters

left The left bound of the rounded rectangle
top The top bound of the rounded rectangle
right The right bound of the rounded rectangle
bottom The bottom bound of the rounded rectangle
radiusX The horizontal radius of the rounded corners
radiusY The vertical radius of the rounded corners

addRoundRect

Source set: Android
public fun addRoundRect(topLeft: RemoteOffset, size: RemoteSize, cornerRadius: RemoteOffset)

Adds a new rounded rectangle subpath to the path defined by topLeft and size.

Parameters

topLeft The top-left corner of the rounded rectangle
size The size of the rounded rectangle
cornerRadius The corner radii as a RemoteOffset (x = horizontal radius, y = vertical radius)

addRoundRect

Source set: Android
public fun addRoundRect(size: RemoteSize, cornerRadius: RemoteOffset)

Adds a new rounded rectangle subpath to the path defined by size starting at RemoteOffset.Zero.

Parameters

size The size of the rounded rectangle
cornerRadius The corner radii as a RemoteOffset (x = horizontal radius, y = vertical radius)

addRoundRect

Source set: Android
public fun addRoundRect(
        topLeft: RemoteOffset,
        size: RemoteSize,
        radiusX: RemoteFloat,
        radiusY: RemoteFloat = radiusX,
    )

Adds a new rounded rectangle subpath to the path defined by topLeft and size.

Parameters

topLeft The top-left corner of the rounded rectangle
size The size of the rounded rectangle
radiusX The horizontal radius of the rounded corners
radiusY The vertical radius of the rounded corners

addRoundRect

Source set: Android
public fun addRoundRect(
        size: RemoteSize,
        radiusX: RemoteFloat,
        radiusY: RemoteFloat = radiusX,
    )

Adds a new rounded rectangle subpath to the path defined by size starting at RemoteOffset.Zero.

Parameters

size The size of the rounded rectangle
radiusX The horizontal radius of the rounded corners
radiusY The vertical radius of the rounded corners

addPath

Source set: Android
public fun addPath(path: RemotePathScope)

Adds the nodes from another RemotePathScope to this path.

Parameters

path The RemotePathScope whose nodes should be added

Content updated: