/[fenfire]/fenfire/org/fenfire/view/PageSpanLayout.java
ViewVC logotype

Diff of /fenfire/org/fenfire/view/PageSpanLayout.java

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

revision 1.17 by mudyc, Sat Jul 19 09:04:36 2003 UTC revision 1.18 by mudyc, Sat Jul 19 11:12:03 2003 UTC
# Line 229  public class PageSpanLayout Line 229  public class PageSpanLayout
229          Enfilade1D enf = null;          Enfilade1D enf = null;
230    
231          // Go into page where selection starts          // Go into page where selection starts
232          for (; p<pages.length; p++)          for (; p<pages.length; p++) {
233              if (x < xywh[4*p + 2] + w) break;              if (x < pages[p].getSize().width + w) break;
234                w += pages[p].getSize().width;
235            }
236    
237            w = 0;
238          for (; p<pages.length; p++) {          for (; p<pages.length; p++) {
239              // check y              // check y
240              if (y > xywh[4*p + 3]) throw new Error("Selection out of page,"+p+", y:"+y);              if (y > pages[p].getSize().height) throw new Error("Selection out of page,"+p+", y:"+y);
241              // check height              // check height
242              if (height > xywh[4*p + 3]) throw new Error("Selection out of page,"+p+", h:"+height);              if ((y + height) > pages[p].getSize().height) throw new Error("Selection out of page,"+p+", h:"+height);
243    
244              // everything ok, so get a clip from page for returning enfilade.              // everything ok, so get a clip from page for returning enfilade.
245              if (enf == null) {              if (enf == null) {
246                  w = (int)Math.min(wLeft, xywh[4*p + 2] - x);                  w = (int)Math.min(wLeft, pages[p].getSize().width - x);
247                  enf = new Enfilade1DImpl(pages[p].subArea(x,y, w, height));                  enf = new Enfilade1DImpl(pages[p].subArea(x,y, w, height));
248              } else {              } else {
249                  w = (int)Math.min(wLeft, xywh[4*p + 2]);                  w = (int)Math.min(wLeft, pages[p].getSize().width);
250                  Enfilade1D.Maker m = enf.getMaker();                  Enfilade1D.Maker m = enf.getMaker();
251                  enf.plus(m.makeEnfilade(pages[p].subArea(0,y, w, height)));                  enf.plus(m.makeEnfilade(pages[p].subArea(0,y, w, height)));
252              }              }

Legend:
Removed from v.1.17  
changed lines
  Added in v.1.18

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