本文整理汇总了Java中android.graphics.Path.addPath方法的典型用法代码示例。如果您正苦于以下问题:Java Path.addPath方法的具体用法?Java Path.addPath怎么用?Java Path.addPath使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.graphics.Path
的用法示例。
在下文中一共展示了Path.addPath方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addObjectToClip
import android.graphics.Path; //导入方法依赖的package包/类
private void addObjectToClip(SVG.Path obj, Path combinedPath,
Matrix combinedPathMatrix) {
updateStyleForElement(state, obj);
if (!display())
return;
if (!visible())
return;
if (obj.transform != null)
combinedPathMatrix.preConcat(obj.transform);
Path path = (new PathConverter(obj.d)).getPath();
if (obj.boundingBox == null) {
obj.boundingBox = calculatePathBounds(path);
}
checkForClipPath(obj);
// path.setFillType(getClipRuleFromState());
combinedPath.setFillType(getClipRuleFromState());
combinedPath.addPath(path, combinedPathMatrix);
}
示例2: drawUnselected
import android.graphics.Path; //导入方法依赖的package包/类
private void drawUnselected(Canvas canvas) {
combinedUnselectedPath.rewind();
// draw any settled, revealing or joining dots
for (int page = 0; page < pageCount; page++) {
int nextXIndex = page == pageCount - 1 ? page : page + 1;
Path unselectedPath = getUnselectedPath(page,
dotCenterX[page],
dotCenterX[nextXIndex],
page == pageCount - 1 ? INVALID_FRACTION : joiningFractions[page],
dotRevealFractions[page]);
unselectedPath.addPath(combinedUnselectedPath);
combinedUnselectedPath.addPath(unselectedPath);
}
// draw any retreating joins
if (retreatingJoinX1 != INVALID_FRACTION) {
Path retreatingJoinPath = getRetreatingJoinPath();
combinedUnselectedPath.addPath(retreatingJoinPath);
}
canvas.drawPath(combinedUnselectedPath, unselectedPaint);
}
示例3: testPathForCan
import android.graphics.Path; //导入方法依赖的package包/类
private void testPathForCan(Canvas canvas) {
canvas.translate(mWidth / 2, mHeight / 2); // 移动坐标系到屏幕中心
// canvas.scale(1, -1); // <-- 注意 翻转y坐标轴
Path path = new Path();
Path src = new Path();
path.addRect(-200, -200, 200, 200, Path.Direction.CW);
src.addCircle(0, 0, 100, Path.Direction.CW);
path.addPath(src, 0, 200);
paint.setColor(Color.BLACK); // 绘制合并后的路径
canvas.drawPath(path, paint);
}
示例4: drawUnselected
import android.graphics.Path; //导入方法依赖的package包/类
private void drawUnselected(Canvas canvas) {
combinedUnselectedPath.rewind();
for (int page = 0; page < pageCount; page++) {
int nextXIndex;
if (page == pageCount - 1) {
nextXIndex = page;
} else {
nextXIndex = page + 1;
}
Path unselectedPath = getUnselectedPath(page,
dotCenterX[page],
dotCenterX[nextXIndex],
page == pageCount - 1 ? INVALID_FRACTION : joiningFractions[page],
dotRevealFractions[page]);
unselectedPath.addPath(combinedUnselectedPath);
combinedUnselectedPath.addPath(unselectedPath);
}
if (retreatingJoinX1 != INVALID_FRACTION) {
Path retreatingJoinPath = getRetreatingJoinPath();
combinedUnselectedPath.addPath(retreatingJoinPath);
}
canvas.drawPath(combinedUnselectedPath, unselectedPaint);
}
示例5: fillPath
import android.graphics.Path; //导入方法依赖的package包/类
void fillPath(Path path) {
base.fillPath(path);
path.addPath(wawes.get(0).getPath());
path.addPath(wawes.get(1).getPath());
}