Skip to content

Commit

Permalink
Map improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
xpdota committed Jul 22, 2022
1 parent 946dbba commit 35ec898
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions xivsupport/src/main/java/gg/xp/xivsupport/gui/map/MapPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -609,17 +609,20 @@ public void paintComponent(Graphics graph) {
AffineTransform newTrans = new AffineTransform(origTrans);
Rectangle bounds = getBounds();
newTrans.translate(bounds.width / 2.0, bounds.height / 2.0);
newTrans.rotate(facing);
newTrans.rotate(-1.0 * facing);
g.setTransform(newTrans);
g.setColor(mainColor);
// g.setColor(new Color(255, 0, 0));
int sizeBasis = Math.min(bounds.width, bounds.height);

g.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_ON);
Polygon poly = new Polygon(
new int[]{0, (int) (sizeBasis / -3.3), (int) (sizeBasis / 3.3)},
new int[]{(int) (sizeBasis / 2.2), (int) (sizeBasis / -2.2), sizeBasis / -2},
3);
new int[]{0, (int) (sizeBasis / -3.6), 0, (int) (sizeBasis / 3.6)},
new int[]{(int) (sizeBasis / 2.2), (int) (sizeBasis / -2.8), (int) (sizeBasis / -5.0), (int) (sizeBasis / -2.8)},
4);
g.fillPolygon(poly);
g.setColor(mainColor.darker().darker());
g.drawPolygon(poly);
// g.setColor(new Color(0, 255, 0));
// g.fillRect(sizeBasis / -8, sizeBasis / -2, sizeBasis / 8, sizeBasis / 2);
g.setTransform(origTrans);
Expand Down

0 comments on commit 35ec898

Please sign in to comment.