Hi everyone!
Is it possible to merge several paths?
I guess, the following doesn't work, because every path is seen as a
different 'contour'?
public void drawTest3(Canvas canvas){
Path p1,p2,p3,p4;
p1 = new Path();
p2 = new Path();
p3 = new Path();
p4 = new Path();
// create path 1
float[] start = new
float[]{(float)getWidth()/2,(float)getHeight()/2};
float[] point1 = new float[]{0.0f,(float)getHeight()};
float[] point2 = new float[]{(float)getWidth(),(float)getHeight()};
p1.moveTo(start[0], start[1]);
p1.lineTo(point1[0], point1[1]);
p2.moveTo(point1[0], point1[1]);
p2.lineTo(point2[0], point2[1]);
p3.moveTo(point2[0], point2[1]);
p3.lineTo(start[0], start[1]);
p4.addPath(p1);
p4.addPath(p2);
p4.addPath(p3);
// draw
canvas.drawARGB(0xff, 0xdd, 0xdd, 0xdd);
Paint paint = new Paint();
paint.setColor(0x33333333);
canvas.drawPath(p4, paint);
}
Regards, Roland
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en