public PageSnapshot cropAround ( WebElement element , int offsetX , int offsetY ) { try { image = ImageProcessor . cropAround ( image , new Coordinates ( element , devicePixelRatio ) , offsetX , offsetY ) ; } catch ( RasterFormatException rfe ) { throw new ElementOutsideViewportException ( ELEMENT_OUT_OF_VIEWPORT_EX_MESSAGE , rfe ) ; } return this ; }
Crop the image around specified element with offset .