¡@

Home 

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

android Programming Glossary: cy

Android FingerPaint Undo/Redo implementation

http://stackoverflow.com/questions/10165965/android-fingerpaint-undo-redo-implementation

mPath new Path paths.add mPath cx 400 DrawActivity.scale cy 30 DrawActivity.scale circleRadius 20 DrawActivity.scale xleft.. 10 DrawActivity.scale xright cx 10 DrawActivity.scale xtop cy 10 DrawActivity.scale xbottom cy 10 DrawActivity.scale public.. DrawActivity.scale xtop cy 10 DrawActivity.scale xbottom cy 10 DrawActivity.scale public void colorChanged int color mPaint.setColor..

Punch a hole in a rectangle overlay with HW acceleration enabled on View

http://stackoverflow.com/questions/13528550/punch-a-hole-in-a-rectangle-overlay-with-hw-acceleration-enabled-on-view

Clip out a circle. circle.reset circle.addCircle cx cy radius Path.Direction.CW circle.close canvas.clipPath circle.. c.drawColor backColor Erase a circle. c.drawCircle cx cy radius eraser Draw the bitmap on our views canvas. canvas.drawBitmap.. devices canvas.drawColor backColor canvas.drawCircle cx cy radius eraser Same as the HW acceleration compatible method..

Android: how to warp images?

http://stackoverflow.com/questions/15779669/android-how-to-warp-images

mVerts 0 null 0 null private void warp float cx float cy final float K 10000 float src mOrig float dst mVerts for int.. 2 float x src i 0 float y src i 1 float dx cx x float dy cy y float dd dx dx dy dy float d FloatMath.sqrt dd float pull.. index i dist d pull pull if pull 1 dst i 0 cx dst i 1 cy else dst i 0 x dx pull dst i 1 y dy pull private int mLastWarpX..

Android:Crash: Binary XML file line : Error inflating class (using SurfaceView)

http://stackoverflow.com/questions/5828801/androidcrash-binary-xml-file-line-error-inflating-class-using-surfaceview

private Paint paint new Paint Paint.ANTI_ALIAS_FLAG int cx cy offx offy public MySurfaceView Context context super context.. paint.setStrokeWidth 3 paint.setColor Color.WHITE cx 0 cy 0 offx 10 offy 10 @Override public void surfaceChanged SurfaceHolder.. method stub canvas.drawRGB 0 0 0 canvas.drawCircle cx cy 3 paint cx offx if cx getWidth cx 0 offx 1 cx offx cy offy..

Draw circle in android [closed]

http://stackoverflow.com/questions/6200171/draw-circle-in-android

the bitmap canvas Canvas c new Canvas bmp c.drawCircle cx cy radius paint setting to imageview img.setBackgroundDrawable..

Android FingerPaint Undo/Redo implementation

http://stackoverflow.com/questions/10165965/android-fingerpaint-undo-redo-implementation

6 outercirclePaint.setStrokeWidth 6 mCanvas new Canvas mPath new Path paths.add mPath cx 400 DrawActivity.scale cy 30 DrawActivity.scale circleRadius 20 DrawActivity.scale xleft cx 10 DrawActivity.scale xright cx 10 DrawActivity.scale.. circleRadius 20 DrawActivity.scale xleft cx 10 DrawActivity.scale xright cx 10 DrawActivity.scale xtop cy 10 DrawActivity.scale xbottom cy 10 DrawActivity.scale public void colorChanged int color mPaint.setColor color @Override.. xleft cx 10 DrawActivity.scale xright cx 10 DrawActivity.scale xtop cy 10 DrawActivity.scale xbottom cy 10 DrawActivity.scale public void colorChanged int color mPaint.setColor color @Override protected void onSizeChanged int..

Punch a hole in a rectangle overlay with HW acceleration enabled on View

http://stackoverflow.com/questions/13528550/punch-a-hole-in-a-rectangle-overlay-with-hw-acceleration-enabled-on-view

Method 1 SW Acceleration Slow final int saveCount canvas.save Clip out a circle. circle.reset circle.addCircle cx cy radius Path.Direction.CW circle.close canvas.clipPath circle Region.Op.DIFFERENCE Draw the rectangle color. canvas.drawColor.. final Canvas c new Canvas b Draw the rectangle colour. c.drawColor backColor Erase a circle. c.drawCircle cx cy radius eraser Draw the bitmap on our views canvas. canvas.drawBitmap b 0 0 null Where eraser is created as eraser new Paint.. call. Method 3 HW Acceleration Fast does not work on some devices canvas.drawColor backColor canvas.drawCircle cx cy radius eraser Same as the HW acceleration compatible method but no extra canvas required. There is a major problem with..

Android: how to warp images?

http://stackoverflow.com/questions/15779669/android-how-to-warp-images

mMatrix canvas.drawBitmapMesh mBitmap WIDTH HEIGHT mVerts 0 null 0 null private void warp float cx float cy final float K 10000 float src mOrig float dst mVerts for int i 0 i COUNT 2 i 2 float x src i 0 float y src i 1 float dx.. float src mOrig float dst mVerts for int i 0 i COUNT 2 i 2 float x src i 0 float y src i 1 float dx cx x float dy cy y float dd dx dx dy dy float d FloatMath.sqrt dd float pull K dd 0.000001f pull d 0.000001f android.util.Log.d skia index.. pull K dd 0.000001f pull d 0.000001f android.util.Log.d skia index i dist d pull pull if pull 1 dst i 0 cx dst i 1 cy else dst i 0 x dx pull dst i 1 y dy pull private int mLastWarpX 9999 don't match a touch coordinate private int mLastWarpY..

Android:Crash: Binary XML file line : Error inflating class (using SurfaceView)

http://stackoverflow.com/questions/5828801/androidcrash-binary-xml-file-line-error-inflating-class-using-surfaceview

SurfaceHolder.Callback private MySurfaceThread thread private Paint paint new Paint Paint.ANTI_ALIAS_FLAG int cx cy offx offy public MySurfaceView Context context super context TODO Auto generated constructor stub init public MySurfaceView.. sure we get key events paint.setStyle Paint.Style.STROKE paint.setStrokeWidth 3 paint.setColor Color.WHITE cx 0 cy 0 offx 10 offy 10 @Override public void surfaceChanged SurfaceHolder arg0 int arg1 int arg2 int arg3 TODO Auto generated.. protected void onDraw Canvas canvas TODO Auto generated method stub canvas.drawRGB 0 0 0 canvas.drawCircle cx cy 3 paint cx offx if cx getWidth cx 0 offx 1 cx offx cy offy if cy getHeight cy 0 offy 1 cy offy Here is the main.xml..

Draw circle in android [closed]

http://stackoverflow.com/questions/6200171/draw-circle-in-android