15 |
*/ |
*/ |
16 |
public class UniquePaperVob extends AbstractVob { |
public class UniquePaperVob extends AbstractVob { |
17 |
public static final String rcsid = "$Id$"; |
public static final String rcsid = "$Id$"; |
18 |
public static boolean dbg = false; |
public static boolean dbg = true; |
19 |
private static void pa(String s) { System.out.println("UniquePaperVob::"+s); } |
private static void pa(String s) { System.out.println("UniquePaperVob::"+s); } |
20 |
|
|
21 |
|
|
69 |
|
|
70 |
if (a > Math.PI/4 && a <= Math.PI *3f/4) { |
if (a > Math.PI/4 && a <= Math.PI *3f/4) { |
71 |
// verticals.. |
// verticals.. |
72 |
f = mx + mw/2 - panx*zoom; |
f = mx + mw/2 + panx*zoom; |
73 |
|
|
74 |
// >> if too far we have to be at least mw away from mx. |
// >> if too far we have to be at least mw away from mx. |
75 |
while ( f < mx - 2*mw) { |
while ( f < mx - 2*mw) { |
93 |
} else { |
} else { |
94 |
j = (float)Math.sin(k - Math.PI/2); |
j = (float)Math.sin(k - Math.PI/2); |
95 |
// horizontals.. |
// horizontals.. |
96 |
f = my + mh/2 - pany*zoom; |
f = my + mh/2 + pany*zoom; |
97 |
|
|
98 |
// >> if too far we have to be at least mw away from my. |
// >> if too far we have to be at least mw away from my. |
99 |
while ( f < my - 2*mh) { |
while ( f < my - 2*mh) { |
101 |
f += Math.abs( (((1-ratio) * linew)/j)*zoom ); |
f += Math.abs( (((1-ratio) * linew)/j)*zoom ); |
102 |
} |
} |
103 |
// add x component |
// add x component |
104 |
f += (panx*zoom)*(float)Math.tan(a); |
f -= (panx*zoom)*(float)Math.tan(a); |
105 |
|
|
106 |
if (a < Math.PI/4) |
if (a < Math.PI/4) |
107 |
f += (mw/2)*(float)Math.tan(a); |
f += (mw/2)*(float)Math.tan(a); |