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

Method drawName

src/main/java/fieldbox/boxes/plugins/BoxGroup.java:329–339  ·  view source on GitHub ↗
(Rect r)

Source from the content-addressed store, hash-verified

327 }
328
329 private FLine drawName(Rect r) {
330 FLine f = new FLine().moveTo(r.x + r.w / 2+2, r.y - 6);
331 f.attributes.put(StandardFLineDrawing.hasText, true);
332 f.attributes.put(StandardFLineDrawing.color, new Vec4(1, 1, 1, 0.5f));
333 f.last().attributes.put(StandardFLineDrawing.textAlign, 0.5f);
334 if (isCollapsed()) {
335 f.last().attributes.put(StandardFLineDrawing.text, this.properties.get(Box.name));
336 } else
337 f.last().attributes.put(StandardFLineDrawing.text, this.properties.get(Box.name));
338 return f;
339 }
340
341 private FLine drawNameBottom(Rect r) {
342 FLine f = new FLine().moveTo(r.x + r.w / 2, r.y +r.h/2+5);

Callers

nothing calls this directly

Calls 5

lastMethod · 0.95
isCollapsedMethod · 0.95
getMethod · 0.65
moveToMethod · 0.45
putMethod · 0.45

Tested by

no test coverage detected