Changeset 278 for trunk/src/org/expeditee/items/Line.java
- Timestamp:
- 08/25/08 15:19:25 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/items/Line.java
r247 r278 79 79 if (thick < 0) 80 80 setThickness(DEFAULT_THICKNESS); 81 else{ 82 refreshStroke(thick); 83 } 84 85 } 86 87 private void refreshStroke(float thick) { 88 int[] pattern = _start.getLinePattern(); 89 if (pattern == null) 90 pattern = _end.getLinePattern(); 91 92 if (pattern != null) { 93 float[] dash = new float[pattern.length]; 94 for (int i = 0; i < pattern.length; i++) 95 dash[i] = (float) pattern[i]; 96 _lineStroke = new BasicStroke(Math.max(thick, 97 MINIMUM_PAINT_THICKNESS), CAP, JOIN, 10f, dash, 0.0f); 98 } else { 99 _lineStroke = new BasicStroke(Math.max(thick, 100 MINIMUM_PAINT_THICKNESS), CAP, JOIN); 101 } 102 103 updatePolygon(); 81 104 } 82 105 … … 605 628 } 606 629 607 int[] pattern = _start.getLinePattern(); 608 if (pattern == null) 609 pattern = _end.getLinePattern(); 610 611 if (pattern != null) { 612 float[] dash = new float[pattern.length]; 613 for (int i = 0; i < pattern.length; i++) 614 dash[i] = (float) pattern[i]; 615 _lineStroke = new BasicStroke(Math.max(thick, 616 MINIMUM_PAINT_THICKNESS), CAP, JOIN, 10f, dash, 0.0f); 617 } else { 618 _lineStroke = new BasicStroke(Math.max(thick, 619 MINIMUM_PAINT_THICKNESS), CAP, JOIN); 620 } 621 622 updatePolygon(); 630 refreshStroke(thick); 623 631 624 632 if (bigger)
Note:
See TracChangeset
for help on using the changeset viewer.