| 183 | protected void showCompleteDrag(Box start, Box end) { |
| 184 | this.properties.putToMap(frameDrawing, "__ongoingDrag__", (box) -> { |
| 185 | |
| 186 | Rect f1 = frame(start); |
| 187 | Rect f2 = frame(end); |
| 188 | |
| 189 | |
| 190 | FLine m = TopologyBox.thickenArc(TopologyBox.arc(f1, f2), f1, f2); |
| 191 | |
| 192 | boolean selected = true; |
| 193 | |
| 194 | float o = -0.5f; |
| 195 | |
| 196 | m.attributes.put(fillColor, selected ? new Vec4(1, 1, 1, 1.0f * o) : new Vec4(1, 1, 1, 0.75f * o)); |
| 197 | m.attributes.put(strokeColor, selected ? new Vec4(1, 1, 1, 0.5f * o) : new Vec4(1, 1, 1, 0.25f * o)); |
| 198 | m.attributes.put(thicken, new BasicStroke(selected ? 3 : 0.5f, BasicStroke.CAP_SQUARE, BasicStroke.JOIN_MITER)); |
| 199 | |
| 200 | m.attributes.put(filled, true); |
| 201 | m.attributes.put(stroked, true); |
| 202 | |
| 203 | return m; |
| 204 | }); |
| 205 | Drawing.dirty(this); |
| 206 | } |
| 207 | |
| 208 | protected Rect frame(Box hitBox) { |
| 209 | return hitBox.properties.get(frame); |
| 210 | } |
| 211 | |