135 |
DefaultVobMatcher m = (DefaultVobMatcher)vs.matcher; |
DefaultVobMatcher m = (DefaultVobMatcher)vs.matcher; |
136 |
int cs = m.getCS(mainFrame, "C2F"); |
int cs = m.getCS(mainFrame, "C2F"); |
137 |
int csinv = m.getCS(mainFrame, "C2FINV"); |
int csinv = m.getCS(mainFrame, "C2FINV"); |
138 |
|
// The point is that cs should transform (panx, pany) to (0,0) |
139 |
|
// and (panx+1, pany+1) to (zoom, zoom) |
140 |
|
// and csinv should be the inverse of this. |
141 |
vs.coords.setOrthoParams(cs, 0, -panx*zoom, -pany*zoom, zoom, zoom); |
vs.coords.setOrthoParams(cs, 0, -panx*zoom, -pany*zoom, zoom, zoom); |
142 |
vs.coords.setOrthoParams(csinv, 0, panx, pany, 1/zoom, 1/zoom); |
vs.coords.setOrthoParams(csinv, 0, panx, pany, 1/zoom, 1/zoom); |
143 |
} |
} |
173 |
// c2fCS = Canvas to frame, i.e. |
// c2fCS = Canvas to frame, i.e. |
174 |
// the transformation from canvas coordinates |
// the transformation from canvas coordinates |
175 |
// to frame coordinates. Used for panning and zooming. |
// to frame coordinates. Used for panning and zooming. |
176 |
|
// |
177 |
|
// The parameters for coordinate systems are set in setZoomPan. |
178 |
|
// |
179 |
// Now, it is important that it is |
// Now, it is important that it is |
180 |
// 1) transformation-descended from 0, since it is |
// 1) transformation-descended from 0, since it is |
181 |
// just the pan-zoom part |
// just the pan-zoom part |