android Programming Glossary: paint.style.fill
Android FingerPaint Undo/Redo implementation http://stackoverflow.com/questions/10165965/android-fingerpaint-undo-redo-implementation Paint.Style.STROKE circlePaint.setStyle Paint.Style.FILL mPaint.setStyle Paint.Style.STROKE mPaint.setStrokeJoin Paint.Join.ROUND..
How to make view resizable on touch event http://stackoverflow.com/questions/10188478/how-to-make-view-resizable-on-touch-event true paint.setColor Color.BLACK paint.setStyle Paint.Style.FILL paint.setStrokeJoin Paint.Join.ROUND mPaint.setStrokeCap Paint.Cap.ROUND..
Android Image View Pinch Zooming http://stackoverflow.com/questions/10630373/android-image-view-pinch-zooming 32 255 255 255 backgroundPaint.setStyle Paint.Style.FILL @Override public boolean onTouchEvent MotionEvent ev Let the..
Crop image by polygon area http://stackoverflow.com/questions/15969028/crop-image-by-polygon-area paint.setAntiAlias true paint.setStyle Paint.Style.FILL paint.setXfermode new PorterDuffXfermode Mode.DST_IN Path path..
Android color picker to be included in the activity http://stackoverflow.com/questions/16363235/android-color-picker-to-be-included-in-the-activity mCenterPaint mCenterPaint.setStyle Paint.Style.FILL mCenterPaint.setColor c @Override protected void onMeasure..
Draw in Canvas by finger android http://stackoverflow.com/questions/16650419/draw-in-canvas-by-finger-android mCenterPaint mCenterPaint.setStyle Paint.Style.FILL mCenterPaint.setColor c @Override protected void onMeasure..
How to generate Image Histogram in Android? http://stackoverflow.com/questions/17740059/how-to-generate-image-histogram-in-android super context mPaintBlack new Paint mPaintBlack.setStyle Paint.Style.FILL mPaintBlack.setColor Color.BLACK mPaintBlack.setTextSize 25.. 25 mPaintYellow new Paint mPaintYellow.setStyle Paint.Style.FILL mPaintYellow.setColor Color.YELLOW mPaintYellow.setTextSize.. 25 mPaintRed new Paint mPaintRed.setStyle Paint.Style.FILL mPaintRed.setColor Color.RED mPaintRed.setTextSize 25 mPaintGreen..
How can I tell if a closed path contains a given point? http://stackoverflow.com/questions/2597590/how-can-i-tell-if-a-closed-path-contains-a-given-point if reusing a Paint paint.setAntiAlias false paint.setStyle Paint.Style.FILL for int i 0 i paths.size i paint.setColor i 24 use only alpha..
Extended SurfaceView's onDraw() method never called http://stackoverflow.com/questions/2687015/extended-surfaceviews-ondraw-method-never-called rectanglePaint.setARGB 255 200 0 0 rectanglePaint.setStyle Paint.Style.FILL rectanglePaint.setStrokeWidth 2 @Override protected void onDraw..
How to draw a filled triangle in android canvas? http://stackoverflow.com/questions/3501126/how-to-draw-a-filled-triangle-in-android-canvas my draw method paint.setARGB 255 153 29 29 paint.setStyle Paint.Style.FILL_AND_STROKE paint.setAntiAlias true Path path new Path path.moveTo.. Paint red.setColor android.graphics.Color.RED red.setStyle Paint.Style.FILL And use this color for your path instead of your ARGB. Make..
How to use a custom typeface in a widget? http://stackoverflow.com/questions/4318572/how-to-use-a-custom-typeface-in-a-widget true paint.setTypeface clock paint.setStyle Paint.Style.FILL paint.setColor Color.WHITE paint.setTextSize 65 paint.setTextAlign..
Draw A Circle On Android MapView http://stackoverflow.com/questions/5293709/draw-a-circle-on-android-mapview true innerCirclePaint.setStyle Paint.Style.FILL canvas.drawCircle float pt.x float pt.y circleRadius innerCirclePaint.. true innerCirclePaint.setStyle Paint.Style.FILL canvas.drawCircle float pt.x float pt.y circleRadius innerCirclePaint..
android maps circle overlay, dynamically change radius? http://stackoverflow.com/questions/5722490/android-maps-circle-overlay-dynamically-change-radius Color.RED circlePaint.setAlpha 90 circlePaint.setStyle Paint.Style.FILL canvas.drawCircle point.x point.y rad circlePaint border region..
How can I manipulate the camera preview? http://stackoverflow.com/questions/6478375/how-can-i-manipulate-the-camera-preview rectanglePaint.setARGB 100 200 0 0 rectanglePaint.setStyle Paint.Style.FILL rectanglePaint.setStrokeWidth 2 mHolder getHolder mHolder.addCallback..
Why does BitmapFactory.decodeByteArray return null? http://stackoverflow.com/questions/6520745/why-does-bitmapfactory-decodebytearray-return-null this create a bitmap Paint paint new Paint paint.setStyle Paint.Style.FILL paint.setColor Color.RED paint.setTextSize 16 paint.setAntiAlias..
Gradient appears banded in a SurfaceView, but looks very smooth in a normal View http://stackoverflow.com/questions/7774867/gradient-appears-banded-in-a-surfaceview-but-looks-very-smooth-in-a-normal-view the SurfaceView is Paint paint new Paint paint.setStyle Paint.Style.FILL paint.setAntiAlias false paint.setFilterBitmap false paint.setDither..
Rotating Image on A canvas in android http://stackoverflow.com/questions/8712652/rotating-image-on-a-canvas-in-android height 2f Paint p new Paint p.setColor color p.setStyle Paint.Style.FILL p.setAntiAlias true float startX left float centerwidth Math.cos..
Android FingerPaint Undo/Redo implementation http://stackoverflow.com/questions/10165965/android-fingerpaint-undo-redo-implementation 0x44FFFFFF circlePaint.setColor 0xAADD5522 outercirclePaint.setStyle Paint.Style.STROKE circlePaint.setStyle Paint.Style.FILL mPaint.setStyle Paint.Style.STROKE mPaint.setStrokeJoin Paint.Join.ROUND mPaint.setStrokeCap Paint.Cap.ROUND mPaint.setStrokeWidth..
How to make view resizable on touch event http://stackoverflow.com/questions/10188478/how-to-make-view-resizable-on-touch-event want another background color paint.setAntiAlias true paint.setDither true paint.setColor Color.BLACK paint.setStyle Paint.Style.FILL paint.setStrokeJoin Paint.Join.ROUND mPaint.setStrokeCap Paint.Cap.ROUND paint.setStrokeWidth 5 canvas.drawPaint paint paint.setColor..
Android Image View Pinch Zooming http://stackoverflow.com/questions/10630373/android-image-view-pinch-zooming borderPaint.setStrokeWidth 4 backgroundPaint new Paint backgroundPaint.setARGB 32 255 255 255 backgroundPaint.setStyle Paint.Style.FILL @Override public boolean onTouchEvent MotionEvent ev Let the ScaleGestureDetector inspect all events. mScaleDetector.onTouchEvent..
Crop image by polygon area http://stackoverflow.com/questions/15969028/crop-image-by-polygon-area maskCanvas new Canvas maskImg Paint paint new Paint Paint.ANTI_ALIAS_FLAG paint.setAntiAlias true paint.setStyle Paint.Style.FILL paint.setXfermode new PorterDuffXfermode Mode.DST_IN Path path new Path path.moveTo view.mx view.my path.lineTo view.x1..
Android color picker to be included in the activity http://stackoverflow.com/questions/16363235/android-color-picker-to-be-included-in-the-activity 0x80 canvas.drawCircle 0 0 CENTER_RADIUS mCenterPaint.getStrokeWidth mCenterPaint mCenterPaint.setStyle Paint.Style.FILL mCenterPaint.setColor c @Override protected void onMeasure int widthMeasureSpec int heightMeasureSpec setMeasuredDimension..
Draw in Canvas by finger android http://stackoverflow.com/questions/16650419/draw-in-canvas-by-finger-android 0x80 canvas.drawCircle 0 0 CENTER_RADIUS mCenterPaint.getStrokeWidth mCenterPaint mCenterPaint.setStyle Paint.Style.FILL mCenterPaint.setColor c @Override protected void onMeasure int widthMeasureSpec int heightMeasureSpec setMeasuredDimension..
How to generate Image Histogram in Android? http://stackoverflow.com/questions/17740059/how-to-generate-image-histogram-in-android double mBinSquared private DrawOnTop Context context super context mPaintBlack new Paint mPaintBlack.setStyle Paint.Style.FILL mPaintBlack.setColor Color.BLACK mPaintBlack.setTextSize 25 mPaintYellow new Paint mPaintYellow.setStyle Paint.Style.FILL.. mPaintBlack.setColor Color.BLACK mPaintBlack.setTextSize 25 mPaintYellow new Paint mPaintYellow.setStyle Paint.Style.FILL mPaintYellow.setColor Color.YELLOW mPaintYellow.setTextSize 25 mPaintRed new Paint mPaintRed.setStyle Paint.Style.FILL.. mPaintYellow.setColor Color.YELLOW mPaintYellow.setTextSize 25 mPaintRed new Paint mPaintRed.setStyle Paint.Style.FILL mPaintRed.setColor Color.RED mPaintRed.setTextSize 25 mPaintGreen new Paint mPaintGreen.setStyle Paint.Style.FILL mPaintGreen.setColor..
How can I tell if a closed path contains a given point? http://stackoverflow.com/questions/2597590/how-can-i-tell-if-a-closed-path-contains-a-given-point Paint paint new Paint these are defaults you only need them if reusing a Paint paint.setAntiAlias false paint.setStyle Paint.Style.FILL for int i 0 i paths.size i paint.setColor i 24 use only alpha value for color 0xXX000000 canvas.drawPath paths.get i paint..
Extended SurfaceView's onDraw() method never called http://stackoverflow.com/questions/2687015/extended-surfaceviews-ondraw-method-never-called Context context AttributeSet attrs super context attrs rectanglePaint.setARGB 255 200 0 0 rectanglePaint.setStyle Paint.Style.FILL rectanglePaint.setStrokeWidth 2 @Override protected void onDraw Canvas canvas canvas.drawRect new Rect 10 10 200 200 rectanglePaint..
How to draw a filled triangle in android canvas? http://stackoverflow.com/questions/3501126/how-to-draw-a-filled-triangle-in-android-canvas this triangle in android maps using the code below in my draw method paint.setARGB 255 153 29 29 paint.setStyle Paint.Style.FILL_AND_STROKE paint.setAntiAlias true Path path new Path path.moveTo point1_returned.x point1_returned.y path.lineTo point2_returned.x.. You probably need to do something like Paint red new Paint red.setColor android.graphics.Color.RED red.setStyle Paint.Style.FILL And use this color for your path instead of your ARGB. Make sure the last point of your path ends on the first one it makes..
How to use a custom typeface in a widget? http://stackoverflow.com/questions/4318572/how-to-use-a-custom-typeface-in-a-widget this.getAssets Clockopia.ttf paint.setAntiAlias true paint.setSubpixelText true paint.setTypeface clock paint.setStyle Paint.Style.FILL paint.setColor Color.WHITE paint.setTextSize 65 paint.setTextAlign Align.CENTER myCanvas.drawText time 80 60 paint return..
Draw A Circle On Android MapView http://stackoverflow.com/questions/5293709/draw-a-circle-on-android-mapview Color.BLUE innerCirclePaint.setAlpha 25 innerCirclePaint.setAntiAlias true innerCirclePaint.setStyle Paint.Style.FILL canvas.drawCircle float pt.x float pt.y circleRadius innerCirclePaint To Draw it needs to be added to the maps overlays.. Color.BLUE innerCirclePaint.setAlpha 25 innerCirclePaint.setAntiAlias true innerCirclePaint.setStyle Paint.Style.FILL canvas.drawCircle float pt.x float pt.y circleRadius innerCirclePaint The problem in Scott's answer is that the circleRadius..
android maps circle overlay, dynamically change radius? http://stackoverflow.com/questions/5722490/android-maps-circle-overlay-dynamically-change-radius circlePaint.setAntiAlias true fill region circlePaint.setColor Color.RED circlePaint.setAlpha 90 circlePaint.setStyle Paint.Style.FILL canvas.drawCircle point.x point.y rad circlePaint border region circlePaint.setColor Color.WHITE circlePaint.setAlpha 255..
How can I manipulate the camera preview? http://stackoverflow.com/questions/6478375/how-can-i-manipulate-the-camera-preview Context context AttributeSet attrs super context attrs rectanglePaint.setARGB 100 200 0 0 rectanglePaint.setStyle Paint.Style.FILL rectanglePaint.setStrokeWidth 2 mHolder getHolder mHolder.addCallback this mHolder.setType SurfaceHolder.SURFACE_TYPE_NORMAL..
Why does BitmapFactory.decodeByteArray return null? http://stackoverflow.com/questions/6520745/why-does-bitmapfactory-decodebytearray-return-null to image like I thought I could. How about this way Will this create a bitmap Paint paint new Paint paint.setStyle Paint.Style.FILL paint.setColor Color.RED paint.setTextSize 16 paint.setAntiAlias true paint.setTypeface Typeface.MONOSPACE Bitmap bm Bitmap.createBitmap..
Gradient appears banded in a SurfaceView, but looks very smooth in a normal View http://stackoverflow.com/questions/7774867/gradient-appears-banded-in-a-surfaceview-but-looks-very-smooth-in-a-normal-view appears in the onDraw of both the simple extended View and the SurfaceView is Paint paint new Paint paint.setStyle Paint.Style.FILL paint.setAntiAlias false paint.setFilterBitmap false paint.setDither false Shader shader new LinearGradient 0 0 0 200 new..
Rotating Image on A canvas in android http://stackoverflow.com/questions/8712652/rotating-image-on-a-canvas-in-android 2 width height float centerwidth width 2f float centerheight height 2f Paint p new Paint p.setColor color p.setStyle Paint.Style.FILL p.setAntiAlias true float startX left float centerwidth Math.cos deg2rad angle width 3.0 float startY top float centerheight..
|