Commit 7066809
committed
Various TextPath cleanups.
In TextToPath.get_text_path, deprecate the usetex parameter in favor of
a tristate ismath={False, True, "TeX"}, which is consistent with all
other low-level text handling APIs (at the renderer level). (TextToPath
methods should be considered as low-level APIs; the main high-level API
is TextPath.)
Deprecate `TextPath.text_get_vertices_codes` and `TextPath.is_math_text`
which are clearly helper functions for the main constructor.
Moreover, previously, if TextPath was called with `usetex=False` and
`rcParams["text.usetex"]` == True, then `TextPath.is_math_text` would
return "TeX" as the ismath flag, which would then be interpreted as a
True ismath value (but not a True usetex value(!)) by
TextToPath.get_text_path. The new implementation avoids that problem.
Remove a nonexistent parameter from the docs of
RendererBase._get_text_path_transform.1 parent 2d05981 commit 7066809
3 files changed
Lines changed: 40 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
556 | 556 | | |
557 | 557 | | |
558 | 558 | | |
559 | | - | |
560 | | - | |
561 | 559 | | |
562 | 560 | | |
563 | 561 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
| 105 | + | |
105 | 106 | | |
106 | 107 | | |
107 | 108 | | |
| |||
116 | 117 | | |
117 | 118 | | |
118 | 119 | | |
119 | | - | |
120 | | - | |
| 120 | + | |
| 121 | + | |
121 | 122 | | |
122 | | - | |
123 | | - | |
124 | | - | |
| 123 | + | |
| 124 | + | |
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
158 | 152 | | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
159 | 158 | | |
160 | 159 | | |
161 | 160 | | |
| |||
448 | 447 | | |
449 | 448 | | |
450 | 449 | | |
| 450 | + | |
| 451 | + | |
451 | 452 | | |
452 | 453 | | |
453 | 454 | | |
| |||
463 | 464 | | |
464 | 465 | | |
465 | 466 | | |
466 | | - | |
467 | | - | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
468 | 474 | | |
469 | 475 | | |
470 | 476 | | |
| |||
507 | 513 | | |
508 | 514 | | |
509 | 515 | | |
| 516 | + | |
510 | 517 | | |
511 | 518 | | |
512 | 519 | | |
| |||
526 | 533 | | |
527 | 534 | | |
528 | 535 | | |
| 536 | + | |
529 | 537 | | |
530 | 538 | | |
531 | 539 | | |
| |||
0 commit comments