本文整理了Java中android.graphics.Path.rLineTo()
方法的一些代码示例,展示了Path.rLineTo()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Path.rLineTo()
方法的具体详情如下:
包路径:android.graphics.Path
类名称:Path
方法名:rLineTo
暂无
代码示例来源:origin: UFreedom/FloatingView
@Override
public FloatingPath getFloatingPath() {
Path path = new Path();
path.rLineTo(-100,0);
path.quadTo(0,-200,100,0);
path.quadTo(0,200,-100,0);
return FloatingPath.create(path, false);
}
代码示例来源:origin: UFreedom/FloatingView
@Override
public FloatingPath getFloatingPath() {
Path path = new Path();
path.moveTo(0, 0);
path.quadTo(100, -300, 0, -600);
path.rLineTo(0, -mScreenHeight - 300);
return FloatingPath.create(path, false);
}
代码示例来源:origin: scwang90/SmartRefreshLayout
p.rLineTo(0, 0);
代码示例来源:origin: tarek360/RichPath
p.rLineTo(0, 0);
代码示例来源:origin: jaredrummler/AnimatedSvgView
p.rLineTo(0, 0);
代码示例来源:origin: seven332/EhViewer
mPath.rLineTo(middleBarSize - middleBarCut * 2, 0);
mPath.rLineTo(arrowWidth, arrowHeight);
mPath.rLineTo(arrowWidth, -arrowHeight);
代码示例来源:origin: facebook/litho
mCornerShadowTopPath.moveTo(shadowHorizontal + mCornerRadius, shadowTop);
mCornerShadowTopPath.arcTo(topInnerBounds, 270f, -90f, true);
mCornerShadowTopPath.rLineTo(-shadowHorizontal, 0);
mCornerShadowTopPath.lineTo(0, mCornerRadius);
mCornerShadowTopPath.arcTo(topOuterBounds, 180f, 90f, true);
mCornerShadowTopPath.lineTo(shadowHorizontal + mCornerRadius, 0);
mCornerShadowTopPath.rLineTo(0, shadowTop);
mCornerShadowTopPath.close();
mCornerShadowBottomPath.moveTo(shadowHorizontal + mCornerRadius, shadowBottom);
mCornerShadowBottomPath.arcTo(bottomInnerBounds, 270f, -90f, true);
mCornerShadowBottomPath.rLineTo(-shadowHorizontal, 0);
mCornerShadowBottomPath.lineTo(0, mCornerRadius);
mCornerShadowBottomPath.arcTo(bottomOuterBounds, 180f, 90f, true);
mCornerShadowBottomPath.lineTo(shadowHorizontal + mCornerRadius, 0);
mCornerShadowBottomPath.rLineTo(0, shadowBottom);
mCornerShadowBottomPath.close();
代码示例来源:origin: scwang90/SmartRefreshLayout
path.rLineTo(val[k + 0], val[k + 1]);
} else {
path.rMoveTo(val[k + 0], val[k + 1]);
path.rLineTo(val[k + 0], val[k + 1]);
currentX += val[k + 0];
currentY += val[k + 1];
break;
case 'h': // horizontal lineTo - Draws a horizontal line (relative)
path.rLineTo(val[k + 0], 0);
currentX += val[k + 0];
break;
break;
case 'v': // vertical lineTo - Draws a vertical line from the current point (r)
path.rLineTo(0, val[k + 0]);
currentY += val[k + 0];
break;
代码示例来源:origin: joyoyao/superCleanMaster
public void draw(Canvas canvas) {
Rect localRect = getBounds();
float f1 = lerp(this.mBarSize, this.mTopBottomArrowSize, this.mProgress);
float f2 = lerp(this.mBarSize, this.mMiddleArrowSize, this.mProgress);
float f3 = lerp(0.0F, this.mBarThickness / 2.0F, this.mProgress);
float f4 = lerp(0.0F, ARROW_HEAD_ANGLE, this.mProgress);
float f5 = 0.0F;
float f6 = 180.0F;
float f7 = lerp(f5, f6, this.mProgress);
float f8 = lerp(this.mBarGap + this.mBarThickness, 0.0F, this.mProgress);
this.mPath.rewind();
float f9 = -f2 / 2.0F;
this.mPath.moveTo(f9 + f3, 0.0F);
this.mPath.rLineTo(f2 - f3, 0.0F);
float f10 = (float) Math.round(f1 * Math.cos(f4));
float f11 = (float) Math.round(f1 * Math.sin(f4));
this.mPath.moveTo(f9, f8);
this.mPath.rLineTo(f10, f11);
this.mPath.moveTo(f9, -f8);
this.mPath.rLineTo(f10, -f11);
this.mPath.moveTo(0.0F, 0.0F);
this.mPath.close();
canvas.save();
if (!isLayoutRtl())
canvas.rotate(180.0F, localRect.centerX(), localRect.centerY());
canvas.rotate(f7 * mVerticalMirror, localRect.centerX(), localRect.centerY());
canvas.translate(localRect.centerX(), localRect.centerY());
canvas.drawPath(this.mPath, this.mPaint);
canvas.restore();
}
代码示例来源:origin: andkulikov/Transitions-Everywhere
path.rLineTo(val[k + 0], val[k + 1]);
} else {
path.rMoveTo(val[k + 0], val[k + 1]);
path.rLineTo(val[k + 0], val[k + 1]);
currentX += val[k + 0];
currentY += val[k + 1];
break;
case 'h': // horizontal lineto - Draws a horizontal line (relative)
path.rLineTo(val[k + 0], 0);
currentX += val[k + 0];
break;
break;
case 'v': // vertical lineto - Draws a vertical line from the current point (r)
path.rLineTo(0, val[k + 0]);
currentY += val[k + 0];
break;
代码示例来源:origin: robolectric/robolectric
break;
case 'l': // lineto - Draw a line from the current point (relative)
path.rLineTo(val[k + 0], val[k + 1]);
currentX += val[k + 0];
currentY += val[k + 1];
break;
case 'h': // horizontal lineto - Draws a horizontal line (relative)
path.rLineTo(val[k + 0], 0);
currentX += val[k + 0];
break;
break;
case 'v': // vertical lineto - Draws a vertical line from the current point (r)
path.rLineTo(0, val[k + 0]);
currentY += val[k + 0];
break;
代码示例来源:origin: jaredrummler/AnimatedSvgView
path.rLineTo(val[k + 0], val[k + 1]);
} else {
path.rMoveTo(val[k + 0], val[k + 1]);
path.rLineTo(val[k + 0], val[k + 1]);
currentX += val[k + 0];
currentY += val[k + 1];
break;
case 'h': // horizontal lineto - Draws a horizontal line (relative)
path.rLineTo(val[k + 0], 0);
currentX += val[k + 0];
break;
break;
case 'v': // vertical lineto - Draws a vertical line from the current point (r)
path.rLineTo(0, val[k + 0]);
currentY += val[k + 0];
break;
代码示例来源:origin: tarek360/RichPath
path.rLineTo(val[k + 0], val[k + 1]);
} else {
path.rMoveTo(val[k + 0], val[k + 1]);
path.rLineTo(val[k + 0], val[k + 1]);
currentX += val[k + 0];
currentY += val[k + 1];
break;
case 'h': // horizontal lineto - Draws a horizontal line (relative)
path.rLineTo(val[k + 0], 0);
currentX += val[k + 0];
break;
break;
case 'v': // vertical lineto - Draws a vertical line from the current point (r)
path.rLineTo(0, val[k + 0]);
currentY += val[k + 0];
break;
代码示例来源:origin: florent37/ViewAnimator
path.rLineTo(x, y);
lastX += x;
lastY += y;
path.rLineTo(x, 0);
lastX += x;
} else {
path.rLineTo(0, y);
lastY += y;
} else {
代码示例来源:origin: siyamed/android-shape-imageview
float y = ph.nextFloat();
if (cmd == 'l') {
p.rLineTo(x, y);
lastX += x;
lastY += y;
float x = ph.nextFloat();
if (cmd == 'h') {
p.rLineTo(x, 0);
lastX += x;
} else {
float y = ph.nextFloat();
if (cmd == 'v') {
p.rLineTo(0, y);
lastY += y;
} else {
代码示例来源:origin: robinhood/spark
/**
* Set the path to animate in onDraw, used for getAnimation purposes
*/
public void setAnimationPath(@NonNull Path animationPath) {
this.renderPath.reset();
this.renderPath.addPath(animationPath);
this.renderPath.rLineTo(0, 0);
invalidate();
}
代码示例来源:origin: michaldrabik/TapBarMenu
private Path createRoundedRectPathPreApi21(Path path, float left, float top, float right, float bottom, float rx, float ry) {
if (rx < 0) rx = 0;
if (ry < 0) ry = 0;
float width = right - left;
float height = bottom - top;
if (rx > width / 2) rx = width / 2;
if (ry > height / 2) ry = height / 2;
float widthMinusCorners = (width - (2 * rx));
float heightMinusCorners = (height - (2 * ry));
path.moveTo(right, top + ry);
path.rQuadTo(0, -ry, -rx, -ry);
path.rLineTo(-widthMinusCorners, 0);
path.rQuadTo(-rx, 0, -rx, ry);
path.rLineTo(0, heightMinusCorners);
path.rQuadTo(0, ry, rx, ry);
path.rLineTo(widthMinusCorners, 0);
path.rQuadTo(rx, 0, rx, -ry);
path.rLineTo(0, -heightMinusCorners);
path.close();
return path;
}
代码示例来源:origin: michaldrabik/TapBarMenu
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
private Path createRoundedRectPathApi21(Path path, float left, float top, float right, float bottom, float rx, float ry) {
if (rx < 0) rx = 0;
if (ry < 0) ry = 0;
float width = right - left;
float height = bottom - top;
if (rx > width / 2) rx = width / 2;
if (ry > height / 2) ry = height / 2;
float widthMinusCorners = (width - (2 * rx));
float heightMinusCorners = (height - (2 * ry));
path.moveTo(right, top + ry);
path.arcTo(right - 2 * rx, top, right, top + 2 * ry, 0, -90, false);
path.rLineTo(-widthMinusCorners, 0);
path.arcTo(left, top, left + 2 * rx, top + 2 * ry, 270, -90, false);
path.rLineTo(0, heightMinusCorners);
path.arcTo(left, bottom - 2 * ry, left + 2 * rx, bottom, 180, -90, false);
path.rLineTo(widthMinusCorners, 0);
path.arcTo(right - 2 * rx, bottom - 2 * ry, right, bottom, 90, -90, false);
path.rLineTo(0, -heightMinusCorners);
path.close();
return path;
}
代码示例来源:origin: Hitomis/ActivitySwitcher
mCornerShadowPath.rLineTo(-mShadowSize, 0);
代码示例来源:origin: code-mc/loadtoast
toastPath.rLineTo(ws*(IMAGE_WIDTH + MAX_TEXT_WIDTH), 0);
toastPath.rCubicTo(circleOffset, 0, th / 2, th / 2 - circleOffset, th / 2, th / 2);
toastPath.rLineTo(-pd, 0);
toastPath.rCubicTo(0, -iconoffset, -iw / 2 + iconoffset, -iw / 2, -iw / 2, -iw / 2);
toastPath.rCubicTo(-iconoffset, 0, -iw / 2, iw / 2 - iconoffset, -iw / 2, iw / 2);
toastPath.rCubicTo(0, iconoffset, iw / 2 - iconoffset, iw / 2, iw / 2, iw / 2);
toastPath.rCubicTo(iconoffset, 0, iw / 2, -iw / 2 + iconoffset, iw / 2, -iw / 2);
toastPath.rLineTo(pd, 0);
toastPath.rLineTo(ws*(-IMAGE_WIDTH - MAX_TEXT_WIDTH), 0);
toastPath.rCubicTo(-circleOffset, 0, -th / 2, -th / 2 + circleOffset, -th / 2, -th / 2);
toastPath.rCubicTo(0, -circleOffset, -circleOffset + th / 2, -th / 2, th / 2, -th / 2);
toastPath.rLineTo(ws*(IMAGE_WIDTH + MAX_TEXT_WIDTH), 0);
toastPath.rCubicTo(circleOffset, 0, thb / 2, thb / 2 - circleOffset, thb / 2, thb / 2);
toastPath.rLineTo(ws*(-IMAGE_WIDTH - MAX_TEXT_WIDTH), 0);
toastPath.rCubicTo(-circleOffset, 0, -thb / 2, -thb / 2 + circleOffset, -thb / 2, -thb / 2);
toastPath.rCubicTo(0, -circleOffset, -circleOffset + thb / 2, -thb / 2, thb / 2, -thb / 2);
内容来源于网络,如有侵权,请联系作者删除!