403Webshell
Server IP : 202.61.199.114  /  Your IP : 216.73.217.139
Web Server : nginx/1.22.1
System : Linux de.arni-solutions.de 6.1.0-49-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.174-1 (2026-05-26) x86_64
User : web20 ( 1018)
PHP Version : 8.4.23
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/local/lib/python3.9/dist-packages/matplotlib/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/local/lib/python3.9/dist-packages/matplotlib/__pycache__/mathtext.cpython-39.pyc
a

���hO�@s�dZddlZddlZddlZddlmZmZddlmZddl	m
Z
ddlmZmZm
Z
e�e�Zee
_Gdd	�d	�Zd
dd
�dd�ZdS)a 
A module for parsing a subset of the TeX math syntax and rendering it to a
Matplotlib backend.

For a tutorial of its usage, see :ref:`mathtext`.  This
document is primarily concerned with implementation details.

The module uses pyparsing_ to parse the TeX expression.

.. _pyparsing: https://pypi.org/project/pyparsing/

The Bakoma distribution of the TeX Computer Modern fonts, and STIX
fonts are supported.  There is experimental support for using
arbitrary fonts, but results may vary without proper tweaking and
metrics for those fonts.
�N)�_api�	_mathtext)�LOAD_NO_HINTING)�FontProperties�)�RasterParse�VectorParse�get_unicode_indexc@sXeZdZdZejejejejej	ej
d�Zdd�Zddd�dd�Z
e�d	�d
d��ZdS)
�MathTextParserN)�cmZdejavuserifZ
dejavusansZstixZstixsansZcustomcCs tjdddd�|��d�|_dS)a	
        Create a MathTextParser for the given backend *output*.

        Parameters
        ----------
        output : {"path", "agg"}
            Whether to return a `VectorParse` ("path") or a
            `RasterParse` ("agg", or its synonym "macosx").
        �vector�raster)�pathZagg�macosx)�outputN)r�
check_getitem�lower�_output_type)�selfr�r�=/usr/local/lib/python3.9/dist-packages/matplotlib/mathtext.py�__init__0s

�zMathTextParser.__init__�H��antialiasedcCs0|dur|��nd}t�|d�}|�||||�S)a�
        Parse the given math expression *s* at the given *dpi*.  If *prop* is
        provided, it is a `.FontProperties` object specifying the "default"
        font to use in the math expression, used for all non-math text.

        The results are cached, so multiple calls to `parse`
        with the same expression should be fast.

        Depending on the *output* type, this returns either a `VectorParse` or
        a `RasterParse`.
        Nztext.antialiased)�copy�mplZ
_val_or_rc�
_parse_cached)r�s�dpi�proprrrr�parse>szMathTextParser.parse�2cCs�ddlm}|durt�}tj|j|��d�}t|��d�|j	}|||�}|�
�}	|jdurjt�
�|j_|j�|||	|�}
t�|
�}|j	dkr�|��S|j	dkr�|j|d�SdS)Nr)�backend_agg)�fontset)rr
rr
r)Zmatplotlib.backendsr#rrr�_font_type_mappingZget_math_fontfamilyrZget_hinting_flagrZget_size_in_points�_parserr�Parser�	__class__r!ZshipZ	to_vectorZ	to_raster)rrrr rr#Z
fontset_classZload_glyph_flagsr$ZfontsizeZboxrrrrrQs*
���




zMathTextParser._parse_cached)rN)�__name__�
__module__�__qualname__r&rZBakomaFontsZDejaVuSerifFontsZDejaVuSansFontsZ	StixFontsZ
StixSansFontsZUnicodeFontsr%rr!�	functools�	lru_cacherrrrrr
%s�	r
)�colorc
Csrddlm}td�}|j|d|d�\}}	}
}}|j|d|	dfd�}|jd|
|	|||d�|j|||d	�|
S)
a�
    Given a math expression, renders it in a closely-clipped bounding
    box to an image file.

    Parameters
    ----------
    s : str
        A math expression.  The math portion must be enclosed in dollar signs.
    filename_or_obj : str or path-like or file-like
        Where to write the image data.
    prop : `.FontProperties`, optional
        The size and style of the text.
    dpi : float, optional
        The output dpi.  If not set, the dpi is determined as for
        `.Figure.savefig`.
    format : str, optional
        The output format, e.g., 'svg', 'pdf', 'ps' or 'png'.  If not set, the
        format is determined as for `.Figure.savefig`.
    color : str, optional
        Foreground color, defaults to :rc:`text.color`.
    r)�figurerr)rr gR@)Zfigsize)Zfontpropertiesr.)r�format)�
matplotlibr/r
r!ZFigure�textZsavefig)
rZfilename_or_objr rr0r.r/�parser�width�height�depth�_Zfigrrr�
math_to_imagelsr8)NNN)�__doc__r,�loggingr1rrrZmatplotlib.ft2fontrZmatplotlib.font_managerrrrr	�	getLoggerr)�_logr*r
r8rrrr�<module>s
G�

Youez - 2016 - github.com/yon3zu
LinuXploit