hotArea.addPoint(startPoint.x ,startPoint.y); hotArea.addPoint( (int) Math.round(startPoint.x + tailWidth*sin - tailLength*cos),(int) Math.round(startPoint.y - tailWidth*cos - tailLength*sin)); hotArea.addPoint( (int) Math.round(endPoint.x - headLength*cos + arrowWidthAtHead*sin), (int) Math.round(endPoint.y - headLength*sin - arrowWidthAtHead*cos)); hotArea.addPoint( (int) Math.round(endPoint.x - headLength*cos + headWidth*sin),(int) Math.round(endPoint.y - headLength*sin - headWidth*cos)); hotArea.addPoint( endPoint.x, endPoint.y); hotArea.addPoint( (int) Math.round(endPoint.x - headLength*cos - headWidth*sin) ,(int) Math.round( endPoint.y - headLength*sin + headWidth*cos)); hotArea.addPoint( (int) Math.round(endPoint.x - headLength*cos - arrowWidthAtHead*sin), (int) Math.round(endPoint.y - headLength*sin + arrowWidthAtHead*cos)); hotArea.addPoint( (int) Math.round(startPoint.x - tailWidth*sin - tailLength*cos), (int) Math.round(startPoint.y + tailWidth*cos - tailLength*sin));
   private void buildPointsArrays(){       int dX = endPoint.x - startPoint.x;       int dY = endPoint.y - startPoint.y;       double arrowLength =  Math.sqrt(dX*dX + dY*dY);       double sin = dY/arrowLength;       double cos = dX/arrowLength;       this.addPoint(startPoint.x ,startPoint.y);       this.addPoint( (int) Math.round(startPoint.x + tailWidth*sin - tailLength*cos),(int) Math.round(startPoint.y - tailWidth*cos - tailLength*sin));       this.addPoint( (int) Math.round(endPoint.x - headLength*cos + arrowWidthAtHead*sin), (int) Math.round(endPoint.y - headLength*sin - arrowWidthAtHead*cos));       this.addPoint( (int) Math.round(endPoint.x - headLength*cos + headWidth*sin),(int) Math.round(endPoint.y - headLength*sin - headWidth*cos));       this.addPoint( endPoint.x, endPoint.y);       if(! halved){           this.addPoint( (int) Math.round(endPoint.x - headLength*cos - headWidth*sin) ,(int) Math.round( endPoint.y - headLength*sin + headWidth*cos));           this.addPoint( (int) Math.round(endPoint.x - headLength*cos - arrowWidthAtHead*sin), (int) Math.round(endPoint.y - headLength*sin + arrowWidthAtHead*cos));           this.addPoint( (int) Math.round(startPoint.x - tailWidth*sin - tailLength*cos), (int) Math.round(startPoint.y + tailWidth*cos - tailLength*sin));       }   }