[Bprocessor-commit] gl/src/net/sourceforge/bprocessor/gl/view View.java, 1.276, 1.277
Status: Pre-Alpha
Brought to you by:
henryml
From: Michael L. <he...@us...> - 2008-01-15 15:43:39
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv15194/src/net/sourceforge/bprocessor/gl/view Modified Files: View.java Log Message: new selection impl Index: View.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/View.java,v retrieving revision 1.276 retrieving revision 1.277 diff -C2 -d -r1.276 -r1.277 *** View.java 14 Jan 2008 14:00:17 -0000 1.276 --- View.java 15 Jan 2008 15:43:36 -0000 1.277 *************** *** 1642,1646 **** * @return All geometry in the selection */ ! private Set getAllGeometryInSelection() { Set selection = new HashSet(); int bufferOffset = 0; --- 1642,1646 ---- * @return All geometry in the selection */ ! private Collection getAllGeometryInSelection() { Set selection = new HashSet(); int bufferOffset = 0; *************** *** 1668,1687 **** * @return The objects in the area */ ! public Set getObjectInArea(double x1, double y1, double x2, double y2) { double x = (x1 - x2); double y = (y1 - y2); - // save default selection box int[] tempsize = selectionSize; - // set new selection size selectionSize = new int[] {(int)Math.abs(x) < 6 ? 6 : (int)Math.abs(x), (int)Math.abs(y) < 6 ? 6 : (int)Math.abs(y)}; - // Do selection on vertices this.x = x1 - (x / 2); this.y = y1 - (y / 2); picking = 10; editor.repaint(true); ! Set selection = getAllGeometryInSelection(); ! //restore default selection box selectionSize = tempsize; return selection; --- 1668,1683 ---- * @return The objects in the area */ ! public Collection getObjectInArea(double x1, double y1, double x2, double y2) { double x = (x1 - x2); double y = (y1 - y2); int[] tempsize = selectionSize; selectionSize = new int[] {(int)Math.abs(x) < 6 ? 6 : (int)Math.abs(x), (int)Math.abs(y) < 6 ? 6 : (int)Math.abs(y)}; this.x = x1 - (x / 2); this.y = y1 - (y / 2); picking = 10; editor.repaint(true); ! Collection selection = getAllGeometryInSelection(); selectionSize = tempsize; return selection; |