/[fenfire]/fenfire/org/fenfire/fenmm/MMTextCursor.java
ViewVC logotype

Diff of /fenfire/org/fenfire/fenmm/MMTextCursor.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by humppake, Tue Aug 26 09:40:36 2003 UTC revision 1.5 by humppake, Wed Aug 27 18:46:34 2003 UTC
# Line 127  public class MMTextCursor { Line 127  public class MMTextCursor {
127          this.length = 0;          this.length = 0;
128      }      }
129    
130      public void render(VobScene vs, int into, TextPlaceable p) {      public void render(VobScene vs, int into, int matchCS, TextPlaceable p) {
131          render(vs, into, 0, p);          render(vs, into, matchCS, -1, p);
132      }      }
133      public void render(VobScene vs, int matchCS, int zoomPanCS, TextPlaceable p) {      public void render(VobScene vs, int into, int matchCS, int matchParentCS, TextPlaceable p) {
134          setTextPlaceable(p);          setTextPlaceable(p);
135    
136          float cursorXY[] = new float[2];          float cursorXY[] = new float[2];
137          this.p.getCursorXY(offset, cursorXY);          this.p.getCursorXY(offset, cursorXY);
138    
139          int nodeCS;          int nodeCS = 0;
140          int cursorCS;          int cursorCS = 0;
141          if (zoomPanCS > 0) {          if (matchParentCS == -1) {
142              cursorCS = vs.coords.ortho(zoomPanCS, -1000,              cursorCS = vs.coords.ortho(into, -1000,
143                                             -p.getWidth()/2 + cursorXY[0],                                         -p.getWidth()/2 + cursorXY[0],
144                                             -p.getHeight()/2 + cursorXY[1],                                         -p.getHeight()/2 + cursorXY[1],
145                                             1, -style.getHeight(scale));                                         1, -style.getHeight(scale));
146              vs.matcher.add(matchCS, cursorCS, "CURSOR");              vs.matcher.add(matchCS, cursorCS, "CURSOR");
147          } else {          } else {
148              if (matchCS > 0) nodeCS = vs.matcher.getCS(matchCS, accursed);              nodeCS = vs.matcher.getCS(matchParentCS, accursed);
             else nodeCS = vs.matcher.getCS(accursed);  
149              float nodeXY[] = {0f, 0f, 0f};              float nodeXY[] = {0f, 0f, 0f};
150              vs.coords.transformPoints3(nodeCS, nodeXY, nodeXY);              vs.coords.transformPoints3(nodeCS, nodeXY, nodeXY);
151                    
152              cursorCS = vs.orthoCS(matchCS, "CURSOR", -1000,              cursorCS = vs.coords.ortho(into, -1000,
153                                        nodeXY[0] + cursorXY[0],                                        nodeXY[0] + cursorXY[0],
154                                        nodeXY[1] + cursorXY[1],                                        nodeXY[1] + cursorXY[1],
155                                        1, -style.getHeight(scale));                                        1, -style.getHeight(scale));
156                vs.matcher.add(matchCS, cursorCS, "CURSOR");
157          }          }
158    
159          float points[] = {0,0,0,0,1,0};          float points[] = {0,0,0,0,1,0};

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26