Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(6)  |  Call(4)  |  Derive(0)  |  Import(2)
return max width, required height for a list of flowables F

        def _listWrapOn(F,availWidth,canv,mergeSpace=1,obj=None,dims=None):
    '''return max width, required height for a list of flowables F'''
    doct = getattr(canv,'_doctemplate',None)
    cframe = getattr(doct,'frame',None)
    if cframe:
        from reportlab.platypus.doctemplate import _addGeneratedContent
        doct_frame = cframe
        cframe = doct.frame = deepcopy(doct_frame)
        cframe._generated_content = None
        del cframe._generated_content
    try:
        W = 0
        H = 0
        pS = 0
        atTop = 1
        F = F[:]
        while F:
            f = F.pop(0)
            if hasattr(f,'frameAction'): continue
            w,h = f.wrapOn(canv,availWidth,0xfffffff)
            if dims is not None: dims.append((w,h))
            if cframe:
                _addGeneratedContent(F,cframe)
            if w<=_FUZZ or h<=_FUZZ: continue
            W = max(W,w)
            H += h
            if not atTop:
                h = f.getSpaceBefore()
                if mergeSpace: h = max(h-pS,0)
                H += h
            else:
                if obj is not None: obj._spaceBefore = f.getSpaceBefore()
                atTop = 0
            pS = f.getSpaceAfter()
            H += pS
        if obj is not None: obj._spaceAfter = pS
        return W, H-pS
    finally:
        if cframe:
            doct.frame = doct_frame
        


src/m/w/mwlib.rl-0.14.5/mwlib/rl/customflowables.py   mwlib.rl(Download)
import urlparse
 
from reportlab.platypus.flowables import Flowable, Image, HRFlowable, Preformatted, PageBreak, _listWrapOn, _ContainerSpace, _flowableSublist
from reportlab.platypus.paragraph import Paragraph, deepcopy, cleanBlockQuotedText
 
    def wrap(self, aW, aH):
        dims = []
        W,H = _listWrapOn(self._content, aW, self.canv, dims=dims)
        self.height = H
        self.content_dims = dims        

src/m/w/mwlib.rl-HEAD/mwlib/rl/customflowables.py   mwlib.rl(Download)
import urlparse
 
from reportlab.platypus.flowables import Flowable, Image, HRFlowable, Preformatted, PageBreak, _listWrapOn, _ContainerSpace, _flowableSublist
from reportlab.platypus.paragraph import Paragraph, deepcopy, cleanBlockQuotedText
 
    def wrap(self, aW, aH):
        dims = []
        W,H = _listWrapOn(self._content, aW, self.canv, dims=dims)
        self.height = H
        self.content_dims = dims        

src/z/3/z3c.rml-2.5.0/src/z3c/rml/platypus.py   z3c.rml(Download)
    def wrap(self, availWidth, availHeight):
        self.width, self.height = reportlab.platypus.flowables._listWrapOn(
            self._content, availWidth, self.canv)
        return self.width, self.height
 

src/z/3/z3c.rml-HEAD/src/z3c/rml/platypus.py   z3c.rml(Download)
    def wrap(self, availWidth, availHeight):
        self.width, self.height = reportlab.platypus.flowables._listWrapOn(
            self._content, availWidth, self.canv)
        return self.width, self.height