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

Method render_string_vertical

pattern/web/pdf/pdfdevice.py:96–112  ·  view source on GitHub ↗
(self, seq, matrix, (x,y), 
                               font, fontsize, scaling, charspace, wordspace, rise, dxscale)

Source from the content-addressed store, hash-verified

94 return (x, y)
95
96 def render_string_vertical(self, seq, matrix, (x,y),
97 font, fontsize, scaling, charspace, wordspace, rise, dxscale):
98 needcharspace = False
99 for obj in seq:
100 if isinstance(obj, int) or isinstance(obj, float):
101 y -= obj*dxscale
102 needcharspace = True
103 else:
104 for cid in font.decode(obj):
105 if needcharspace:
106 y += charspace
107 y += self.render_char(translate_matrix(matrix, (x,y)),
108 font, fontsize, scaling, rise, cid)
109 if cid == 32 and wordspace:
110 y += wordspace
111 needcharspace = True
112 return (x, y)
113
114 def render_char(self, matrix, font, fontsize, scaling, rise, cid):
115 return 0

Callers 1

render_stringMethod · 0.95

Calls 3

render_charMethod · 0.95
translate_matrixFunction · 0.90
decodeMethod · 0.45

Tested by

no test coverage detected