¡@

Home 

2014/10/16 ¤W¤È 08:21:39

android Programming Glossary: pt2

Creating Custom Overlay on the map

http://stackoverflow.com/questions/4428730/creating-custom-overlay-on-the-map

globalGeoPoint pt GeoPoint newGeos new GeoPoint selectedLat 100 selectedLong adjust your radius accordingly Point pt2 new Point projection.toPixels newGeos pt2 float circleRadius Math.abs pt2.y pt.y Paint circlePaint new Paint Paint.ANTI_ALIAS_FLAG.. GeoPoint selectedLat 100 selectedLong adjust your radius accordingly Point pt2 new Point projection.toPixels newGeos pt2 float circleRadius Math.abs pt2.y pt.y Paint circlePaint new Paint Paint.ANTI_ALIAS_FLAG circlePaint.setColor 0x30000000.. adjust your radius accordingly Point pt2 new Point projection.toPixels newGeos pt2 float circleRadius Math.abs pt2.y pt.y Paint circlePaint new Paint Paint.ANTI_ALIAS_FLAG circlePaint.setColor 0x30000000 circlePaint.setStyle Style.FILL_AND_STROKE..

Connect points on map with lines

http://stackoverflow.com/questions/4903004/connect-points-on-map-with-lines

mapOvlay public class MapOverlay extends com.google.android.maps.Overlay private GeoPoint mGpt1 private GeoPoint mGpt2 protected MapOverlay GeoPoint gp1 GeoPoint gp2 mGpt1 gp1 mGpt2 gp2 @Override public boolean draw Canvas canvas MapView.. private GeoPoint mGpt1 private GeoPoint mGpt2 protected MapOverlay GeoPoint gp1 GeoPoint gp2 mGpt1 gp1 mGpt2 gp2 @Override public boolean draw Canvas canvas MapView mapView boolean shadow long when super.draw canvas mapView shadow.. Color.RED paint.setAntiAlias true paint.setStyle Style.STROKE paint.setStrokeWidth 2 Point pt1 new Point Point pt2 new Point Projection projection mapView.getProjection projection.toPixels mGpt1 pt1 projection.toPixels mGpt2 pt2 canvas.drawLine..

Android OpenCV Drawing Hough Lines

http://stackoverflow.com/questions/7925698/android-opencv-drawing-hough-lines

mLines 1 Math.PI 180 100 Scalar color new Scalar 0 0 255 double data double rho theta Point pt1 new Point Point pt2 new Point double a b double x0 y0 for int i 0 i mLines.cols i data mLines.get 0 i rho data 0 theta data 1 a Math.cos theta.. theta data 1 a Math.cos theta b Math.sin theta x0 a rho y0 b rho pt1.x Math.round x0 1000 b pt1.y Math.round y0 1000 a pt2.x Math.round x0 1000 b pt2.y Math.round y0 1000 a Core.line mIntermediateMat pt1 pt2 color 3 Imgproc.cvtColor mIntermediateMat.. b Math.sin theta x0 a rho y0 b rho pt1.x Math.round x0 1000 b pt1.y Math.round y0 1000 a pt2.x Math.round x0 1000 b pt2.y Math.round y0 1000 a Core.line mIntermediateMat pt1 pt2 color 3 Imgproc.cvtColor mIntermediateMat mRgba Imgproc.COLOR_GRAY2BGRA..