android Programming Glossary: eraser
Producing eraser effects using libgdx and OpenGL ES http://stackoverflow.com/questions/10373847/producing-eraser-effects-using-libgdx-and-opengl-es eraser effects using libgdx and OpenGL ES Please consider the following..
Android Paint PorterDuff.Mode.CLEAR http://stackoverflow.com/questions/10494442/android-paint-porterduff-mode-clear But if I try to save my image as PNG file the strokes of eraser are coloured black and I'm not sure why is this happening. Here..
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 backColor Erase a circle. c.drawCircle cx cy radius eraser Draw the bitmap on our views canvas. canvas.drawBitmap b 0 0.. on our views canvas. canvas.drawBitmap b 0 0 null Where eraser is created as eraser new Paint eraser.setColor 0xFFFFFFFF eraser.setXfermode.. canvas.drawBitmap b 0 0 null Where eraser is created as eraser new Paint eraser.setColor 0xFFFFFFFF eraser.setXfermode new..
Erase bitmap parts using PorterDuff mode http://stackoverflow.com/questions/3467334/erase-bitmap-parts-using-porterduff-mode private final Paint paint new Paint private final Paint eraserPaint new Paint public DrawView Context context super context.. bitmap bitmapCanvas.drawColor Color.BLUE Set eraser paint properties eraserPaint.setAlpha 0 eraserPaint.setXfermode.. Color.BLUE Set eraser paint properties eraserPaint.setAlpha 0 eraserPaint.setXfermode new PorterDuffXfermode..
How do the pieces of Android's (2D) Canvas drawing pipeline fit together? http://stackoverflow.com/questions/5762727/how-do-the-pieces-of-androids-2d-canvas-drawing-pipeline-fit-together by the fact that one can do something like this Paint eraser new Paint eraser.setXfermode new PorterDuffXfermode PorterDuff.Mode.CLEAR.. that one can do something like this Paint eraser new Paint eraser.setXfermode new PorterDuffXfermode PorterDuff.Mode.CLEAR canvas.drawOval.. PorterDuff.Mode.CLEAR canvas.drawOval rectF eraser This erases an oval. Before I noticed this my mental model was..
Producing eraser effects using libgdx and OpenGL ES http://stackoverflow.com/questions/10373847/producing-eraser-effects-using-libgdx-and-opengl-es eraser effects using libgdx and OpenGL ES Please consider the following images for the illustration Initially I fill the whole..
Android Paint PorterDuff.Mode.CLEAR http://stackoverflow.com/questions/10494442/android-paint-porterduff-mode-clear and Canvas and if I try to erase something it's working fine. But if I try to save my image as PNG file the strokes of eraser are coloured black and I'm not sure why is this happening. Here is an example what I'm doing @Override protected void onDraw..
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 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 eraser.setColor.. 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 eraser.setColor 0xFFFFFFFF eraser.setXfermode new PorterDuffXfermode PorterDuff.Mode.CLEAR.. 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 eraser.setColor 0xFFFFFFFF eraser.setXfermode new PorterDuffXfermode PorterDuff.Mode.CLEAR This is obviously slow..
Erase bitmap parts using PorterDuff mode http://stackoverflow.com/questions/3467334/erase-bitmap-parts-using-porterduff-mode int x 0 private int y 0 Bitmap bitmap Canvas bitmapCanvas private final Paint paint new Paint private final Paint eraserPaint new Paint public DrawView Context context super context setFocusable true setFocusableInTouchMode true this.setOnTouchListener.. 480 Bitmap.Config.RGB_565 bitmapCanvas new Canvas bitmapCanvas.setBitmap bitmap bitmapCanvas.drawColor Color.BLUE Set eraser paint properties eraserPaint.setAlpha 0 eraserPaint.setXfermode new PorterDuffXfermode PorterDuff.Mode.DST_IN eraserPaint.setAntiAlias.. bitmapCanvas new Canvas bitmapCanvas.setBitmap bitmap bitmapCanvas.drawColor Color.BLUE Set eraser paint properties eraserPaint.setAlpha 0 eraserPaint.setXfermode new PorterDuffXfermode PorterDuff.Mode.DST_IN eraserPaint.setAntiAlias true @Override..
How do the pieces of Android's (2D) Canvas drawing pipeline fit together? http://stackoverflow.com/questions/5762727/how-do-the-pieces-of-androids-2d-canvas-drawing-pipeline-fit-together and use use their intrinsic color instead I was also surprised by the fact that one can do something like this Paint eraser new Paint eraser.setXfermode new PorterDuffXfermode PorterDuff.Mode.CLEAR canvas.drawOval rectF eraser This erases an oval... intrinsic color instead I was also surprised by the fact that one can do something like this Paint eraser new Paint eraser.setXfermode new PorterDuffXfermode PorterDuff.Mode.CLEAR canvas.drawOval rectF eraser This erases an oval. Before I noticed.. like this Paint eraser new Paint eraser.setXfermode new PorterDuffXfermode PorterDuff.Mode.CLEAR canvas.drawOval rectF eraser This erases an oval. Before I noticed this my mental model was that drawing to a canvas conceptually draws to a separate..
|