Draw the symbol for the data point number 'pointIndex' (pointIndex < 0 when drawing the legend)
(PlotObject plotObject, int x, int y, int shape, int size, int pointIndex)
| 3536 | |
| 3537 | /** Draw the symbol for the data point number 'pointIndex' (pointIndex < 0 when drawing the legend) */ |
| 3538 | @AstroImageJ(reason = "Restore lineWidth for dots to support bolded datum and MP style; custom plot shapes", modified = true) |
| 3539 | void drawShape(PlotObject plotObject, int x, int y, int shape, int size, int pointIndex) { |
| 3540 | if (ip==null) |
| 3541 | return; |
| 3542 | int lineWidth = ip.getLineWidth(); |
| 3543 | int localLineWidth = lineWidth; |
| 3544 | if (shape == DIAMOND) |
| 3545 | size = (int)(size*1.21); |
| 3546 | if (plotObject.offScreenDisplacementArrowControl.xEnable && pointIndex >= 0 && |
| 3547 | !(shape == Plot.AIJ_V_MARKER || shape == Plot.AIJ_LEGEND_ENTRY)) { |
| 3548 | if (x<frame.x) { |
| 3549 | lineWidth = 2; |
| 3550 | ip.setLineWidth(2); |
| 3551 | size = 8; |
| 3552 | shape = ARROW_LEFT; |
| 3553 | if (y<frame.y) { |
| 3554 | shape = ARROW_NORTH_WEST; |
| 3555 | y = frame.y; |
| 3556 | } else if (y>=frame.y+frame.height) { |
| 3557 | shape = ARROW_SOUTH_WEST; |
| 3558 | y = frame.y+frame.height-1; |
| 3559 | } |
| 3560 | x = frame.x; |
| 3561 | } |
| 3562 | if (x>=frame.x+frame.width) { |
| 3563 | lineWidth = 2; |
| 3564 | ip.setLineWidth(2); |
| 3565 | size = 8; |
| 3566 | shape = ARROW_RIGHT; |
| 3567 | if (y<frame.y) { |
| 3568 | shape = ARROW_NORTH_EAST; |
| 3569 | y = frame.y; |
| 3570 | } else if (y>=frame.y+frame.height) { |
| 3571 | shape = ARROW_SOUTH_EAST; |
| 3572 | y = frame.y+frame.height-1; |
| 3573 | } |
| 3574 | x = frame.x+frame.width-1; |
| 3575 | } |
| 3576 | } |
| 3577 | if (plotObject.offScreenDisplacementArrowControl.yEnable && pointIndex >= 0 && |
| 3578 | !(shape == Plot.AIJ_V_MARKER || shape == Plot.AIJ_LEGEND_ENTRY)) { |
| 3579 | if (y<frame.y) { |
| 3580 | lineWidth = 2; |
| 3581 | ip.setLineWidth(2); |
| 3582 | size = 8; |
| 3583 | shape = ARROW_UP; |
| 3584 | if (x<frame.x) { |
| 3585 | shape = ARROW_NORTH_WEST; |
| 3586 | x=frame.x; |
| 3587 | } else if (x>=frame.x+frame.width) { |
| 3588 | shape = ARROW_NORTH_EAST; |
| 3589 | x=frame.x+frame.width-1; |
| 3590 | } |
| 3591 | y = frame.y; |
| 3592 | } |
| 3593 | if (y>=frame.y+frame.height) { |
| 3594 | lineWidth = 2; |
| 3595 | ip.setLineWidth(2); |
no test coverage detected