(ImageProcessor ip)
| 668 | } |
| 669 | |
| 670 | public void clear(ImageProcessor ip) { |
| 671 | if (font==null) |
| 672 | ip.fill(); |
| 673 | else { |
| 674 | ip.setFont(font); |
| 675 | ip.setAntialiasedText(antialiasedText); |
| 676 | int i=0, w=0; |
| 677 | while (i<MAX_LINES && theText[i]!=null) { |
| 678 | int w2 = ip.getStringWidth(theText[i]); |
| 679 | if (w2>w); |
| 680 | w = w2; |
| 681 | i++; |
| 682 | } |
| 683 | Rectangle r = ip.getRoi(); |
| 684 | if (w>r.width) { |
| 685 | r.width = w; |
| 686 | ip.setRoi(r); |
| 687 | } |
| 688 | ip.fill(); |
| 689 | } |
| 690 | } |
| 691 | |
| 692 | @Override |
| 693 | public void setLocation(int x, int y) { |
no test coverage detected