Code example for Paint

Methods: setAlphasetAntiAliassetColorsetStrokeWidthsetStyle

0
 
public class LocationOverlay extends MyLocationOverlay { 
 
	private final Bitmap marker;
	private final Paint accuracyPaint = new Paint();
	private final Paint strokePaint = new Paint();
	final Matrix rotate = new Matrix();
	 
	public LocationOverlay(Context context, MapView mapView, int markerResource) {
		super(context, mapView);
		Drawable d = context.getResources().getDrawable(markerResource);
		marker = ((BitmapDrawable) d).getBitmap();
		accuracyPaint.setAntiAlias(true);
		accuracyPaint.setColor(Color.BLUE);
		accuracyPaint.setAlpha(20);
		strokePaint.setAntiAlias(true);
		strokePaint.setStyle(Style.STROKE);
		strokePaint.setColor(Color.BLUE);
		strokePaint.setAlpha(80);
		strokePaint.setStrokeWidth(2);
	} 
	 
	@Override 
	protected void drawMyLocation(Canvas canvas, MapView mapView,
			Location lastFix, GeoPoint myLocation, long when) {
Stop searching for code, let great code find you!  Add Codota to your java IDE