-
Notifications
You must be signed in to change notification settings - Fork 0
/
Arco.java
executable file
·52 lines (45 loc) · 1.06 KB
/
Arco.java
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
43
44
45
46
47
48
49
50
51
52
package MP;
import java.awt.*;
import java.awt.event.*;
import java.awt.image.*;
import javax.swing.*;
import java.awt.geom.*;
public abstract class Arco extends Figuras{
public int axi, ayi, w, h;
public Arco(){
}
public abstract void pintar(Graphics2D grafico, Color color, int a, Color color2,Lienzo l );
public void dimenciones(){
if (xi>xf){
if (yi>yf){
axi = xf;
ayi = yf;
w = xi-xf;
h = yi-yf;
}
else{
axi = xf;
ayi = yi;
w = xi-xf;
h = yf-yi;
}
}
else{
if (yi>yf){
axi = xi;
ayi = yf;
w = xf-xi;
h = yi-yf;
}
else{
axi = xi;
ayi = yi;
w = xf-xi;
h = yf-yi;
}
}
}
public String toString(){
return "Arco ";
}
}