private int calculateLineWidth(int displayWidth) {
		// Crunch or stretch spacing depending upon width and maximum depth
		int lineWidth = DEFAULT_LINE_SPACING;
		int maxDepth = plugin.getMaxDepth();

		if (maxDepth >= 0) {
			int availabeWidth = displayWidth - FlowArrowPlugin.LEFT_OFFSET;
			lineWidth = (int) (availabeWidth * ARROW_SPACING_RATIO);
		}
		if (lineWidth < MIN_LINE_SPACING) {
			lineWidth = MIN_LINE_SPACING;
		}
		else if (lineWidth > MAX_LINE_SPACING) {
			lineWidth = MAX_LINE_SPACING;
		}

		return lineWidth;
	}
Call when the screen moves so that the shape can be updated
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/flowarrow/FlowArrow.java