java - how to set opacity/transparent in DirectionPathOverlay class -


If we make an application to create a route / path using Android and Google Maps, then we will class DirectionPathOverlay To make a line from one point to another, but I can make the line more transparent (not 100% transparent) , this is the name of the road is clearly read. , Anyone can help me?

Here are some code from DirectionPathOverlay class

  Public boolean draw (canvas canvas, map view map, boolean shadow, how long) {projection projection = mapView.getProjection (); If (shadow == wrong) {paint paint = new paint (); Paint.setAntiAlias ​​(right); Paint.setStrokeJoin (Join.ROUND); Point point = new point (); launch. Pixel (gp1, point); Paint.setColor (Color.BLUE); Point point 2 = new point (); launch. Tuck Pixels (GP2, Point 2); Paint.setStrokeWidth (4); Canvas.drawLine (float) point.x, (float) point.y, (float) point2.x, (float point2.y, paint); } Super.draw return (canvas, map view, shadow, when);    

use paint.setAlpha (200); This function accepts integers from 0 to 255.

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -