¡@

Home 

2014/10/16 ¤W¤È 08:27:59

android Programming Glossary: y1

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 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.. 8 int PRESET_PRESSURE pressure mCanvas.drawCircle x1 y1 PRESET_SIZE size paint canvas.save canvas.translate mPosX..

Android Drag and drop images on the Screen?

http://stackoverflow.com/questions/11027792/android-drag-and-drop-images-on-the-screen

value of x1 x_cord System.out.println value of y1 y_cord if x_cord windowwidth x_cord windowwidth if y_cord..

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 I'm..

Multi-gradient shapes

http://stackoverflow.com/questions/4381033/multi-gradient-shapes

Also the 0 0 0 theButton.getHeight refers to the x0 y0 x1 y1 coordinates of the gradient. So basically it starts at x 0 left..

Android: Drawing a canvas to an ImageView

http://stackoverflow.com/questions/4918079/android-drawing-a-canvas-to-an-imageview

Bitmap myBitmap ... Paint myRectPaint ... int x1 ... int y1 ... int x2 ... int y2 ... Create a new image bitmap and attach.. with rounded edges tempCanvas.drawRoundRect new RectF x1 y1 x2 y2 2 2 myPaint Attach the canvas to the ImageView myImageView.setImageDrawable..

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.. 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.. 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..

Android OpenCV Drawing Hough Lines

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

x lines.cols x double vec lines.get 0 x double x1 vec 0 y1 vec 1 x2 vec 2 y2 vec 3 Point start new Point x1 y1 Point.. 0 y1 vec 1 x2 vec 2 y2 vec 3 Point start new Point x1 y1 Point end new Point x2 y2 Core.line mRgba start end new Scalar..

Can I serialize the paths drawn on canvas for redrawing the paths on relaunch of the application

http://stackoverflow.com/questions/8832931/can-i-serialize-the-paths-drawn-on-canvas-for-redrawing-the-paths-on-relaunch-of

int x int y path.lineTo int x int y path.quadTo int x1 int y1 int x2 int y2 and path.reset methods for scribbling. Actions.. I took two arrays 1 for x and another for y. For quadTo x1 y1 x2 y2 we need two points for reset we need no points and for..

Bezier curve and canvas

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

then your three points to quadTo .. Some code for you x1 y1 and x3 y3 are your starting and ending points respectively... setAntiAlias true final Path path new Path path.moveTo x1 y1 final float x2 x3 x1 2 final float y2 y3 y1 2 path.quadTo x2.. 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 share..

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.. 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 left top right bottom paint.setStyle Paint.Style.FILL_AND_STROKE paint.setStrokeWidth 1.. int PRESET_PRESSURE pressure 16 int PRESET_PRESSURE pressure 8 int PRESET_PRESSURE pressure mCanvas.drawCircle x1 y1 PRESET_SIZE size paint canvas.save canvas.translate mPosX mPosY canvas.scale mScaleFactor mScaleFactor mBitmapDrawable.draw..

Android Drag and drop images on the Screen?

http://stackoverflow.com/questions/11027792/android-drag-and-drop-images-on-the-screen

int event.getRawX int y_cord int event.getRawY System.out.println value of x1 x_cord System.out.println value of y1 y_cord if x_cord windowwidth x_cord windowwidth if y_cord windowheight y_cord windowheight layoutParams.leftMargin..

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..

Multi-gradient shapes

http://stackoverflow.com/questions/4381033/multi-gradient-shapes

but you can modify this to replicate your example. Edit Also the 0 0 0 theButton.getHeight refers to the x0 y0 x1 y1 coordinates of the gradient. So basically it starts at x 0 left side y 0 top and stretches to x 0 we're wanting a vertical..

Android: Drawing a canvas to an ImageView

http://stackoverflow.com/questions/4918079/android-drawing-a-canvas-to-an-imageview

ImageView myImageView ... Bitmap myBitmap ... Paint myRectPaint ... int x1 ... int y1 ... int x2 ... int y2 ... Create a new image bitmap and attach a brand new canvas to it Bitmap tempBitmap Bitmap.createBitmap.. else you want into the canvas in this example a rectangle with rounded edges tempCanvas.drawRoundRect new RectF x1 y1 x2 y2 2 2 myPaint Attach the canvas to the ImageView myImageView.setImageDrawable new BitmapDrawable getResources tempBitmap..

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.. 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 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.. 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 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..

Android OpenCV Drawing Hough Lines

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

1 Math.PI 180 threshold minLineSize lineGap for int x 0 x lines.cols x double vec lines.get 0 x double x1 vec 0 y1 vec 1 x2 vec 2 y2 vec 3 Point start new Point x1 y1 Point end new Point x2 y2 Core.line mRgba start end new Scalar 255.. x 0 x lines.cols x double vec lines.get 0 x double x1 vec 0 y1 vec 1 x2 vec 2 y2 vec 3 Point start new Point x1 y1 Point end new Point x2 y2 Core.line mRgba start end new Scalar 255 0 0 3 Bitmap bmp Bitmap.createBitmap getFrameWidth getFrameHeight..

Can I serialize the paths drawn on canvas for redrawing the paths on relaunch of the application

http://stackoverflow.com/questions/8832931/can-i-serialize-the-paths-drawn-on-canvas-for-redrawing-the-paths-on-relaunch-of

to store a map of Actions and Points. We need path.moveTo int x int y path.lineTo int x int y path.quadTo int x1 int y1 int x2 int y2 and path.reset methods for scribbling. Actions in this case being lineTo moveTo quadTo reset and points being.. quadTo reset and points being the corresponding points. I took two arrays 1 for x and another for y. For quadTo x1 y1 x2 y2 we need two points for reset we need no points and for other we need a single point x y . We can think actions being..

Bezier curve and canvas

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

you would simply need to calculate the middle point and pass then your three points to quadTo .. Some code for you x1 y1 and x3 y3 are your starting and ending points respectively. create the paint object only once e.g. in your constructor Paint.. setStrokeCap Paint.Cap.ROUND setStrokeWidth 3.0f setAntiAlias true final Path path new 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 share improve this answer..