/Users/lyon/j4p/src/sound/filterDesign/Pole.java

1    package sound.filterDesign; 
2     
3    // Decompiled by Jad v1.5.8c. Copyright 2001 Pavel Kouznetsov. 
4    // Jad home page: http://www.geocities.com/kpdus/jad.html 
5    // Decompiler options: packimports(3)  
6    // Source File Name:   Pole.java 
7     
8    import java.awt.*; 
9     
10   public class Pole extends Root { 
11    
12       public Pole() { 
13       } 
14    
15       public Pole(double d, double d1) { 
16           super(d, d1); 
17       } 
18    
19       public Pole(Pole pole) { 
20           super(pole); 
21       } 
22    
23       public Pole conj() { 
24           return new Pole(super.real, -super.imag); 
25       } 
26    
27       public String toString() { 
28           return "Pole at: " + super.real + "," + super.imag; 
29       } 
30    
31       public void draw(Graphics g, double d, double d1, int i, int j) { 
32           int k = (int) Math.rint( 
33                   (getReal() * (double) i) / (2D * d) + (double) (i / 2)); 
34           int l = (int) Math.rint( 
35                   (-getImag() * (double) j) / (2D * d1) + (double) (j / 2)); 
36           g.drawLine(k - 5, l - 5, k + 5, l + 5); 
37           g.drawLine(k + 5, l - 5, k - 5, l + 5); 
38           if (getImag() != 0.0D) { 
39               g.drawLine(k - 5, (j - l) + 4, k + 5, j - l - 6); 
40               g.drawLine(k + 5, (j - l) + 4, k - 5, j - l - 6); 
41           } 
42       } 
43   } 
44