Rectangle getComponentRectangle(DataTypeComponent dtc) {
		if (bitFieldAllocation == null || dtc == null) {
			return null;
		}

		// compute rectangle which extends to byte boundary
		int offset = (dtc.getOffset() - allocationByteOffset);
		if (!bigEndian) {
			offset = allocationByteSize - offset - dtc.getLength();
		}
		int x = offset * byteWidth;
		int y = (2 * BYTE_SEPARATOR_THICKNESS) + CELL_HEIGHT;
		int width = (dtc.getLength() * byteWidth) + (2 * BYTE_SEPARATOR_THICKNESS);
		return new Rectangle(x, y, width, CELL_HEIGHT);
	}
Get rectangle which fully encompasses specified component bytes.
@param dtc data type component
@return component rectangle or null
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/compositeeditor/BitFieldPlacementComponent.java