Commit 50252d2
committed
Small cleanup to font handling in agg.
Rename _get_agg_font to _prepare_font, as it doesn't really do
anything agg-specific. Fix its docstring. Rename the *prop* arg to
*font_prop*, which makes its type clear in the context (and avoids
having to mention it in the docstring, thus keeping the docstring
single-line).
_get_agg_font/_prepare_font never returns None (e.g. we always call
`clear` on the font instance) so skip a None check in draw_text.
Skip a few temporary variables, which don't add much to legibility.1 parent 0d0799b commit 50252d2
1 file changed
+8
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
222 | 222 | | |
223 | 223 | | |
224 | 224 | | |
225 | | - | |
226 | 225 | | |
227 | 226 | | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
| 227 | + | |
234 | 228 | | |
235 | 229 | | |
236 | | - | |
| 230 | + | |
237 | 231 | | |
238 | 232 | | |
239 | 233 | | |
| |||
264 | 258 | | |
265 | 259 | | |
266 | 260 | | |
267 | | - | |
268 | | - | |
269 | | - | |
| 261 | + | |
| 262 | + | |
270 | 263 | | |
271 | 264 | | |
272 | 265 | | |
| |||
295 | 288 | | |
296 | 289 | | |
297 | 290 | | |
298 | | - | |
| 291 | + | |
299 | 292 | | |
300 | | - | |
| 293 | + | |
301 | 294 | | |
302 | | - | |
303 | | - | |
304 | | - | |
| 295 | + | |
305 | 296 | | |
306 | | - | |
| 297 | + | |
307 | 298 | | |
308 | | - | |
309 | 299 | | |
310 | 300 | | |
311 | 301 | | |
| |||
0 commit comments