texmanager.pyi 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. from .backend_bases import RendererBase
  2. from matplotlib.typing import ColorType
  3. import numpy as np
  4. class TexManager:
  5. texcache: str
  6. @classmethod
  7. def get_basefile(
  8. cls, tex: str, fontsize: float, dpi: float | None = ...
  9. ) -> str: ...
  10. @classmethod
  11. def get_font_preamble(cls) -> str: ...
  12. @classmethod
  13. def get_custom_preamble(cls) -> str: ...
  14. @classmethod
  15. def make_tex(cls, tex: str, fontsize: float) -> str: ...
  16. @classmethod
  17. def make_dvi(cls, tex: str, fontsize: float) -> str: ...
  18. @classmethod
  19. def make_png(cls, tex: str, fontsize: float, dpi: float) -> str: ...
  20. @classmethod
  21. def get_grey(
  22. cls, tex: str, fontsize: float | None = ..., dpi: float | None = ...
  23. ) -> np.ndarray: ...
  24. @classmethod
  25. def get_rgba(
  26. cls,
  27. tex: str,
  28. fontsize: float | None = ...,
  29. dpi: float | None = ...,
  30. rgb: ColorType = ...,
  31. ) -> np.ndarray: ...
  32. @classmethod
  33. def get_text_width_height_descent(
  34. cls, tex: str, fontsize, renderer: RendererBase | None = ...
  35. ) -> tuple[int, int, int]: ...