Ë
    £èhi+  ã                  óH  — d dl mZ d dlmZ d dlZd dlZd dlmZ d dlmZm	Z	 d dl
mZ d dlmZ dd	lmZ  G d
„ de«      Z G d„ de«      Z G d„ de«      Z G d„ de«      Z G d„ de«      Z G d„ de«      Z G d„ de«      Z G d„ de«      Z ed¬«       G d„ d«      «       Zy)é    )Úannotations)ÚOptionalN)Ú	dataclass)ÚEnumÚauto)Údisassemble)ÚMeasurementé   )ÚColorc                  ó:   — e Zd ZdZ e«       Z e«       Z e«       Zy)Ú
LinePolicyah  This enum is used to define how to render linetypes.

    .. note::

        Text and shapes in linetypes are not supported.

    Attributes:
        SOLID: draw all lines as solid regardless of the linetype style
        ACCURATE: render styled lines as accurately as possible
        APPROXIMATE: ignored since v0.18.1 - uses always ACCURATE by default

    N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   ÚSOLIDÚAPPROXIMATEÚACCURATE© ó    ú;lib/python3.12/site-packages/ezdxf/addons/drawing/config.pyr   r      s   „ ññ ‹F€EÙ“&€KÙ‹v�Hr   r   c                  ó:   — e Zd ZdZ e«       Z e«       Z e«       Zy)ÚProxyGraphicPolicya÷  The action to take when an entity with a proxy graphic is encountered

    .. note::

        To get proxy graphics support proxy graphics have to be loaded:
        Set the global option :attr:`ezdxf.options.load_proxy_graphics` to
        ``True``, which is the default value.

        This can not prevent drawing proxy graphic inside of blocks,
        because this is beyond the domain of the drawing add-on!

    Attributes:
        IGNORE: do not display proxy graphics (skip_entity will be called instead)
        SHOW: if the entity cannot be rendered directly (e.g. if not implemented)
            but a proxy is present: display the proxy
        PREFER: display proxy graphics even for entities where direct rendering
            is available
    N)r   r   r   r   r   ÚIGNOREÚSHOWÚPREFERr   r   r   r   r   "   s   „ ññ& ‹V€FÙ‹6€DÙ‹V�Fr   r   c                  óV   — e Zd ZdZ e«       Z e«       Z e«       Z e«       Z e«       Z	y)ÚHatchPolicyaA  The action to take when a HATCH entity is encountered

    Attributes:
        NORMAL: render pattern and solid fillings
        IGNORE: do not show HATCH entities at all
        SHOW_OUTLINE: show only the outline of HATCH entities
        SHOW_SOLID: show HATCH entities as solid filling regardless of the pattern

    N)
r   r   r   r   r   ÚNORMALr   ÚSHOW_OUTLINEÚ
SHOW_SOLIDÚSHOW_APPROXIMATE_PATTERNr   r   r   r   r   ;   s-   „ ññ ‹V€FÙ‹V€FÙ“6€LÙ“€JÙ#›vÑr   r   c                  ó:   — e Zd ZdZ e«       Z e«       Z e«       Zy)ÚLineweightPolicya  This enum is used to define how to determine the lineweight.

    Attributes:
        ABSOLUTE: in mm as resolved by the :class:`Frontend` class
        RELATIVE: lineweight is relative to page size
        RELATIVE_FIXED: fixed lineweight relative to page size for all strokes

    N)r   r   r   r   r   ÚABSOLUTEÚRELATIVEÚRELATIVE_FIXEDr   r   r   r$   r$   M   s    „ ññ ‹v€Hñ ‹v€HÙ“V�Nr   r$   c                  óŽ   — e Zd ZdZ e«       Z e«       Z e«       Z e«       Z e«       Z	 e«       Z
 e«       Z e«       Z e«       Zy)ÚColorPolicya  This enum is used to define how to determine the line/fill color.

    Attributes:
        COLOR: as resolved by the :class:`Frontend` class
        COLOR_SWAP_BW: as resolved by the :class:`Frontend` class but swaps black and white
        COLOR_NEGATIVE: invert all colors
        MONOCHROME: maps all colors to gray scale in range [0%, 100%]
        MONOCHROME_DARK_BG: maps all colors to gray scale in range [30%, 100%], brightens
            colors for dark backgrounds
        MONOCHROME_LIGHT_BG:  maps all colors to gray scale in range [0%, 70%], darkens
            colors for light backgrounds
        BLACK: maps all colors to black
        WHITE: maps all colors to white
        CUSTOM: maps all colors to custom color :attr:`Configuration.custom_fg_color`

    N)r   r   r   r   r   ÚCOLORÚCOLOR_SWAP_BWÚCOLOR_NEGATIVEÚ
MONOCHROMEÚMONOCHROME_DARK_BGÚMONOCHROME_LIGHT_BGÚBLACKÚWHITEÚCUSTOMr   r   r   r)   r)   a   sJ   „ ññ" ‹F€EÙ“F€MÙ“V€NÙ“€JÙ›ÐÙ›&ÐÙ‹F€EÙ‹F€EÙ‹V�Fr   r)   c                  ór   — e Zd ZdZ e«       Z e«       Z e«       Z e«       Z e«       Z	 e«       Z
 e«       Zy)ÚBackgroundPolicya£  This enum is used to define the background color.

    Attributes:
        DEFAULT: as resolved by the :class:`Frontend` class
        WHITE: white background
        BLACK: black background
        PAPERSPACE: default paperspace background
        MODELSPACE: default modelspace background
        OFF: fully transparent background
        CUSTOM: custom background color by :attr:`Configuration.custom_bg_color`

    N)r   r   r   r   r   ÚDEFAULTr1   r0   Ú
PAPERSPACEÚ
MODELSPACEÚOFFr2   r   r   r   r4   r4   ~   s:   „ ññ ‹f€GÙ‹F€EÙ‹F€EÙ“€JÙ“€JÙ
‹&€CÙ‹V�Fr   r4   c                  óV   — e Zd ZdZ e«       Z e«       Z e«       Z e«       Z e«       Z	y)Ú
TextPolicyaF  This enum is used to define the text rendering.

    Attributes:
        FILLING: text is rendered as solid filling (default)
        OUTLINE: text is rendered as outline paths
        REPLACE_RECT: replace text by a rectangle
        REPLACE_FILL: replace text by a filled rectangle
        IGNORE: ignore text entirely

    N)
r   r   r   r   r   ÚFILLINGÚOUTLINEÚREPLACE_RECTÚREPLACE_FILLr   r   r   r   r:   r:   •   s,   „ ñ	ñ ‹f€GÙ‹f€GÙ“6€LÙ“6€LÙ‹V�Fr   r:   c                  óV   — e Zd ZdZ e«       Z e«       Z e«       Z e«       Z e«       Z	y)ÚImagePolicya—  This enum is used to define the image rendering.

    Attributes:
        DISPLAY: display images as they would appear in a regular CAD application
        RECT: display images as rectangles
        MISSING: images are always rendered as-if they are missing (rectangle + path text)
        PROXY: images are rendered using their proxy representations (rectangle)
        IGNORE: ignore images entirely

    N)
r   r   r   r   r   ÚDISPLAYÚRECTÚMISSINGÚPROXYr   r   r   r   r@   r@   ¨   s,   „ ñ	ñ ‹f€GÙ‹6€DÙ‹f€GÙ‹F€EÙ‹V�Fr   r@   T)Úfrozenc                  ó(  — e Zd ZU dZdZded<   dZded<   dZded<   dZd	ed
<   e	j                  Zded<   ej                  Zded<   ej                   Zded<   dZded<   dZded<   dZded<   dZded<   ej.                  j0                  Zded<   dZded<   dZded<   d Zded!<   ej:                  Zd"ed#<   d$Zd%ed&<   e jB                  Z"d'ed(<   d)Z#d%ed*<   e$jJ                  Z&d+ed,<   e'jP                  Z)d-ed.<   e*jV                  Z,d/ed0<   e-d3d1„«       Z.d3d2„Z/y)4ÚConfigurationaÑ  Configuration options for the :mod:`drawing` add-on.

    Attributes:
        pdsize: the size to draw POINT entities (in drawing units)
            set to None to use the $PDSIZE value from the dxf document header

            ======= ====================================================
            0       5% of draw area height
            <0      Specifies a percentage of the viewport size
            >0      Specifies an absolute size
            None    use the $PDMODE value from the dxf document header
            ======= ====================================================

        pdmode: point styling mode (see POINT documentation)

            see :class:`~ezdxf.entities.Point` class documentation

        measurement: whether to use metric or imperial units as enum :class:`ezdxf.enums.Measurement`

            ======= ======================================================
            0       use imperial units (in, ft, yd, ...)
            1       use metric units (ISO meters)
            None    use the $MEASUREMENT value from the dxf document header
            ======= ======================================================

        show_defpoints: whether to show or filter out POINT entities on the defpoints layer
        proxy_graphic_policy: the action to take when a proxy graphic is encountered
        line_policy: the method to use when drawing styled lines (eg dashed,
            dotted etc)
        hatch_policy: the method to use when drawing HATCH entities
        infinite_line_length: the length to use when drawing infinite lines
        lineweight_scaling:
            multiplies every lineweight by this factor; set this factor to 0.0 for a
            constant minimum line width defined by the :attr:`min_lineweight` setting
            for all lineweights;
            the correct DXF lineweight often looks too thick in SVG, so setting a
            factor < 1 can improve the visual appearance
        min_lineweight: the minimum line width in 1/300 inch; set to ``None`` for
            let the backend choose.
        min_dash_length: the minimum length for a dash when drawing a styled line
            (default value is arbitrary)
        max_flattening_distance: Max flattening distance in drawing units
            see Path.flattening documentation.
            The backend implementation should calculate an appropriate value,
            like 1 screen- or paper pixel on the output medium, but converted
            into drawing units. Sets Path() approximation accuracy
        circle_approximation_count: Approximate a full circle by `n` segments, arcs
            have proportional less segments. Only used for approximation of arcs
            in banded polylines.
        hatching_timeout: hatching timeout for a single entity, very dense
            hatching patterns can cause a very long execution time, the default
            timeout for a single entity is 30 seconds.
        min_hatch_line_distance: minimum hatch line distance to render, narrower pattern
            lines are rendered as solid filling
        color_policy:
        custom_fg_color: Used for :class:`ColorPolicy.custom` policy, custom foreground
            color as "#RRGGBBAA" color string (RGB+alpha)
        background_policy:
        custom_bg_color: Used for :class:`BackgroundPolicy.custom` policy, custom
            background color as "#RRGGBBAA" color string (RGB+alpha)
        lineweight_policy:
        text_policy:
        image_policy: the method for drawing IMAGE entities

    NzOptional[int]ÚpdsizeÚpdmodezOptional[Measurement]ÚmeasurementFÚboolÚshow_defpointsr   Úproxy_graphic_policyr   Úline_policyr   Úhatch_policyé   ÚfloatÚinfinite_line_lengthg      ð?Úlineweight_scalingzOptional[float]Úmin_lineweightgš™™™™™¹?Úmin_dash_lengthÚmax_flattening_distanceé€   ÚintÚcircle_approximation_countg      >@Úhatching_timeoutg-Cëâ6?Úmin_hatch_line_distancer)   Úcolor_policyz#000000r   Úcustom_fg_colorr4   Úbackground_policyz#ffffffÚcustom_bg_colorr$   Úlineweight_policyr:   Útext_policyr@   Úimage_policyc                 óJ   — t        j                  dt        «       t        «       S )Nz7use Configuration() instead of Configuration.defaults())ÚwarningsÚwarnÚDeprecationWarningrG   r   r   r   ÚdefaultszConfiguration.defaults  s   € ä�‰ØEÜô	
ô ‹Ðr   c                ó|   — t        j                  | «      }|j                  «       D ]
  \  }}|||<   Œ t        di |¤ŽS )zHReturns a new frozen :class:`Configuration` object with modified values.r   )ÚdataclassesÚasdictÚitemsrG   )ÚselfÚkwargsÚparamsÚkÚvs        r   Úwith_changeszConfiguration.with_changes  s=   € ä×#Ñ# DÓ)ˆØ—L‘L–N‰DˆAˆqØˆF�1ŠIð #äÑ&˜vÑ&Ð&r   )ÚreturnrG   )0r   r   r   r   rH   Ú__annotations__rI   rJ   rL   r   r   rM   r   r   rN   r   r   rO   rR   rS   rT   rU   r   Ú	PrimitiverV   rY   rZ   r[   r)   r*   r\   r]   r4   r5   r^   r_   r$   r%   r`   r:   r;   ra   r@   rA   rb   Ústaticmethodrg   rq   r   r   r   rG   rG   »   sG  … ñ@ðD !€FˆMÓ Ø €FˆMÓ Ø)-€KÐ&Ó-Ø €N�DÓ Ø/A×/FÑ/FÐÐ,ÓFØ(×1Ñ1€K�Ó1Ø +× 2Ñ 2€L�+Ó2Ø"$Ð˜%Ó$Ø #Ð˜Ó#Ø&*€N�OÓ*Ø €O�UÓ Ø%0×%:Ñ%:×%RÑ%RÐ˜UÓRØ&)Ð Ó)Ø"Ð�eÓ"à%)Ð˜UÓ)Ø +× 1Ñ 1€L�+Ó1Ø&€O�UÓ&Ø*:×*BÑ*BÐÐ'ÓBØ&€O�UÓ&Ø*:×*CÑ*CÐÐ'ÓCØ(×0Ñ0€K�Ó0Ø +× 3Ñ 3€L�+Ó3àòó ðô'r   rG   )Ú
__future__r   Útypingr   rd   ri   r   Úenumr   r   Úezdxfr   Úezdxf.enumsr	   Ú
type_hintsr   r   r   r   r$   r)   r4   r:   r@   rG   r   r   r   Ú<module>r|      s£   ðõ #Ý Û Û Ý !ß å Ý #Ý ô�ô ô&˜ô ô2&�$ô &ô$�tô ô(�$ô ô:�tô ô.�ô ô&�$ô ñ& �$Ô÷h'ð h'ó ñh'r   