seamless_pattern.py revision 7248fa4c08eceb1285894cfebca59b619e25dec4
# Written by Jabiertxof
# V.06
self.OptionParser.add_option("-w", "--width", action="store", type="int", dest="desktop_width", default="100", help="Custom width")
self.OptionParser.add_option("-z", "--height", action="store", type="int", dest="desktop_height", default="100", help="Custom height")
return;
xpathStr = '//svg:rect[@id="clipPathRect"]'
if clipPathRect != []:
xpathStr = '//svg:pattern[@id="Checkerboard"]'
if designZoneData != []:
if factor <= 1:
else:
xpathStr = '//svg:g[@id="designTop"] | //svg:g[@id="designBottom"]'
if designZone != []:
xpathStr = '//svg:g[@id="designTop"]/child::*'
if designZoneData != []:
if factor <= 1:
else:
xpathStr = '//svg:g[@id="textPreview"]'
if previewText != []:
if factor <= 1:
previewText[0].set("transform", "translate(" + str(width * 2) + ",0) scale(" + str(width/100.0) + "," + str((height/100.0) * factor) + ")")
else:
previewText[0].set("transform", "translate(" + str(width * 2) + ",0) scale(" + str((width/100.0)/factor) + "," + str(height/100.0) + ")")
xpathStr = '//svg:g[@id="infoGroup"]'
if infoGroup != []:
if factor <= 1:
infoGroup[0].set("transform", "scale(" + str(width/100.0) + "," + str((height/100.0) * factor) + ")")
else:
infoGroup[0].set("transform", "scale(" + str(width/1000.0) + "," + str((height/1000.0) * factor) + ")")
xpathStr = '//svg:use[@id="top1"] | //svg:use[@id="bottom1"]'
if pattern1 != []:
xpathStr = '//svg:use[@id="top2"] | //svg:use[@id="bottom2"]'
if pattern2 != []:
xpathStr = '//svg:use[@id="top3"] | //svg:use[@id="bottom3"]'
if pattern3 != []:
xpathStr = '//svg:use[@id="top4"] | //svg:use[@id="bottom4"]'
if pattern4 != []:
xpathStr = '//svg:use[@id="top5"] | //svg:use[@id="bottom5"]'
if pattern5 != []:
xpathStr = '//svg:use[@id="top6"] | //svg:use[@id="bottom6"]'
if pattern6 != []:
xpathStr = '//svg:use[@id="top7"] | //svg:use[@id="bottom7"]'
if pattern7 != []:
xpathStr = '//svg:use[@id="top8"] | //svg:use[@id="bottom8"]'
if pattern8 != []:
xpathStr = '//svg:use[@id="top9"] | //svg:use[@id="bottom9"]'
if pattern9 != []:
xpathStr = '//svg:use[@id="clonePreview1"]'
if clonePreview1 != []:
xpathStr = '//svg:use[@id="clonePreview2"]'
if clonePreview2 != []:
xpathStr = '//svg:use[@id="clonePreview3"]'
if clonePreview3 != []:
xpathStr = '//svg:use[@id="clonePreview4"]'
if clonePreview4 != []:
xpathStr = '//svg:use[@id="clonePreview5"]'
if clonePreview5 != []:
xpathStr = '//svg:use[@id="clonePreview6"]'
if clonePreview6 != []:
xpathStr = '//svg:use[@id="clonePreview7"]'
if clonePreview7 != []:
xpathStr = '//svg:use[@id="clonePreview8"]'
if clonePreview8 != []:
xpathStr = '//svg:use[@id="fullPatternClone"]'
if patternGenerator != []:
if namedview is None:
c = C()
c.affect()