§
    ø(g¹  ã                   ó   — d dœd„Z d„ Zd S )N)Úsegmentsc          
      ó   ‡‡‡— ddl mŠmŠm}m}m} ddl}ddlm}m	}	m
}
 |€Ld}t           || |d||z  z
  ¦  «        z  ¦  «        ¦  «        }t          |d¦  «        }t          |d¦  «        }|dk    rt          d	¦  «        ‚|j                             ¦   «         5  |j                             | ¦  «         |j                             |¦  «         d|d
z
  z  |dz  z  Šˆˆˆfd„t'          |¦  «        D ¦   «         } |
¦   «         }|                     dddd¬¦  «        } |	t+          |¦  «        |¬¦  «        }|                     ||¬¦  «          |d|¬¦  «        }|j                             d¦  «        }|                     |¦  «         |                     d|¦  «         |                     ¦   «          ddd¦  «         dS # 1 swxY w Y   dS )a_  
    Draw a circle.

    :arg position: 2D position where the circle will be drawn.
    :type position: Sequence[float]
    :arg color: Color of the circle (RGBA).
       To use transparency blend must be set to ``ALPHA``, see: :func:`gpu.state.blend_set`.
    :type color: Sequence[float]
    :arg radius: Radius of the circle.
    :type radius: float
    :arg segments: How many segments will be used to draw the circle.
        Higher values give better results but the drawing will take longer.
        If None or not specified, an automatic value will be calculated.
    :type segments: int | None
    é    )ÚsinÚcosÚpiÚceilÚacosN)ÚGPUBatchÚ
GPUVertBufÚGPUVertFormatg      Ð?g      ð?é   iè  z*Amount of segments must be greater than 0.é   é   c                 óH   •— g | ]} ‰|‰z  ¦  «         ‰|‰z  ¦  «        f‘ŒS © r   )Ú.0Úir   Úmulr   s     €€€úX/home/blender/git/blender-v430/install_release/4.3/scripts/modules/gpu_extras/presets.pyú
<listcomp>z"draw_circle_2d.<locals>.<listcomp>*   s6   ø€ ÐGÐGÐG°!�#�#�a˜#‘g‘,”,   A¨¡G¡¤Ð-ÐGÐGÐGó    ÚposÚF32ÚFLOAT)ÚidÚ	comp_typeÚlenÚ
fetch_mode)r   Úformat)r   ÚdataÚ
LINE_STRIP)ÚtypeÚbufÚUNIFORM_COLORÚcolor)Úmathr   r   r   r   r	   ÚgpuÚ	gpu.typesr
   r   r   ÚintÚmaxÚminÚ
ValueErrorÚmatrixÚpush_popÚ	translateÚscale_uniformÚrangeÚattr_addr   Ú	attr_fillÚshaderÚfrom_builtinÚprogram_setÚuniform_floatÚdraw)Úpositionr%   Úradiusr   r   r   r	   r'   r
   r   r   Úmax_pixel_errorÚvertsÚfmtÚpos_idÚvboÚbatchr4   r   r   r   s                     @@@r   Údraw_circle_2drA      ss  øøø€ ð  .Ð-Ð-Ð-Ð-Ð-Ð-Ð-Ð-Ð-Ð-Ð-Ð-Ð-Ø€J€J€Jðð ð ð ð ð ð ð ð ð ð ÐØˆÝ�t�t˜B   c¨O¸fÑ,DÑ&DÑ!EÔ!EÑEÑFÔFÑGÔGˆÝ�x Ñ#Ô#ˆÝ�x Ñ&Ô&ˆà�1‚}€}ÝÐEÑFÔFÐFà	Œ×	Ò	Ñ	Ô	ð ð ØŒ
×Ò˜XÑ&Ô&Ð&ØŒ
× Ò  Ñ(Ô(Ð(Ø�h ‘lÑ#¨¨Q©Ñ/ˆØGÐGÐGÐGÐGÐGµu¸X±´ÐGÑGÔGˆØˆm‰oŒoˆØ—’ °%¸QÈ7�ÑSÔSˆØˆj�S ™ZœZ°Ð4Ñ4Ô4ˆØ�Š˜ eˆÑ,Ô,Ð,Ø�˜l°Ð4Ñ4Ô4ˆØ”×(Ò(¨Ñ9Ô9ˆØ×Ò˜&Ñ!Ô!Ð!Ø×Ò˜W eÑ,Ô,Ð,Ø�
Š
‰Œˆðð ð ñ ô ð ð ð ð ð ð ð øøøð ð ð ð ð ð s   ÂDGÇGÇ
Gc                 ó–  — ddl }ddlm} d}|j                             d¦  «        } ||d||dœ¦  «        }|j                             ¦   «         5  |j                             |¦  «         |j                             ||f¦  «         |j                             d¦  «        }t          | t          ¦  «        rPddl}	|	                     |	j        ¦  «         |	                     |	j        | ¦  «         |                     d	d¦  «         n|                     d	| ¦  «         |                     |¦  «         ddd¦  «         dS # 1 swxY w Y   dS )
aÕ  
    Draw a 2d texture.

    :arg texture: GPUTexture to draw (e.g. gpu.texture.from_image(image) for :class:`bpy.types.Image`).
    :type texture: :class:`gpu.types.GPUTexture`
    :arg position: Position of the lower left corner.
    :type position: 2D Vector
    :arg width: Width of the image when drawn (not necessarily
        the original width of the texture).
    :type width: float
    :arg height: Height of the image when drawn.
    :type height: float
    r   Nr   )Úbatch_for_shader))r   r   )r   r   )r   r   )r   r   ÚIMAGEÚTRI_FAN)r   ÚtexCoordÚimage)r'   r@   rC   r4   r5   r-   r.   r/   ÚscaleÚ
isinstancer)   ÚbglÚglActiveTextureÚGL_TEXTURE0ÚglBindTextureÚGL_TEXTURE_2DÚuniform_intÚuniform_samplerr8   )
Útexturer9   ÚwidthÚheightr'   rC   Úcoordsr4   r@   rJ   s
             r   Údraw_texture_2drU   6   s¥  € ð €J€J€JØ(Ð(Ð(Ð(Ð(Ð(à-€FàŒZ×$Ò$ WÑ-Ô-€FØÐØ�	Ø FÐ+Ð+ñô €Eð
 
Œ×	Ò	Ñ	Ô	ð ð ØŒ
×Ò˜XÑ&Ô&Ð&ØŒ
×Ò˜% ˜Ñ)Ô)Ð)à”×(Ò(¨Ñ1Ô1ˆå�g�sÑ#Ô#ð 	5àˆJˆJˆJØ×Ò ¤Ñ0Ô0Ð0Ø×Ò˜cÔ/°Ñ9Ô9Ð9Ø×Ò˜w¨Ñ*Ô*Ð*Ð*à×"Ò" 7¨GÑ4Ô4Ð4à�
Š
�6ÑÔÐðð ð ñ ô ð ð ð ð ð ð ð øøøð ð ð ð ð ð s   ÁC!D>Ä>EÅE)rA   rU   r   r   r   ú<module>rV      s=   ðð
 9=ð .ð .ð .ð .ð .ðb(ð (ð (ð (ð (r   