List of usage examples for android.graphics ComposePathEffect ComposePathEffect
public ComposePathEffect(PathEffect outerpe, PathEffect innerpe)
From source file:de.uni.stuttgart.informatik.ToureNPlaner.UI.Activities.MapScreen.MapScreen.java
private void setupWayOverlay() { Path p = new Path(); p.moveTo(4.f, 0.f);//from ww w . j av a 2 s . c o m p.lineTo(0.f, -4.f); p.lineTo(8.f, -4.f); p.lineTo(12.f, 0.f); p.lineTo(8.f, 4.f); p.lineTo(0.f, 4.f); Paint fastWayOverlayColor = new Paint(Paint.ANTI_ALIAS_FLAG); fastWayOverlayColor.setStyle(Paint.Style.STROKE); fastWayOverlayColor.setColor(Color.BLUE); fastWayOverlayColor.setAlpha(160); fastWayOverlayColor.setStrokeWidth(5.f); fastWayOverlayColor.setStrokeJoin(Paint.Join.ROUND); fastWayOverlayColor.setPathEffect(new ComposePathEffect( new PathDashPathEffect(p, 12.f, 0.f, PathDashPathEffect.Style.ROTATE), new CornerPathEffect(30.f))); // create the WayOverlay and add the ways this.fastWayOverlay = new FastWayOverlay(session, fastWayOverlayColor); mapView.getOverlays().add(this.fastWayOverlay); Result result = session.getResult(); if (result != null) { addPathToMap(result.getWay()); } }