¡@

Home 

2014/10/16 ¤W¤È 08:28:00

android Programming Glossary: y2

Draw Rectangle Over ImageView for highlight that can be zoom in-out in android

http://stackoverflow.com/questions/10482229/draw-rectangle-over-imageview-for-highlight-that-can-be-zoom-in-out-in-android

100 Bitmap.Config.RGB_565 if bitmap null if x1 0 x2 0 y1 0 y2 0 Log.v Log_tag ImageBitmap is draw Canvas mCanvas new Canvas.. mCanvas new Canvas bitmap mCanvas.drawRect x1 y1 x2 y2 mPaint canvas.clipRect left top right bottom paint.setStyle..

Calculating the angle between the line defined by two points

http://stackoverflow.com/questions/2676719/calculating-the-angle-between-the-line-defined-by-two-points

two points and the horizontal axis double angle atan2 y2 y1 x2 x1 180 PI . I implemented this but I think the fact the..

Remote Database access

http://stackoverflow.com/questions/4897466/remote-database-access

Images in ScrollView in android

http://stackoverflow.com/questions/4990682/images-in-scrollview-in-android

MotionEvent.ACTION_MOVE int x2 int event.getRawX int y2 int event.getRawY container.scrollBy currentX x2 currentY y2.. int event.getRawY container.scrollBy currentX x2 currentY y2 currentX x2 currentY y2 break case MotionEvent.ACTION_UP.. currentX x2 currentY y2 currentX x2 currentY y2 break case MotionEvent.ACTION_UP break return true Here..

Extract black and white image from android camera's NV21 format

http://stackoverflow.com/questions/5272388/extract-black-and-white-image-from-android-cameras-nv21-format

height int offset size int pixels new int size int u v y1 y2 y3 y4 i percorre os Y and the final pixels k percorre os pixles.. pixles U e V for int i 0 k 0 i size i 2 k 2 y1 data i 0xff y2 data i 1 0xff y3 data width i 0xff y4 data width i 1 0xff u.. pixels i convertYUVtoRGB y1 u v pixels i 1 convertYUVtoRGB y2 u v pixels width i convertYUVtoRGB y3 u v pixels width i 1 convertYUVtoRGB..

BufferedImage in Android

http://stackoverflow.com/questions/5392695/bufferedimage-in-android

dx x icentreX float dy y icentreY float x2 dx dx float y2 dy dy if y2 b2 b2 x2 a2 out 0 x out 1 y else float rRefraction.. float dy y icentreY float x2 dx dx float y2 dy dy if y2 b2 b2 x2 a2 out 0 x out 1 y else float rRefraction 1.0f refractionIndex.. 1.0f refractionIndex float z float Math.sqrt 1.0f x2 a2 y2 b2 a b float z2 z z float xAngle float Math.acos dx Math.sqrt..

Android - A simple ndk project using the Eigen library and jni

http://stackoverflow.com/questions/8543221/android-a-simple-ndk-project-using-the-eigen-library-and-jni

y public EditText z public EditText x2 public EditText y2 public EditText z2 public float vecArray public TextView textView1.. array3 new float 3 float array1 new float 3 float array2 new float 3 @Override public void onCreate Bundle savedInstanceState.. findViewById R.id.z x2 EditText findViewById R.id.x y2 EditText findViewById R.id.y z2 EditText findViewById R.id.z..

Bezier curve and canvas

http://stackoverflow.com/questions/9993030/bezier-curve-and-canvas

Path path.moveTo x1 y1 final float x2 x3 x1 2 final float y2 y3 y1 2 path.quadTo x2 y2 x3 y3 canvas.drawPath path paint .. float x2 x3 x1 2 final float y2 y3 y1 2 path.quadTo x2 y2 x3 y3 canvas.drawPath path paint share improve this answer..

Draw Rectangle Over ImageView for highlight that can be zoom in-out in android

http://stackoverflow.com/questions/10482229/draw-rectangle-over-imageview-for-highlight-that-can-be-zoom-in-out-in-android

d .getBitmap Bitmap bitmap Bitmap.createBitmap 100 100 Bitmap.Config.RGB_565 if bitmap null if x1 0 x2 0 y1 0 y2 0 Log.v Log_tag ImageBitmap is draw Canvas mCanvas new Canvas bitmap mCanvas.drawRect x1 y1 x2 y2 mPaint canvas.clipRect.. if x1 0 x2 0 y1 0 y2 0 Log.v Log_tag ImageBitmap is draw Canvas mCanvas new Canvas bitmap mCanvas.drawRect x1 y1 x2 y2 mPaint canvas.clipRect left top right bottom paint.setStyle Paint.Style.FILL_AND_STROKE paint.setStrokeWidth 1 paint.setColor..

Calculating the angle between the line defined by two points

http://stackoverflow.com/questions/2676719/calculating-the-angle-between-the-line-defined-by-two-points

If you want the the angle between the line defined by these two points and the horizontal axis double angle atan2 y2 y1 x2 x1 180 PI . I implemented this but I think the fact the I'm working in screen coordinates is causing a miscalculation..

Remote Database access

http://stackoverflow.com/questions/4897466/remote-database-access

Images in ScrollView in android

http://stackoverflow.com/questions/4990682/images-in-scrollview-in-android

int event.getRawX currentY int event.getRawY break case MotionEvent.ACTION_MOVE int x2 int event.getRawX int y2 int event.getRawY container.scrollBy currentX x2 currentY y2 currentX x2 currentY y2 break case MotionEvent.ACTION_UP.. MotionEvent.ACTION_MOVE int x2 int event.getRawX int y2 int event.getRawY container.scrollBy currentX x2 currentY y2 currentX x2 currentY y2 break case MotionEvent.ACTION_UP break return true Here many improvements can be made such.. int x2 int event.getRawX int y2 int event.getRawY container.scrollBy currentX x2 currentY y2 currentX x2 currentY y2 break case MotionEvent.ACTION_UP break return true Here many improvements can be made such as limit the scrolling..

Extract black and white image from android camera's NV21 format

http://stackoverflow.com/questions/5272388/extract-black-and-white-image-from-android-cameras-nv21-format

byte data int width int height int size width height int offset size int pixels new int size int u v y1 y2 y3 y4 i percorre os Y and the final pixels k percorre os pixles U e V for int i 0 k 0 i size i 2 k 2 y1 data i 0xff y2 data.. y2 y3 y4 i percorre os Y and the final pixels k percorre os pixles U e V for int i 0 k 0 i size i 2 k 2 y1 data i 0xff y2 data i 1 0xff y3 data width i 0xff y4 data width i 1 0xff u data offset k 0xff v data offset k 1 0xff u u 128 v v 128 pixels.. u data offset k 0xff v data offset k 1 0xff u u 128 v v 128 pixels i convertYUVtoRGB y1 u v pixels i 1 convertYUVtoRGB y2 u v pixels width i convertYUVtoRGB y3 u v pixels width i 1 convertYUVtoRGB y4 u v if i 0 i 2 width 0 i width return pixels..

BufferedImage in Android

http://stackoverflow.com/questions/5392695/bufferedimage-in-android

dst protected void transformInverse int x int y float out float dx x icentreX float dy y icentreY float x2 dx dx float y2 dy dy if y2 b2 b2 x2 a2 out 0 x out 1 y else float rRefraction 1.0f refractionIndex float z float Math.sqrt 1.0f x2 a2.. void transformInverse int x int y float out float dx x icentreX float dy y icentreY float x2 dx dx float y2 dy dy if y2 b2 b2 x2 a2 out 0 x out 1 y else float rRefraction 1.0f refractionIndex float z float Math.sqrt 1.0f x2 a2 y2 b2 a b float.. dy if y2 b2 b2 x2 a2 out 0 x out 1 y else float rRefraction 1.0f refractionIndex float z float Math.sqrt 1.0f x2 a2 y2 b2 a b float z2 z z float xAngle float Math.acos dx Math.sqrt x2 z2 float angle1 ImageMath.HALF_PI xAngle float angle2..

Android - A simple ndk project using the Eigen library and jni

http://stackoverflow.com/questions/8543221/android-a-simple-ndk-project-using-the-eigen-library-and-jni

activity is first created. public EditText x public EditText y public EditText z public EditText x2 public EditText y2 public EditText z2 public float vecArray public TextView textView1 public Button run float array3 new float 3 float array1.. float vecArray public TextView textView1 public Button run float array3 new float 3 float array1 new float 3 float array2 new float 3 @Override public void onCreate Bundle savedInstanceState super.onCreate savedInstanceState setContentView R.layout.main.. findViewById R.id.x y EditText findViewById R.id.y z EditText findViewById R.id.z x2 EditText findViewById R.id.x y2 EditText findViewById R.id.y z2 EditText findViewById R.id.z textView1 TextView findViewById R.id.textView1 run Button findViewById..

Bezier curve and canvas

http://stackoverflow.com/questions/9993030/bezier-curve-and-canvas