Skip to content

Commit

Permalink
Use correct size when creating image. Relates to #231
Browse files Browse the repository at this point in the history
  • Loading branch information
weisJ committed Feb 22, 2021
1 parent 2bd096c commit 8fc941b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ public Image createImage(final Dimension size) {
ensureLoaded(false);
icon.setPreferredSize(size);
try {
BufferedImage bi = new BufferedImage(getIconWidth(), getIconHeight(), BufferedImage.TYPE_INT_ARGB);
BufferedImage bi = new BufferedImage(size.width, size.height, BufferedImage.TYPE_INT_ARGB);
Graphics2D g = (Graphics2D) bi.getGraphics();
g.setRenderingHint(
RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
Expand Down

0 comments on commit 8fc941b

Please sign in to comment.