def _get_anchor_data(anchor_data, ufo, components, anchor_name):
anchors = []<EOL>for component in components:<EOL><INDENT>for anchor in ufo[component.baseGlyph].anchors:<EOL><INDENT>if anchor.name == anchor_name:<EOL><INDENT>anchors.append((anchor, component))<EOL>break<EOL><DEDENT><DEDENT><DEDENT>if len(anchors) > <NUM_LIT:1>:<EOL><INDENT>for i, (anchor, component) in enumerate(anchors):<EOL><INDENT>t = Transform(*component.transformation)<EOL>name = "<STR_LIT>" % (anchor.name, i + <NUM_LIT:1>)<EOL>anchor_data[name] = t.transformPoint((anchor.x, anchor.y))<EOL><DEDENT><DEDENT>elif anchors:<EOL><INDENT>anchor, component = anchors[<NUM_LIT:0>]<EOL>t = Transform(*component.transformation)<EOL>anchor_data[anchor.name] = t.transformPoint((anchor.x, anchor.y))<EOL><DEDENT>
Get data for an anchor from a list of components.