项目:android-study
文件:PathEffectView.java
@Override protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
//无效果
mEffects[0] = null;
//拐角处变得圆滑
mEffects[1] = new CornerPathEffect(30);
//线段上就会产生许多杂点
mEffects[2] = new discretePathEffect(3.0F,5.0F);
//绘制虚线
mEffects[3] = new DashPathEffect(new float[] { 20,10,5,10 },0);
Path path = new Path();
path.addRect(0,8,Path.Direction.ccw);
//设置点的图形,即方形点的虚线,圆形点的虚线
mEffects[4] = new PathDashPathEffect(path,12,PathDashPathEffect.Style.ROTATE);
//组合PathEffect
mEffects[5] = new ComposePathEffect(mEffects[3],mEffects[1]);
for (int i = 0; i < mEffects.length; i++) {
mPaint.setPathEffect(mEffects[i]);
canvas.drawPath(mPath,mPaint);
canvas.translate(0,200);
}
}
项目:DirectionFieldAndroid
文件:PhasePlane.java
public void setPoints(ArrayList<float[]> pointsToPath){
synchronized (pointsToPath) {
this.points = pointsToPath;
float[] startPoint = convertXYToLinePoint(points.get(0));
path.moveto(startPoint[0],startPoint[1]);
for (int i = 0; i<this.points.size(); i++) {
float[] linePoint = convertXYToLinePoint(points.get(i));
path.lineto(linePoint[0],linePoint[1]);
}
}
pathMeasure = new PathMeasure(path,false);
pathLength = pathMeasure.getLength(); // the interpolated length of the entire path as it would be drawn on the screen in dp
PathEffect pathEffect = new PathDashPathEffect(makeConvexArrow(15.0f,15.0f),5.0f,0.0f,PathDashPathEffect.Style.ROTATE);
paintSettings.setPathEffect(pathEffect);
invalidate();
}
项目:binea_project_for_android
文件:PathEffectView.java
private void initPaint() {
mPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
mPaint.setStyle(Paint.Style.stroke);
mPaint.setstrokeWidth(5);
mPaint.setColor(Color.RED);
mPath = new Path();
mPath.moveto(0,0);
for(int i = 0;i<=30;i++){
mPath.lineto(i*35,(float)Math.random()*100);
}
mEffects = new PathEffect[7];
mEffects[0] = null;
mEffects[1] = new CornerPathEffect(10);
mEffects[2] = new discretePathEffect(3.0F,5.0F);
mEffects[3] = new DashPathEffect(new float[] { 20,mPhase);
Path path = new Path();
path.addRect(0,Path.Direction.ccw);
mEffects[4] = new PathDashPathEffect(path,mPhase,PathDashPathEffect.Style.ROTATE);
mEffects[5] = new ComposePathEffect(mEffects[2],mEffects[4]);
mEffects[6] = new SumPathEffect(mEffects[4],mEffects[3]);
}
项目:QuizUpWinner
文件:Chart.java
private void ˊ(Canvas paramCanvas,Paint paramPaint)
{
int i = this.ˈ.getResources().getColor(2131230762);
Path localPath1 = new Path();
localPath1.addCircle(0.0F,0.0F,1.0F,Path.Direction.CW);
paramPaint.setStyle(Paint.Style.stroke);
paramPaint.setstrokeWidth(1.0F);
paramPaint.setPathEffect(new PathDashPathEffect(localPath1,6.0F,PathDashPathEffect.Style.TRANSLATE));
for (int j = 0; j < 8; j++)
{
float f2 = this.ˎ * j + this.ʻ;
if (j % 2 == 1)
paramPaint.setColor(i);
else
paramPaint.setColor(-1);
Path localPath3 = new Path();
localPath3.moveto(this.ˏ,f2);
localPath3.lineto(this.ʽ,f2);
paramCanvas.drawPath(localPath3,paramPaint);
}
paramPaint.setColor(-1);
for (int k = 1; k <= 7; k++)
{
float f1 = this.ˋ * k + this.ˏ;
this.ʿ[(k - 1)] = f1;
Path localPath2 = new Path();
localPath2.moveto(f1,this.ʻ);
localPath2.lineto(f1,this.ͺ);
paramCanvas.drawPath(localPath2,paramPaint);
}
this.ʿ[(-1 + this.ʿ.length)] = (this.ι - this.ᐝ);
}
项目:android-graphics-demo
文件:HollowTextActivity.java
项目:CUT-IN-material
文件:PathEffectsCutin.java
private static void makeEffects(PathEffect[] e,float phase) {
e[0] = null; // no effect
e[1] = new CornerPathEffect(10);
e[2] = new DashPathEffect(new float[] {10,5},phase);
e[3] = new PathDashPathEffect(makePathDash(),phase,PathDashPathEffect.Style.ROTATE);
e[4] = new ComposePathEffect(e[2],e[1]);
e[5] = new ComposePathEffect(e[3],e[1]);
}
项目:springy-heads
文件:ChatHeadOverlayView.java
项目:rastertheque
文件:SafeDashPathEffect.java
项目:OpenMapKitAndroid
文件:SafeDashPathEffect.java
public SafeDashPathEffect(float[] intervals,PathDashPathEffect.Style.MORPH);
}
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。