14 |
Add into VobCoorder the following convenience functions:: |
Add into VobCoorder the following convenience functions:: |
15 |
|
|
16 |
public int translate(int into, float x, float y) { |
public int translate(int into, float x, float y) { |
17 |
return coordsys(into, 0, x, y, 1, 1); |
return ortho(into, 0, x, y, 1, 1); |
18 |
} |
} |
19 |
|
|
20 |
public int translate(int into, float x, float y, float z) { |
public int translate(int into, float x, float y, float z) { |
21 |
return coordsys(into, z, x, y, 1, 1); |
return ortho(into, z, x, y, 1, 1); |
22 |
} |
} |
23 |
|
|
24 |
public int scale(int into, float x, float y) { |
public int scale(int into, float x, float y) { |
25 |
return coordsys(into, 0, 0, 0, x, y); |
return ortho(into, 0, 0, 0, x, y); |
26 |
} |
} |
27 |
|
|
28 |
|
and rename coordsys into ortho |
29 |
|
|
30 |
|
|
31 |
.. IMPORTANT:: |
.. IMPORTANT:: |
32 |
Should 3D scaling be here as well? |
Should 3D scaling be here as well? |
33 |
|
|
72 |
NotAffineVobCoorderException, which is a subclass of |
NotAffineVobCoorderException, which is a subclass of |
73 |
UnsupportedOperationException. |
UnsupportedOperationException. |
74 |
|
|
75 |
|
For all of the above calls which create coordinate systems, have also |
76 |
|
setParameter calls. This means, for x in translate, scale, rotate, |
77 |
|
orthoCoordsys, affineCoordsys, the coorder should also have a method |
78 |
|
|
79 |
|
abstract public void setXParams(int id, ...); |
80 |
|
|
81 |
|
for example, |
82 |
|
|
83 |
|
abstract public int ortho(int into, float x, float y, float w, float h); |
84 |
|
abstract public void setOrthoParams(int id, float x, float y, float w, float h); |
85 |
|
|
86 |
|
|
87 |
Transforming points into coordinate systems |
Transforming points into coordinate systems |
88 |
------------------------------------------- |
------------------------------------------- |
89 |
|
|