Return the text style dict for a text instance
(text)
| 182 | |
| 183 | |
| 184 | def get_text_style(text): |
| 185 | """Return the text style dict for a text instance""" |
| 186 | style = {} |
| 187 | style["alpha"] = text.get_alpha() |
| 188 | if style["alpha"] is None: |
| 189 | style["alpha"] = 1 |
| 190 | style["fontsize"] = text.get_size() |
| 191 | style["color"] = export_color(text.get_color()) |
| 192 | style["halign"] = text.get_horizontalalignment() # left, center, right |
| 193 | style["valign"] = text.get_verticalalignment() # baseline, center, top |
| 194 | style["malign"] = text._multialignment # text alignment when '\n' in text |
| 195 | style["rotation"] = text.get_rotation() |
| 196 | style["zorder"] = text.get_zorder() |
| 197 | return style |
| 198 | |
| 199 | |
| 200 | def get_axis_properties(axis): |
nothing calls this directly
no test coverage detected