public void paintFrame(@NotNull Graphics g,@NotNull Device device,@NotNull ScreenOrientation orientation,boolean showEffects,int x1,int y1,int height){
  DeviceData data=getDeviceData(device);
  if (data == null || height == 0) {
    return;
  }
  FrameData frame=data.getFrameData(orientation,Integer.MAX_VALUE);
  BufferedImage image=frame.getImage(showEffects);
  if (image != null) {
    double scale=height / (double)frame.getScreenHeight();
    int dx1=(int)(x1 - scale * frame.getScreenX());
    int dy1=(int)(y1 - scale * frame.getScreenY());
    int dx2=dx1 + (int)(scale * image.getWidth());
    int dy2=dy1 + (int)(scale * image.getHeight());
    g.drawImage(image,dx1,dy1,dx2,dy2,0,0,image.getWidth(),image.getHeight(),null);
  }
}

public void paintFrame ( @ NotNull Graphics g , @ NotNull Device device , @ NotNull ScreenOrientation orientation , boolean showEffects , int x1 , int y1 , int height ) { DeviceData data = getDeviceData ( device ) ; if ( data == null || height == 0 ) { return ; } FrameData frame = data . getFrameData ( orientation , Integer . MAX_VALUE ) ; BufferedImage image = frame . getImage ( showEffects ) ; if ( image != null ) { double scale = height / ( double ) frame . getScreenHeight ( ) ; int dx1 = ( int ) ( x1 - scale * frame . getScreenX ( ) ) ; int dy1 = ( int ) ( y1 - scale * frame . getScreenY ( ) ) ; int dx2 = dx1 + ( int ) ( scale * image . getWidth ( ) ) ; int dy2 = dy1 + ( int ) ( scale * image . getHeight ( ) ) ; g . drawImage ( image , dx1 , dy1 , dx2 , dy2 , 0 , 0 , image . getWidth ( ) , image . getHeight ( ) , null ) ; } }
paint the device frame for the given device around the screenshot coordinates ( x1 , y1 ) to ( x2 , y2 ) , optionally with glare and shadow effects
