private static int getShadowColor ( final int elevation , @ NonNull final Orientation orientation , final boolean parallelLight ) { int alpha ; if ( parallelLight ) { alpha = getShadowAlpha ( elevation , MIN_BOTTOM_ALPHA , MAX_BOTTOM_ALPHA ) ; } else { switch ( orientation ) { case LEFT : alpha = getShadowAlpha ( elevation , MIN_LEFT_ALPHA , MAX_LEFT_ALPHA ) ; break ; case TOP : alpha = getShadowAlpha ( elevation , MIN_TOP_ALPHA , MAX_TOP_ALPHA ) ; break ; case RIGHT : alpha = getShadowAlpha ( elevation , MIN_RIGHT_ALPHA , MAX_RIGHT_ALPHA ) ; break ; case BOTTOM : alpha = getShadowAlpha ( elevation , MIN_BOTTOM_ALPHA , MAX_BOTTOM_ALPHA ) ; break ; default : throw new IllegalArgumentException ( "Invalid orientation: " + orientation ) ; } } return Color . argb ( alpha , 0 , 0 , 0 ) ; }
Returns the color of a shadow which is located besides an edge of an elevated view .