Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv24364/src/net/sourceforge/bprocessor/gl/view
Modified Files:
View.java
Log Message:
Minor improvement of selection-drawing
Index: View.java
===================================================================
RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/View.java,v
retrieving revision 1.195
retrieving revision 1.196
diff -C2 -d -r1.195 -r1.196
*** View.java 15 Mar 2007 15:06:21 -0000 1.195
--- View.java 21 Mar 2007 11:43:57 -0000 1.196
***************
*** 937,941 ****
while (highlightIter.hasNext()) {
Object o = highlightIter.next();
! if (!(o instanceof Surface)) {
drawGeometric((Geometric) o);
}
--- 937,941 ----
while (highlightIter.hasNext()) {
Object o = highlightIter.next();
! if (!(o instanceof Surface || o instanceof Edge)) {
drawGeometric((Geometric) o);
}
***************
*** 1503,1534 ****
* @param dodge dodge colors
*/
! public void drawGeneralEdges(Collection edges, boolean dodge) {
gl.glLineWidth(1.0f);
! gl.glColor3fv(lineColor, 0);
! Iterator iter = edges.iterator();
! while (iter.hasNext()) {
! Edge current = (Edge)iter.next();
! float[] color = (float[])colorMap.get(current);
! if (color != null) {
! gl.glColor3fv(color, 0);
! if (current.getStrippled()) {
! drawConstructor(current);
} else {
! drawEdge(current);
}
! gl.glColor3fv(lineColor, 0);
! } else if (current.getStrippled()) {
! gl.glColor3fv(constructorColor, 0);
drawConstructor(current);
- gl.glColor3fv(lineColor, 0);
} else {
- if (dodge) {
- gl.glColor3fv(GREY_LINE_COLOR, 0);
- }
drawEdge(current);
}
! if (dodge) {
! gl.glColor3fv(lineColor, 0);
! }
}
}
--- 1503,1534 ----
* @param dodge dodge colors
*/
! public void drawGeneralEdges(Collection<Edge> edges, boolean dodge) {
! Collection selection = Selection.primary();
gl.glLineWidth(1.0f);
! for (Edge current : edges) {
! float[] color = lineColor;
!
! if (selection.contains(current)) {
! color = SELECTED_COLOR;
! gl.glLineWidth(1.5f);
! } else {
! float[] individualColor = (float[])colorMap.get(current);
! if (individualColor != null) {
! color = individualColor;
} else {
! if (current.getStrippled()) {
! color = constructorColor;
! } else if (dodge) {
! color = GREY_LINE_COLOR;
! }
}
! }
! gl.glColor3fv(color, 0);
! if (current.getStrippled()) {
drawConstructor(current);
} else {
drawEdge(current);
}
! gl.glColor3fv(lineColor, 0);
}
}
|