def recalc(self, doAll=True): for it in self.cvars.numeric.itervalues(): util.clampObj(self, it.name, it.minVal, it.maxVal) for el in self.types.itervalues(): for it in el.cvars.numeric.itervalues(): util.clampObj(el, it.name, it.minVal, it.maxVal) for it in self.cvars.stringLatin1.itervalues(): setattr(self, it.name, util.toInputStr(getattr(self, it.name))) for pf in self.pdfFonts.itervalues(): pf.refresh() # make sure usable space on the page isn't too small if doAll and (self.marginTop + self.marginBottom) >= (self.paperHeight - 100.0): self.marginTop = 0.0 self.marginBottom = 0.0 h = self.paperHeight - self.marginTop - self.marginBottom # how many lines on a page self.linesOnPage = int(h / util.getTextHeight(self.fontSize))
def recalc(self, doAll=True): for it in self.cvars.numeric.itervalues(): util.clampObj(self, it.name, it.minVal, it.maxVal) for el in self.types.itervalues(): for it in el.cvars.numeric.itervalues(): util.clampObj(el, it.name, it.minVal, it.maxVal) for it in self.cvars.stringLatin1.itervalues(): setattr(self, it.name, util.toInputStr(getattr(self, it.name))) for pf in self.pdfFonts.itervalues(): pf.refresh() # make sure usable space on the page isn't too small if doAll and (self.marginTop + self.marginBottom) >= \ (self.paperHeight - 100.0): self.marginTop = 0.0 self.marginBottom = 0.0 h = self.paperHeight - self.marginTop - self.marginBottom # how many lines on a page self.linesOnPage = int(h / util.getTextHeight(self.fontSize))
def recalc(self): for it in self.cvars.numeric.itervalues(): util.clampObj(self, it.name, it.minVal, it.maxVal)