
    \i2                         S r SSKJrJrJr  SSKJrJrJr  SSK	J
r
Jr   " S S\5      r " S S\5      r " S	 S
\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      rg)a  
Copyright 2011-2018 Kyle Lancaster | 2019 Patrick Eisoldt

Simplekml is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.

    )KmlableHotSpotcheck)	ColorModeDisplayModeListItemType)IconItemIconc                      ^  \ rS rSrSrS\R                  4U 4S jjr\S 5       r	\S 5       r
\
R                  S 5       r
\S 5       r\R                  S	 5       rU 4S
 jrSrU =r$ )
ColorStyle   z~Abstract base class for geometry styles.

The arguments are the same as the properties.

.. note::
  Not to be used directly.
Nc                 b   > [         [        U ]  5         XR                  S'   X R                  S'   g )Ncolor	colorMode)superr   __init___kml)selfr   	colormode	__class__s      U/var/www/html/kml_chatgpt/mouzaenv/lib/python3.13/site-packages/simplekml/substyle.pyr   ColorStyle.__init__!   s(    j$(*"		'!*		+    c                     U R                   $ zThe unique id of the substyle._idr   s    r   idColorStyle.id&        xxr   c                      U R                   S   $ )z0Hex string representing a color, accepts string.r   r   r   s    r   r   ColorStyle.color+        yy!!r   c                      XR                   S'   g )Nr   r#   )r   r   s     r   r   r$   0       "		'r   c                      U R                   S   $ )zPHow the color is to be used, string from :class:`simplekml.ColorMode` constants.r   r#   r   s    r   r   ColorStyle.colormode4        yy%%r   c                      XR                   S'   g )Nr   r#   )r   r   s     r   r   r)   9       !*		+r   c                 R  > / nUR                  SR                  U R                  R                  U R                  5      5        UR                  [
        [        U ]  5       5        UR                  SR                  U R                  R                  5      5        SR                  U5      $ )Nz<{0} id="{1}">z</{0}> )	appendformatr   __name__r   r   r   __str__join)r   bufr   s     r   r2   ColorStyle.__str__=   ss    

#**4>>+B+BDHHMN

5T245

8??4>>#:#:;<wws|r    )r1   
__module____qualname____firstlineno____doc__r   normalr   propertyr   r   setterr   r2   __static_attributes____classcell__r   s   @r   r   r      s     "Y-=-= +
   " " \\# # & & + + r   r   c                   >  ^  \ rS rSrSr     SU 4S jjr\S 5       r\R                  S 5       r\S 5       r	\	R                  S 5       r	\S 5       r
\
R                  S	 5       r
\S
 5       r\R                  S 5       r\S 5       r\R                  S 5       rSrU =r$ )	LineStyleE   a  Specifies the drawing style for all line geometry.

Arguments are the same as the properties.

Usage::

    import simplekml
    kml = simplekml.Kml()
    lin = kml.newlinestring(name="Pathway", description="A pathway in Kirstenbosch",
                    coords=[(18.43312,-33.98924), (18.43224,-33.98914),
                            (18.43144,-33.98911), (18.43095,-33.98904)])
    lin.style.linestyle.color = simplekml.Color.red  # Red
    lin.style.linestyle.width = 10  # 10 pixels
    kml.save("LineStyle.kml")
c                    > [         [        U ]
  " S0 UD6  XR                  S'   X R                  S'   X0R                  S'   X@R                  S'   XPR                  S'   g )Nwidthgx:outerColorgx:outerWidthgx:physicalWidthgx:labelVisibilityr6   )r   rB   r   r   )r   rE   gxoutercolorgxouterwidthgxphysicalwidthgxlabelvisibilitykwargsr   s          r   r   LineStyle.__init__V   sU     	i'1&1"		'%1		/"%1		/"(7		$%*;		&'r   c                      U R                   S   $ )z!Width of the line, accepts float.rE   r#   r   s    r   rE   LineStyle.widthd   r%   r   c                      XR                   S'   g )NrE   r#   )r   rE   s     r   rE   rQ   i   r'   r   c                      U R                   S   $ )z(Outer color of the line, accepts string.rF   r#   r   s    r   rJ   LineStyle.gxoutercolorm        yy))r   c                      XR                   S'   g )NrF   r#   )r   rJ   s     r   rJ   rT   r       %1		/"r   c                      U R                   S   $ )z'Outer width of the line, accepts float.rG   r#   r   s    r   rK   LineStyle.gxouterwidthv   rU   r   c                      XR                   S'   g )NrG   r#   )r   rK   s     r   rK   rY   {   rW   r   c                      U R                   S   $ )z*Physical width of the line, accepts float.rH   r#   r   s    r   rL   LineStyle.gxphysicalwidth   s     yy+,,r   c                      XR                   S'   g )NrH   r#   )r   rL   s     r   rL   r\      s    (7		$%r   c                      U R                   S   $ )z'Whether or not to display a text label.scaler#   r   s    r   rM   LineStyle.gxlabelvisibility   r%   r   c                      XR                   S'   g )NrI   r#   )r   rM   s     r   rM   r`      s    *;		&'r   r6   )NNNNN)r1   r7   r8   r9   r:   r   r<   rE   r=   rJ   rK   rL   rM   r>   r?   r@   s   @r   rB   rB   E   s   " ""!%#'< " " \\# # * * 2 2 * * 2 2 - - 8 8 " " < <r   rB   c                      ^  \ rS rSrSrS	U 4S jjr\S 5       r\R                  S 5       r\S 5       r	\	R                  S 5       r	Sr
U =r$ )
	PolyStyle   a  Specifies the drawing style for all polygons.

Arguments are the same as the properties.

Usage::

    import simplekml
    kml = simplekml.Kml()
    pol = kml.newpolygon(name="Atrium Garden",
                 outerboundaryis=[(18.43348,-33.98985),(18.43387,-33.99004),(18.43410,-33.98972),
                                  (18.43371,-33.98952),(18.43348,-33.98985)],
                 innerboundaryis=[(18.43360,-33.98982),(18.43386,-33.98995),(18.43401,-33.98974),
                                  (18.43376,-33.98962),(18.43360,-33.98982)])
    pol.style.polystyle.color = simplekml.Color.red
    pol.style.polystyle.outline = 0
    kml.save("PolyStyle.kml")
c                 f   > [         [        U ]
  " S0 UD6  XR                  S'   X R                  S'   g )Nfilloutliner6   )r   rc   r   r   )r   rf   rg   rN   r   s       r   r   PolyStyle.__init__   s-    i'1&1 		&&		)r   c                      U R                   S   $ )z2Must the polygon be filled, accepts int of 0 or 1.rf   r#   r   s    r   rf   PolyStyle.fill        yy  r   c                      XR                   S'   g )Nrf   r#   )r   rf   s     r   rf   rj           		&r   c                      U R                   S   $ )z4Must the polygon be outlined, accepts int of 0 or 1.rg   r#   r   s    r   rg   PolyStyle.outline        yy##r   c                      XR                   S'   g )Nrg   r#   )r   rg   s     r   rg   ro          &		)r   r6   )   rs   )r1   r7   r8   r9   r:   r   r<   rf   r=   rg   r>   r?   r@   s   @r   rc   rc      se    $'
 ! ! 
[[! ! $ $ ^^' 'r   rc   c                   ,  ^  \ rS rSrSrSU 4S jjr\S 5       r\R                  S 5       r\S 5       r	\	R                  S 5       r	\S 5       r
\
R                  \" \5      S	 5       5       r
\S
 5       r\R                  \" \5      S 5       5       rSrU =r$ )	IconStyle   a  Specifies how icons for point Placemarks are drawn.

Arguments are the same as the properties.

Usage::

    import simplekml
    kml = simplekml.Kml()
    pnt = kml.newpoint(name='A Point')
    pnt.coords = [(1.0, 2.0)]
    pnt.style.iconstyle.scale = 3  # Icon thrice as big
    pnt.style.iconstyle.icon.href = 'http://maps.google.com/mapfiles/kml/shapes/info-i.png'
    kml.save("IconStyle.kml")
c                    > [         [        U ]
  " S0 UD6  Uc	  [        SS9nXR                  S'   X R                  S'   X0R                  S'   X@R                  S'   g )Nz;http://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png)hrefr_   headingIcon_hotspot_r6   )r   ru   r   r	   r   )r   r_   ry   iconhotspotrN   r   s         r   r   IconStyle.__init__   sU    i'1&1<Z[D"		'&		)!		' '		*r   c                      U R                   S   $ z Size of the icon, accepts float.r_   r#   r   s    r   r_   IconStyle.scale   r%   r   c                      XR                   S'   g Nr_   r#   r   r_   s     r   r_   r      r'   r   c                      U R                   S   $ )z$Rotation of the icon, accepts float.ry   r#   r   s    r   ry   IconStyle.heading   rp   r   c                      XR                   S'   g )Nry   r#   )r   ry   s     r   ry   r      rr   r   c                      U R                   S   $ )zTThe actual :class:`simplekml.Icon` to be displayed, accepts :class:`simplekml.Icon`.rz   r#   r   s    r   r|   IconStyle.icon   r%   r   c                      XR                   S'   g )Nrz   r#   )r   r|   s     r   r|   r      s     "		'r   c                 n    U R                   S   c  [        5       U R                   S'   U R                   S   $ )zGAnchor position inside of the icon, accepts :class:`simplekml.HotSpot`.r{   )r   r   r   s    r   r}   IconStyle.hotspot   s2     99Z ($+IDIIj!yy$$r   c                      XR                   S'   g )Nr{   r#   )r   r}   s     r   r}   r      s     !(		*r   r6   )rs   r   NN)r1   r7   r8   r9   r:   r   r<   r_   r=   ry   r|   r   r	   r}   r   r>   r?   r@   s   @r   ru   ru      s    ( " " \\# # $ $ ^^' ' " " 
[[
4["  " % % ^^
7^(  (r   ru   c                   f   ^  \ rS rSrSr SU 4S jjr\S 5       r\R                  S 5       rSr	U =r
$ )
LabelStyle   a  Specifies how the name of a Feature is drawn.

Arguments are the same as the properties.

Usage::

    import simplekml
    kml = simplekml.Kml()
    pnt = kml.newpoint(name='A Point')
    pnt.coords = [(1.0, 2.0)]
    pnt.style.labelstyle.color = simplekml.Color.red
    pnt.style.labelstyle.scale = 2  # Text twice as big
    pnt.style.labelstyle.color = simplekml.Color.blue
    kml.save("LabelStyle.kml")
c                 J   > [         [        U ]
  " S0 UD6  XR                  S'   g )Nr_   r6   )r   r   r   r   )r   r_   rN   r   s      r   r   LabelStyle.__init__  s#     	j$(262"		'r   c                      U R                   S   $ r   r#   r   s    r   r_   LabelStyle.scale  r%   r   c                      XR                   S'   g r   r#   r   s     r   r_   r     r'   r   r6   )rs   )r1   r7   r8   r9   r:   r   r<   r_   r=   r>   r?   r@   s   @r   r   r      s>    " # " " \\# #r   r   c                   ,  ^  \ rS rSrSrSSS\R                  4U 4S jjr\S 5       r	\S 5       r
\
R                  S 5       r
\S 5       r\R                  S	 5       r\S
 5       r\R                  S 5       r\S 5       r\R                  S 5       rSrU =r$ )BalloonStylei   a  Specifies the content and layout of the description balloon.

The arguments are the same as the properties.

Usage::

    import simplekml
    kml = simplekml.Kml()
    pnt = kml.newpoint(name="BallonStyle", coords=[(18.429191, -33.987286)])
    pnt.style.balloonstyle.text = 'These are trees and this text is blue with a green background.'
    pnt.style.balloonstyle.bgcolor = simplekml.Color.lightgreen
    pnt.style.balloonstyle.textcolor = simplekml.Color.rgb(0, 0, 255)
    kml.save("BalloomStyle.kml")
Nc                    > [         [        U ]  5         XR                  S'   X R                  S'   X0R                  S'   X@R                  S'   g )NbgColor	textColortextdisplayMode)r   r   r   r   )r   bgcolor	textcolorr   displaymoder   s        r   r   BalloonStyle.__init__0  sB    
 	lD*,&		)!*		+ 		&#.		- r   c                     U R                   $ r   r   r   s    r   r   BalloonStyle.id;  r!   r   c                      U R                   S   $ )z4Background color of the balloon, accepts hex string.r   r#   r   s    r   r   BalloonStyle.bgcolor@  rp   r   c                      XR                   S'   g Nr   r#   r   r   s     r   r   r   E  rr   r   c                      U R                   S   $ )z.Text color in the balloon, accepts hex string.r   r#   r   s    r   r   BalloonStyle.textcolorI  r*   r   c                      XR                   S'   g )Nr   r#   )r   r   s     r   r   r   N  r,   r   c                      U R                   S   $ )z@The actual text that will appear in the balloon, accepts string.r   r#   r   s    r   r   BalloonStyle.textR  rk   r   c                      XR                   S'   g )Nr   r#   )r   r   s     r   r   r   W  rm   r   c                      U R                   S   $ )zbHow the balloon is tyo be displayed, accepts string from :class:`simplekml.DisplayMode` constants.r   r#   r   s    r   r   BalloonStyle.displaymode[  s     yy''r   c                      XR                   S'   g )Nr   r#   )r   r   s     r   r   r   a  s    #.		- r   r6   )r1   r7   r8   r9   r:   r   defaultr   r<   r   r   r=   r   r   r   r>   r?   r@   s   @r   r   r      s      (00		/   $ $ ^^' ' & & + + ! ! 
[[! ! ( (
 / /r   r   c                     ^  \ rS rSrSr\R                  SS4U 4S jjr\S 5       r	\S 5       r
\
R                  \" \5      S 5       5       r
\S 5       r\R                  S	 5       r\S
 5       r\R                  S 5       rSrU =r$ )	ListStyleif  a  Specifies the display of the elements style in the navigation bar.

The arguments are the same as the properties.

Usage::

    import simplekml
    kml = simplekml.Kml()
    fol = kml.newfolder(name='Folder')
    fol.style.liststyle.listitemtype = ListItemType.radiofolder
    fol.style.liststyle.itemicon.href = 'http://maps.google.com/mapfiles/kml/shapes/info.png'
    kml.save("ListStyle.kml")
Nc                 ~   > [         [        U ]  5         XR                  S'   X R                  S'   X0R                  S'   g )NlistItemTyper   r
   )r   r   r   r   )r   listitemtyper   itemiconr   s       r   r   ListStyle.__init__u  s6     	i')$0		.!&		) (		*r   c                     U R                   $ r   r   r   s    r   r   ListStyle.id~  r!   r   c                 n    U R                   S   c  [        5       U R                   S'   U R                   S   $ )zYAn instance of an :class:`simplekml.ItemIcon` class, accepts :class:`simplekml.ItemIcon`.r
   )r   r
   r   s    r   r   ListStyle.itemicon  s2     99Z ($,JDIIj!yy$$r   c                      XR                   S'   g )Nr
   r#   )r   r   s     r   r   r     s     !)		*r   c                      U R                   S   $ )zWHow an item is diaplyed, accepts string from :class:`simplekml.ListItemType` constants.r   r#   r   s    r   r   ListStyle.listitemtype  s     yy((r   c                      XR                   S'   g )Nr   r#   )r   r   s     r   r   r     s    $0		.!r   c                      U R                   S   $ )z7The background color of the item, accepts a hex string.r   r#   r   s    r   r   ListStyle.bgcolor  rp   r   c                      XR                   S'   g r   r#   r   s     r   r   r     rr   r   r6   )r1   r7   r8   r9   r:   r   r   r   r<   r   r   r=   r
   r   r   r>   r?   r@   s   @r   r   r   f  s     +00)   % % __
8_)  ) ) ) 1 1 $ $ ^^' 'r   r   N)r:   simplekml.baser   r   r   simplekml.constantsr   r   r   simplekml.iconr	   r
   r   rB   rc   ru   r   r   r   r6   r   r   <module>r      sy   $ 3 2 D D )* *ZJ<
 J<Z('
 ('V?(
 ?(D# #BC/7 C/L9' 9'r   