Skip to content

Commit

Permalink
Draw target feedback box with better graphics calculation
Browse files Browse the repository at this point in the history
- This was awry on Mac
  • Loading branch information
Phillipus committed Feb 18, 2024
1 parent ad24769 commit f5721e0
Showing 1 changed file with 3 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,19 +112,10 @@ protected void drawTargetFeedback(Graphics graphics) {
}

Rectangle bounds = getBounds().getCopy();

// Scaling
double scale = FigureUtils.getFigureScale(this);
if(scale == 1.5) {
bounds.width--;
bounds.height--;
}
else if(scale < 1) {
bounds.width -= 2;
bounds.height -= 2;
}

bounds.width--;
bounds.height--;
bounds.shrink(1, 1);

graphics.setForegroundColor(ColorConstants.blue);
graphics.setLineWidth(2);
graphics.drawRectangle(bounds);
Expand Down

0 comments on commit f5721e0

Please sign in to comment.