private void createPointerPicture ( ) { final Paint arrowPaint = new Paint ( ) ; arrowPaint . setColor ( Color . BLACK ) ; arrowPaint . setAntiAlias ( true ) ; arrowPaint . setStyle ( Style . FILL ) ; arrowPaint . setAlpha ( 220 ) ; // Create a little white dot in the middle of the compass rose final Paint centerPaint = new Paint ( ) ; centerPaint . setColor ( Color . WHITE ) ; centerPaint . setAntiAlias ( true ) ; centerPaint . setStyle ( Style . FILL ) ; centerPaint . setAlpha ( 220 ) ; final int picBorderWidthAndHeight = ( int ) ( ( mCompassRadius + 5 ) * 2 * mScale ) ; final int center = picBorderWidthAndHeight / 2 ; if ( mCompassRoseBitmap != null ) mCompassRoseBitmap . recycle ( ) ; mCompassRoseBitmap = Bitmap . createBitmap ( picBorderWidthAndHeight , picBorderWidthAndHeight , Config . ARGB_8888 ) ; final Canvas canvas = new Canvas ( mCompassRoseBitmap ) ; // Arrow comprised of 2 triangles final Path pathArrow = new Path ( ) ; pathArrow . moveTo ( center , center - ( mCompassRadius - 3 ) * mScale ) ; pathArrow . lineTo ( center + 4 * mScale , center + ( mCompassRadius - 3 ) * mScale ) ; pathArrow . lineTo ( center , center + 0.5f * ( mCompassRadius - 3 ) * mScale ) ; pathArrow . lineTo ( center - 4 * mScale , center + ( mCompassRadius - 3 ) * mScale ) ; pathArrow . lineTo ( center , center - ( mCompassRadius - 3 ) * mScale ) ; pathArrow . close ( ) ; canvas . drawPath ( pathArrow , arrowPaint ) ; // Draw a little white dot in the middle canvas . drawCircle ( center , center , 2 , centerPaint ) ; }
A black pointer arrow .