MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / noError

Method noError

src/main/java/trace/graphics/Tops.kt:246–268  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

244 }
245
246 fun noError(b: Box) {
247 if (b.properties.get(FLineDrawing.frameDrawing) == null) return
248 b.properties.putToMap(FLineDrawing.frameDrawing, "__tops_error__", java.util.function.Function<Box, FLine> {
249
250 val frame = it.properties.get(Box.frame)
251
252 var f = FLine()
253
254 val shim = 5
255
256 val O = Math.max(20.0, Math.min(frame.w, frame.h) / 3.0);
257 f.moveTo((frame.x + frame.w + shim).toDouble(), (frame.y + frame.h - O - shim).toDouble())
258 f.lineTo((frame.x + frame.w + shim).toDouble(), (frame.y + frame.h + shim).toDouble())
259 f.lineTo((frame.x + frame.w - O - shim).toDouble(), (frame.y + frame.h + shim).toDouble())
260 f.lineTo((frame.x + frame.w + shim).toDouble(), (frame.y + frame.h - O - shim).toDouble())
261
262 f.attributes += StandardFLineDrawing.filled to true
263 f.attributes += StandardFLineDrawing.color to Vec4(Colors.executionColor.x, Colors.executionColor.y, Colors.executionColor.z, 0.3)
264 f.attributes += StandardFLineDrawing.strokeColor to Vec4(Colors.executionColor.x, Colors.executionColor.y, Colors.executionColor.z, 0.5)
265 f
266 })
267 (b.asMap_get("label") as MutableMap<String, String>).put("s", "")
268 }
269}

Callers

nothing calls this directly

Calls 10

FLineClass · 0.85
putToMapMethod · 0.80
getMethod · 0.65
asMap_getMethod · 0.65
Vec4Class · 0.50
putMethod · 0.45
maxMethod · 0.45
minMethod · 0.45
moveToMethod · 0.45
lineToMethod · 0.45

Tested by

no test coverage detected