[SOLVED] DiscretePathEffect without closing the Path?

Problems with Canvas, OpenGL, etc...

[SOLVED] DiscretePathEffect without closing the Path?

Postby hariseldon78 » Sat Jul 31, 2010 3:19 pm

Hello. I hope the argument has not already been discussed, but i didn't find anything with a quick search.

I want to apply the DiscretePathEffect to a path, but when i do it make the path closed, and i don't want this. Is there a way to apply it without closing the path? here is the code i used:

Code: Select all
      path = new Path();
      path.setLastPoint(a.x, a.y);
      path.lineTo(b.x, b.y);
      Paint paint = new Paint();
      DiscretePathEffect discretePathEffect = new DiscretePathEffect(15,4);
      paint.setPathEffect( discretePathEffect);
      paint.getFillPath(path, path);
hariseldon78
Freshman
Freshman
 
Posts: 2
Joined: Sat Jul 31, 2010 3:12 pm

Top

Re: [SOLVED] DiscretePathEffect without closing the Path?

Postby hariseldon78 » Sat Jul 31, 2010 11:35 pm

ok, i've found the solution:

Code: Select all
paint.setStyle(Paint.Style.STROKE);
hariseldon78
Freshman
Freshman
 
Posts: 2
Joined: Sat Jul 31, 2010 3:12 pm

Top

Return to Android 2D/3D Graphics - OpenGL Problems

Who is online

Users browsing this forum: No registered users and 2 guests