If the width of this line is less than or equal to one, draws the line. Otherwise draws the outline of the area of this line.
(ImageProcessor ip)
| 560 | /** If the width of this line is less than or equal to one, draws the line. |
| 561 | * Otherwise draws the outline of the area of this line. */ |
| 562 | public void drawPixels(ImageProcessor ip) { |
| 563 | boolean fillLine = getStrokeWidth()>1 && getWidth()<=1; |
| 564 | if (fillLine) |
| 565 | ip.setLineWidth((int)Math.round(getStrokeWidth())); |
| 566 | else |
| 567 | ip.setLineWidth(1); |
| 568 | double x = getXBase(); |
| 569 | double y = getYBase(); |
| 570 | x1d=getXBase()+x1R; y1d=getYBase()+y1R; x2d=getXBase()+x2R; y2d=getYBase()+y2R; |
| 571 | if (getStrokeWidth()<=1 || fillLine) { |
| 572 | ip.moveTo((int)Math.round(x1d), (int)Math.round(y1d)); |
| 573 | ip.lineTo((int)Math.round(x2d), (int)Math.round(y2d)); |
| 574 | } else { |
| 575 | Polygon p = getPolygon(); |
| 576 | ip.drawPolygon(p); |
| 577 | updateFullWindow = true; |
| 578 | } |
| 579 | } |
| 580 | |
| 581 | public boolean contains(int x, int y) { |
| 582 | if (getStrokeWidth()>1) { |
nothing calls this directly
no test coverage detected