Esempio n. 1
0
def getGeometryOutput(xmlElement):
    "Get vector3 vertexes from attribute dictionary."
    fontFamily = evaluate.getEvaluatedStringDefault('Gentium Basic Regular',
                                                    'font-family', xmlElement)
    fontFamily = evaluate.getEvaluatedStringDefault(fontFamily, 'fontFamily',
                                                    xmlElement)
    fontSize = evaluate.getEvaluatedFloatDefault(12.0, 'font-size', xmlElement)
    fontSize = evaluate.getEvaluatedFloatDefault(fontSize, 'fontSize',
                                                 xmlElement)
    textString = evaluate.getEvaluatedStringDefault(xmlElement.text, 'text',
                                                    xmlElement)
    if textString == '':
        print('Warning, textString is empty in getGeometryOutput in text for:')
        print(xmlElement)
        return []
    geometryOutput = []
    for textComplexLoop in svg_reader.getTextComplexLoops(
            fontFamily, fontSize, textString):
        textComplexLoop.reverse()
        vector3Path = euclidean.getVector3Path(textComplexLoop)
        sideLoop = lineation.SideLoop(vector3Path, None, None)
        sideLoop.rotate(xmlElement)
        geometryOutput += lineation.getGeometryOutputByManipulation(
            sideLoop, xmlElement)
    return geometryOutput
Esempio n. 2
0
File: text.py Progetto: Sciumo/SFACT
def getGeometryOutput(derivation, xmlElement):
	"""Get vector3 vertexes from attribute dictionary."""
	if derivation is None:
		derivation = TextDerivation(xmlElement)
	if derivation.textString == '':
		print('Warning, textString is empty in getGeometryOutput in text for:')
		print(xmlElement)
		return []
	geometryOutput = []
	for textComplexLoop in svg_reader.getTextComplexLoops(derivation.fontFamily, derivation.fontSize, derivation.textString):
		textComplexLoop.reverse()
		vector3Path = euclidean.getVector3Path(textComplexLoop)
		sideLoop = lineation.SideLoop(vector3Path, None, None)
		sideLoop.rotate(xmlElement)
		geometryOutput += lineation.getGeometryOutputByManipulation(sideLoop, xmlElement)
	return geometryOutput
Esempio n. 3
0
def getGeometryOutput(derivation, elementNode):
	"Get vector3 vertexes from attributes."
	if derivation == None:
		derivation = TextDerivation(elementNode)
	if derivation.textString == '':
		print('Warning, textString is empty in getGeometryOutput in text for:')
		print(elementNode)
		return []
	geometryOutput = []
	for textComplexLoop in svg_reader.getTextComplexLoops(derivation.fontFamily, derivation.fontSize, derivation.textString):
		textComplexLoop.reverse()
		vector3Path = euclidean.getVector3Path(textComplexLoop)
		sideLoop = lineation.SideLoop(vector3Path)
		sideLoop.rotate(elementNode)
		geometryOutput += lineation.getGeometryOutputByManipulation(elementNode, sideLoop)
	return geometryOutput
Esempio n. 4
0
def getGeometryOutput(derivation, elementNode):
	"Get vector3 vertexes from attributes."
	if derivation == None:
		derivation = TextDerivation(elementNode)
	if derivation.textString == '':
		print('Warning, textString is empty in getGeometryOutput in text for:')
		print(elementNode)
		return []
	geometryOutput = []
	for textComplexLoop in svg_reader.getTextComplexLoops(derivation.fontFamily, derivation.fontSize, derivation.textString):
		textComplexLoop.reverse()
		vector3Path = euclidean.getVector3Path(textComplexLoop)
		sideLoop = lineation.SideLoop(vector3Path, None, None)
		sideLoop.rotate(elementNode)
		geometryOutput += lineation.getGeometryOutputByManipulation(elementNode, sideLoop)
	return geometryOutput
Esempio n. 5
0
def getGeometryOutput(xmlElement):
	"Get vector3 vertexes from attribute dictionary."
	fontFamily = evaluate.getEvaluatedStringDefault('Gentium Basic Regular', 'font-family', xmlElement)
	fontFamily = evaluate.getEvaluatedStringDefault(fontFamily, 'fontFamily', xmlElement)
	fontSize = evaluate.getEvaluatedFloatDefault(12.0, 'font-size', xmlElement)
	fontSize = evaluate.getEvaluatedFloatDefault(fontSize, 'fontSize', xmlElement)
	textString = evaluate.getEvaluatedStringDefault(xmlElement.text, 'text', xmlElement)
	if textString == '':
		print('Warning, textString is empty in getGeometryOutput in text for:')
		print(xmlElement)
		return []
	geometryOutput = []
	for textComplexLoop in svg_reader.getTextComplexLoops(fontFamily, fontSize, textString):
		textComplexLoop.reverse()
		vector3Path = euclidean.getVector3Path(textComplexLoop)
		sideLoop = lineation.SideLoop(vector3Path, None, None)
		sideLoop.rotate(xmlElement)
		geometryOutput += lineation.getGeometryOutputByManipulation(sideLoop, xmlElement)
	return geometryOutput