All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.qozix.tileview.paths.PathHelper Maven / Gradle / Ivy

Go to download

The TileView widget is a subclass of ViewGroup that provides a mechanism to asynchronously display tile-based images, with additional functionality for 2D dragging, flinging, pinch or double-tap to zoom, adding overlaying Views (markers), built-in Hot Spot support, dynamic path drawing, multiple levels of detail, and support for any relative positioning or coordinate system.

The newest version!
package com.qozix.tileview.paths;

import java.util.List;

import android.graphics.Path;
import android.graphics.Point;

public class PathHelper {

	private PathHelper() {

	}

	public static Path pathFromPoints( List points ) {
		Path path = new Path();
		Point start = points.get( 0 );
		path.moveTo( (float) start.x, (float) start.y );
		int l = points.size();
		for ( int i = 1; i < l; i++ ) {
			Point point = points.get( i );
			path.lineTo( (float) point.x, (float) point.y );
		}
		return path;
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy