def __getattr__(self, attribute): """ Get an attribute. See L{SVGElement.__getattr__} for more information, as this function passes on unresolved attributes to it. @type attribute: string @param attribute: The attribute being requested. @rtype: string @return: The requested attribute. """ if attribute == "start": x1 = SVGElement.__getattr__(self, "x1") y1 = SVGElement.__getattr__(self, "y1") return [x1, y1] if attribute == "stop": x2 = SVGElement.__getattr__(self, "x2") y2 = SVGElement.__getattr__(self, "y2") return [x2, y2] try: return StrokedElement.__getattr__(self, attribute) except: return SVGElement.__getattr__(self, attribute)
def __getattr__(self, attribute): """ Get an attribute. See L{SVGElement.__getattr__} for more information, as this function passes on unresolved attributes to it. @type attribute: string @param attribute: The attribute being requested. @rtype: string @return: The requested attribute. """ if attribute == "color": color = get_color(self, SVGElement, "stop-color", "stop-opacity") if color: return color return SVGElement.__getattr__(self, attribute)