Skip to content

Commit

Permalink
Fixed: sender photo wasn't circular
Browse files Browse the repository at this point in the history
  • Loading branch information
khalidwaleed0 committed Jun 12, 2022
1 parent 9067710 commit c8ffb67
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/MessengerBot/Overlay.java
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ public void setupOverlay() {
private ImageIcon getCircularImage() throws IOException {
BufferedImage mask = new BufferedImage(60, 60, BufferedImage.TYPE_INT_ARGB);
Graphics2D g2d = mask.createGraphics();
g2d.fillOval(0, 0, 55, 55);
g2d.fillOval(0, 0, 50, 50);
g2d.dispose();
BufferedImage masked = new BufferedImage(55, 55, BufferedImage.TYPE_INT_ARGB);
BufferedImage masked = new BufferedImage(50, 50, BufferedImage.TYPE_INT_ARGB);
g2d = masked.createGraphics();
g2d.drawImage(ImageIO.read(new File(Chat.Singleton().getPhotoPath())), 0, 0, null);
g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.DST_IN));
Expand Down

0 comments on commit c8ffb67

Please sign in to comment.