| 144 | protected void showIncompleteDrag(Box start, Vec2 to) { |
| 145 | this.properties.putToMap(frameDrawing, "__ongoingDrag__", (box) -> { |
| 146 | |
| 147 | Rect f1 = frame(start); |
| 148 | |
| 149 | FLine m = TopologyBox.thickenArc(TopologyBox.arc(f1, new Rect(to.x - 10, to.y - 10, 20, 20)), f1, new Rect(to.x - 10, to.y - 10, 20, 20)); |
| 150 | |
| 151 | boolean selected = false; |
| 152 | |
| 153 | float o = -0.5f; |
| 154 | |
| 155 | m.attributes.put(fillColor, selected ? new Vec4(1, 1, 1, 1.0f * o) : new Vec4(1, 1, 1, 0.5f * o)); |
| 156 | m.attributes.put(strokeColor, selected ? new Vec4(1, 1, 1, 0.25f * o) : new Vec4(1, 1, 1, 0.1f * o)); |
| 157 | m.attributes.put(thicken, new BasicStroke(selected ? 3 : 0.5f, BasicStroke.CAP_SQUARE, BasicStroke.JOIN_MITER)); |
| 158 | |
| 159 | m.attributes.put(filled, true); |
| 160 | m.attributes.put(stroked, true); |
| 161 | |
| 162 | m.rect(to.x - 10, to.y - 10, 20, 20); |
| 163 | |
| 164 | return m; |
| 165 | }); |
| 166 | Drawing.dirty(this); |
| 167 | } |
| 168 | |
| 169 | protected float order(Rect r) { |
| 170 | return Math.abs(r.w) + Math.abs(r.h); |
| 171 | } |
| 172 | |