示例#1
0
文件: stage.py 项目: pombredanne/kaa
    def candyxml(self, data):
        """
        Load a candyxml file based on the given screen resolution.

        @param data: filename of the XML file to parse or XML data
        @returns: root element attributes and dict of parsed elements
        """
        return candyxml.parse(data, (self.width, self.height))
示例#2
0
文件: stage.py 项目: freevo/kaa-candy
    def candyxml(self, data):
        """
        Load a candyxml file based on the given screen resolution.

        @param data: filename of the XML file to parse or XML data
        @returns: root element attributes and dict of parsed elements
        """
        attr, templates = candyxml.parse(data)
        if 'geometry' in attr:
            self.set_content_geometry(attr['geometry'])
        return attr, templates
示例#3
0
    def candyxml(self, data):
        """
        Load a candyxml file based on the given screen resolution.

        @param data: filename of the XML file to parse or XML data
        @returns: root element attributes and dict of parsed elements
        """
        attr, templates = candyxml.parse(data)
        if 'geometry' in attr:
            self.set_content_geometry(attr['geometry'])
        return attr, templates