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

All Samples(983)  |  Call(900)  |  Derive(0)  |  Import(83)
fp_str(a0, a1,...) convert numerics to blank separated string

src/d/j/django-admin-report-HEAD/example/lib/reportlab/pdfgen/canvas.py   django-admin-report(Download)
from reportlab.pdfgen  import pdfgeom, pathobject, textobject
from reportlab.lib.colors import black, _chooseEnforceColorSpace
from reportlab.lib.utils import import_zlib, ImageReader, fp_str, _digester
from reportlab.lib.boxstuff import aspectRatioFix
            P('1 0 0 1 0 0 cm')
            P('1 0 0 -1 0 %s cm' % fp_str(self._pagesize[1]))
        C = self._code
        n = len(C)
            a0, b0, c0, d0, e0, f0 = map(float,L[-7:-1])
            s = len(L)>7 and join(L)+ ' %s cm' or '%s cm'
            self._code[-1] = s % fp_str(a0*a+c0*b,b0*a+d0*b,a0*c+c0*d,b0*c+d0*d,a0*e+c0*f+e0,b0*e+d0*f+f0)
            self._code.append('%s cm' % fp_str(a,b,c,d,e,f))
    def line(self, x1,y1, x2,y2):
        """draw a line segment from (x1,y1) to (x2,y2) (with color, thickness and
        other attributes determined by the current graphics state)."""
        self._code.append('n %s m %s l S' % (fp_str(x1, y1), fp_str(x2, y2)))

src/d/j/django-admin-report-HEAD/example/lib/reportlab/graphics/renderPS.py   django-admin-report(Download)
import string, types
from reportlab.pdfbase.pdfmetrics import getFont, stringWidth, unicode2T1 # for font info
from reportlab.lib.utils import fp_str, getStringIO
from reportlab.lib.colors import black
from reportlab.graphics.renderbase import Renderer, StateTracker, getStateDelta, renderScaledDrawing
            if color:
                if hasattr(color, "cyan"):
                    self.code_append('%s setcmykcolor' % fp_str(color.cyan, color.magenta, color.yellow, color.black))
                    self.code_append('%s setrgbcolor' % fp_str(color.red, color.green, color.blue))
    def line(self, x1, y1, x2, y2):
        if self._strokeColor != None:
            self.code_append('%s m %s l stroke' % (fp_str(x1, y1), fp_str(x2, y2)))

src/d/j/django-admin-report-HEAD/example/lib/reportlab/pdfgen/textobject.py   django-admin-report(Download)
from types import *
from reportlab.lib.colors import Color, CMYKColor, CMYKColorSep, toColor, black, white, _CMYK_black, _CMYK_white
from reportlab.lib.utils import fp_str
from reportlab.pdfbase import pdfmetrics
            name = self._checkSeparation(aColor)
            if name:
                self._code.append('/%s cs %s scn' % (name,fp_str(d)))
                self._code.append('%s k' % fp_str(c, m, y, k))
        elif isinstance(aColor, Color):
            rgb = (aColor.red, aColor.green, aColor.blue)
            self._fillColorObj = aColor
            self._code.append('%s rg' % fp_str(rgb) )
            if l==3:
                self._fillColorObj = aColor
                self._code.append('%s rg' % fp_str(aColor) )
            elif l==4:
                self._fillColorObj = aColor

src/d/j/django-admin-report-HEAD/example/lib/reportlab/pdfgen/pathobject.py   django-admin-report(Download)
import string
from reportlab.pdfgen import pdfgeom
from reportlab.lib.utils import fp_str
    def moveTo(self, x, y):
        self._code_append('%s m' % fp_str(x,y))
    def lineTo(self, x, y):
        self._code_append('%s l' % fp_str(x,y))
    def curveTo(self, x1, y1, x2, y2, x3, y3):
        self._code_append('%s c' % fp_str(x1, y1, x2, y2, x3, y3))
        pointList = pdfgeom.bezierArc(x1,y1, x2,y2, startAng, extent)
        #move to first point
        self._code_append('%s m' % fp_str(pointList[0][:2]))
        for curve in pointList:
            self._code_append('%s c' % fp_str(curve[2:]))

src/d/j/django-admin-report-HEAD/example/lib/reportlab/graphics/renderSVG.py   django-admin-report(Download)
from reportlab.pdfbase.pdfmetrics import stringWidth # for font info
from reportlab.lib.utils import fp_str
from reportlab.lib.colors import black
from reportlab.graphics.renderbase import StateTracker, getStateDelta, Renderer, renderScaledDrawing
        codeline = '%s m %s curveto'
        data = (fp_str(x1, y1), fp_str(x2, y2, x3, y3, x4, y4))
        if self._fillColor != None:
            codeline = '%s m %s l stroke'
            for line in lineList:
                self.code.append(codeline % (fp_str(line[0]), fp_str(line[1])))
    def polyLine(self, points):

src/d/j/django-admin-report-HEAD/example/lib/reportlab/pdfgen/pdfimages.py   django-admin-report(Download)
from reportlab.pdfbase import pdfutils
from reportlab.pdfbase import pdfdoc
from reportlab.lib.utils import fp_str, getStringIO
from reportlab.lib.utils import import_zlib, haveImages
from reportlab.lib.boxstuff import aspectRatioFix
        # this says where and how big to draw it
        if not canvas.bottomup: y = y+height
        canvas._code.append('q %s 0 0 %s cm' % (fp_str(self.width), fp_str(self.height, x, y)))
        # self._code.extend(imagedata) if >=python-1.5.2
        for line in self.imageData:

src/d/j/django-admin-report-HEAD/example/lib/reportlab/platypus/para.py   django-admin-report(Download)
from reportlab.pdfbase.pdfmetrics import stringWidth
from reportlab.lib.utils import fp_str
from reportlab.platypus.flowables import Flowable
from reportlab.lib import colors
                        #if debug: print "INDENTING", thislineindent
                        #textobject.moveCursor(thislineindent, 0)
                        code.append('%s Td' % fp_str(thislineindent, 0))
                        self.x = self.x + thislineindent
                    for handler in self.lineOpHandlers:
                if opcode>TOOSMALLSPACE:
                    #textobject.moveCursor(opcode, 0)
                    code.append('%s Td' % fp_str(opcode, 0))
                    self.x = self.x + opcode
            elif topcode is TupleType:

src/d/j/django-admin-report-HEAD/example/lib/reportlab/platypus/flowables.py   django-admin-report(Download)
from copy import deepcopy, copy
from reportlab.lib.colors import red, gray, lightgrey
from reportlab.lib.utils import fp_str
from reportlab.lib.enums import TA_LEFT, TA_CENTER, TA_RIGHT, TA_JUSTIFY
from reportlab.lib.styles import _baseFontName
    def identity(self, maxLen=None):
        return "<%s at %s%s%s> size=%sx%s" % (self.__class__.__name__, hex(id(self)), self._frameName(),
                getattr(self,'name','') and (' name="%s"'% getattr(self,'name','')) or '',
                getattr(self,'maxWidth','') and (' maxWidth=%s'%fp_str(getattr(self,'maxWidth',0))) or '',
                getattr(self,'maxHeight','')and (' maxHeight=%s' % fp_str(getattr(self,'maxHeight')))or '')

src/d/j/django-admin-report-HEAD/example/lib/reportlab/pdfbase/pdfdoc.py   django-admin-report(Download)
from reportlab.pdfbase.pdfutils import LINEEND # this constant needed in both
from reportlab import rl_config
from reportlab.lib.utils import import_zlib, open_for_read, fp_str, _digester
from reportlab.pdfbase import pdfmetrics
        #use a controlled number formatting routine
        #instead of str, so Jython/Python etc do not differ
        return fp_str(element)
        return str(element)

src/d/j/django-admin-report-HEAD/example/lib/reportlab/platypus/tables.py   django-admin-report(Download)
from reportlab.lib.styles import PropertySet, ParagraphStyle, _baseFontName
from reportlab.lib import colors
from reportlab.lib.utils import fp_str
from reportlab.pdfbase.pdfmetrics import stringWidth
                            if not rl_config.allowTableBoundsErrors and dW>w:
                                from reportlab.platypus.doctemplate import LayoutError
                                raise LayoutError("Flowable %s (%sx%s points) too wide for cell(%d,%d) (%sx* points) in\n%s" % (v[0].identity(30),fp_str(dW),fp_str(t),i,j, fp_str(w), self.identity(30)))
                            v = (v is not None and str(v) or '').split("\n")

  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9  Next