def _parse_xdot_directive(self, name, new):
parser = XdotAttrParser()<EOL>components = parser.parse_xdot_data(new)<EOL>x1 = min( [c.x for c in components] )<EOL>y1 = min( [c.y for c in components] )<EOL>print("<STR_LIT>", name, x1, y1)<EOL><INDENT>move_to_origin( components )<EOL><DEDENT>for c in components:<EOL><INDENT>if isinstance(c, Ellipse):<EOL><INDENT>component.x_origin -= x1<EOL>component.y_origin -= y1<EOL><INDENT>c.position = [ c.x - x1, c.y - y1 ]<EOL><DEDENT><DEDENT>elif isinstance(c, (Polygon, BSpline)):<EOL><INDENT>print("<STR_LIT>", c.points)<EOL>c.points = [ (t[<NUM_LIT:0>] - x1, t[<NUM_LIT:1>] - y1) for t in c.points ]<EOL>print("<STR_LIT>", c.points)<EOL><DEDENT>elif isinstance(c, Text):<EOL><INDENT>font = str_to_font( str(c.pen.font) )<EOL>
Handles parsing Xdot drawing directives.