protected void drawImage ( Canvas canvas ) { int startPointX = ( int ) ( calculateCenterX ( ) - getImageSize ( ) / 2 ) ; int startPointY = ( int ) ( calculateCenterY ( ) - getImageSize ( ) / 2 ) ; int endPointX = ( int ) ( startPointX + getImageSize ( ) ) ; int endPointY = ( int ) ( startPointY + getImageSize ( ) ) ; getImage ( ) . setBounds ( startPointX , startPointY , endPointX , endPointY ) ; getImage ( ) . draw ( canvas ) ; LOGGER . trace ( "Drawn the Action Button image on canvas with coordinates: X start point = {}, " + "Y start point = {}, X end point = {}, Y end point = {}" , startPointX , startPointY , endPointX , endPointY ) ; }
Draws the image centered inside the view