-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRect.java
More file actions
42 lines (37 loc) · 1.12 KB
/
Copy pathRect.java
File metadata and controls
42 lines (37 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/* Gerard Ortega, 171668
I have not discussed the Java language code
in my program with anyone
other than my instructor or the teaching
assistants assigned to this course.
I have not used Java language code
obtained from another student, or
any other unauthorized source, either
modified or unmodified.
If any Java language
code or documentation used in my program was
obtained from another source, such as a text
book or course notes, those have been clearly
noted with a proper citation in the
comments of my code. */
import java.awt.*;
import java.awt.geom.*;
import javax.swing.*;
public class Rect extends BasicShape implements DrawingObject
{
private double width;
private double height;
public Rect(double x, double y, double w, double h, Color fillColor, Color awakenedFillColor)
{
super(x,y,fillColor);
awakenable = true;
this.awakenedFillColor = awakenedFillColor;
width = w;
height = h;
}
public void draw(Graphics2D g2d, AffineTransform reset)
{
Rectangle2D.Double rect = new Rectangle2D.Double(x,y,width,height);
drawShape(g2d,rect);
}
public void animate(){}
}