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 use
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);
paint.setAlpha (200); This function accepts integers from 0 to 255.
Comments
Post a Comment