MCPcopy Index your code
hub / github.com/clips/pattern / render_string

Method render_string

pattern/web/pdf/pdfdevice.py:57–76  ·  view source on GitHub ↗
(self, textstate, seq)

Source from the content-addressed store, hash-verified

55class PDFTextDevice(PDFDevice):
56
57 def render_string(self, textstate, seq):
58 matrix = mult_matrix(textstate.matrix, self.ctm)
59 font = textstate.font
60 fontsize = textstate.fontsize
61 scaling = textstate.scaling * .01
62 charspace = textstate.charspace * scaling
63 wordspace = textstate.wordspace * scaling
64 rise = textstate.rise
65 if font.is_multibyte():
66 wordspace = 0
67 dxscale = .001 * fontsize * scaling
68 if font.is_vertical():
69 textstate.linematrix = self.render_string_vertical(
70 seq, matrix, textstate.linematrix, font, fontsize,
71 scaling, charspace, wordspace, rise, dxscale)
72 else:
73 textstate.linematrix = self.render_string_horizontal(
74 seq, matrix, textstate.linematrix, font, fontsize,
75 scaling, charspace, wordspace, rise, dxscale)
76 return
77
78 def render_string_horizontal(self, seq, matrix, (x,y),
79 font, fontsize, scaling, charspace, wordspace, rise, dxscale):

Callers

nothing calls this directly

Calls 5

mult_matrixFunction · 0.90
is_multibyteMethod · 0.45
is_verticalMethod · 0.45

Tested by

no test coverage detected