Skip to content

Commit e017b75

Browse files
Merge pull request #49 from Team319/add-2020-image
Add the 2020 field image and update a couple of colors
2 parents d313ecf + ba86019 commit e017b75

File tree

5 files changed

+8
-5
lines changed

5 files changed

+8
-5
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -160,3 +160,4 @@ src/main/java/frc/
160160

161161

162162
# End of https://www.gitignore.io/api/c++,java,linux,macos,gradle,windows,visualstudiocode
163+
.vscode/launch.json

src/main/java/com/team319/ui/DraggableWaypoint.java

+6-4
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ public class DraggableWaypoint implements MouseListener, MouseMotionListener {
1919

2020
static final int WAYPOINT_DIAMETER = 20;
2121
private static final int BUFFER_WIDTH = 10;
22-
private static final Color PURPLE = new Color(148, 0, 211);
22+
private static final Color PURPLE = new Color(102, 46, 145);
23+
private static final Color YELLOW = new Color(253, 184, 19);
24+
private static final Color BLACK = new Color(25, 25, 25);
2325

2426
private double x;
2527
private double y;
@@ -90,7 +92,7 @@ private void drawHighlight(Graphics2D gc) {
9092
private void drawPoint(Graphics2D gc) {
9193
int x = Plotter.convertXToPixel(getX());
9294
int y = Plotter.convertYToPixel(getY());
93-
gc.setColor(Color.BLACK);
95+
gc.setColor(BLACK);
9496
gc.fillOval(x - (WAYPOINT_DIAMETER / 2), y - (WAYPOINT_DIAMETER / 2), WAYPOINT_DIAMETER, WAYPOINT_DIAMETER);
9597
}
9698

@@ -99,7 +101,7 @@ private void drawTail(Graphics2D gc) {
99101
int y = Plotter.convertYToPixel(getY());
100102
int y2 = getTailY(y);
101103
int x2 = getTailX(x);
102-
gc.setColor(Color.BLACK);
104+
gc.setColor(BLACK);
103105
gc.fillOval(x2 - (WAYPOINT_DIAMETER / 3), y2 - (WAYPOINT_DIAMETER / 3), (int)(WAYPOINT_DIAMETER / 1.5), (int)(WAYPOINT_DIAMETER / 1.5));
104106
// gc.drawLine(x, y, x2, y2);
105107
}
@@ -110,7 +112,7 @@ private void drawRobot(Graphics2D gc) {
110112
int x = Plotter.convertXToPixel(getX());
111113
int y = Plotter.convertYToPixel(getY());
112114

113-
gc.setColor(Color.ORANGE);
115+
gc.setColor(YELLOW);
114116
gc.translate(x, y);
115117
gc.rotate(-heading);
116118
gc.draw(new RoundRectangle2D.Double(-width / 2 , -height / 2, width, height, 10, 10));

src/main/java/com/team319/ui/Plotter.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
public class Plotter extends JPanel {
1919

2020
private static final long serialVersionUID = 1L;
21-
private static String fieldImage = "/field_image.png";
21+
private static String fieldImage = "/field_image_2020_large.png";
2222
private BufferedImage img;
2323
private static double scale;
2424
private int fieldHeight;
32.6 KB
Loading
52.1 KB
Loading

0 commit comments

Comments
 (0)