I did it generating html code, using the width, height, left, right, x and y attributes of process diagrams and nodes.
I dont know the direct answer, but you could definitely figure this out by starting with your jsf console and working backwards.
Try starting with:
I believe in the jsf console, this is what renders the process. Work back from there.