示例#1
0
    def fromXml(self,root):
	el = None
	tw = TreeWalker(root)
	if root.getNodeName() == "sym_props":
	    el = root
	else:
	    el = tw.getNextElement("sym_props")
	color = GraphicElement.parseColorProperty(el.getAttribute("color"))
	size = string.atoi(el.getAttribute("size"))
	filled = string.atoi(el.getAttribute("filled"))
	shape = el.getAttribute("shape")
	self.__init__(shape,color,size,filled)
示例#2
0
 def fromXml(self, root):
     el = None
     tw = TreeWalker(root)
     if root.getNodeName() == "sym_props":
         el = root
     else:
         el = tw.getNextElement("sym_props")
     color = GraphicElement.parseColorProperty(el.getAttribute("color"))
     size = string.atoi(el.getAttribute("size"))
     filled = string.atoi(el.getAttribute("filled"))
     shape = el.getAttribute("shape")
     self.__init__(shape, color, size, filled)
示例#3
0
    def fromXml(self,root):
	el = None
	tw = TreeWalker(root)
	if root.getNodeName() == "curve_props":
	    el = root
	else:
	    el = tw.getNextElement("curve_props")
	self.color = GraphicElement.parseColorProperty(el.getAttribute("color"))
	self.thickness = string.atoi(el.getAttribute("thickness"))
	self.draw_symbol = string.atoi(el.getAttribute("draw_symbol"))
	self.data_per_symbol = string.atoi(el.getAttribute("data_per_symbol"))
	if el.getAttribute("dash_type") != "":
	    self.dash_type = el.getAttribute("dash_type")
	else:
	    self.dash_type = "plain"
	self.sym_prop.fromXml(root)
示例#4
0
 def fromXml(self, root):
     el = None
     tw = TreeWalker(root)
     if root.getNodeName() == "curve_props":
         el = root
     else:
         el = tw.getNextElement("curve_props")
     self.color = GraphicElement.parseColorProperty(
         el.getAttribute("color"))
     self.thickness = string.atoi(el.getAttribute("thickness"))
     self.draw_symbol = string.atoi(el.getAttribute("draw_symbol"))
     self.data_per_symbol = string.atoi(el.getAttribute("data_per_symbol"))
     if el.getAttribute("dash_type") != "":
         self.dash_type = el.getAttribute("dash_type")
     else:
         self.dash_type = "plain"
     self.sym_prop.fromXml(root)