(Function<Box, FLine> wrap)
| 118 | } |
| 119 | |
| 120 | static public Function<Box, FLine> boxScale(Function<Box, FLine> wrap) { |
| 121 | return new Cached<Box, Object, FLine>((box, previously) -> { |
| 122 | Rect frame = box.properties.get(Box.frame); |
| 123 | if (frame == null) return null; |
| 124 | return wrap.apply(box) |
| 125 | .byTransforming((pos) -> new Vec3(frame.x + pos.x * frame.w, frame.y + pos.y * frame.h, pos.z)); |
| 126 | }, (box) -> new Pair<>(box.properties.get(frame), box.properties.isTrue(Mouse.isSelected, false))); |
| 127 | } |
| 128 | |
| 129 | static public Supplier<FLine> boxScale(Supplier<FLine> wrap, Box inside) { |
| 130 | return new Cached<Box, Object, FLine>((box, previously) -> { |
no test coverage detected